We have a Rockstor system in daily use by about 100 people with a total of 51 shares and around 20TB of data… We finally got everyone using these system a few months ago (migrated off an old Windows server).
We have configured daily snapshots of all the shares (as hourly snapshot were causing issues when being deleted) - retaining 50 per share.
We are now continuing to have have issues with smbd processes being in state ‘D’ which requires a reboot before some of the shares become available (which takes over an hour!!)
I believe this could all be because we have too many snapshots and some btrfs processes iterate over all the snapshots even when they don’t need to 
In our experience, deleting many snapshots at once also causes a similar hung state; so I’d like to start decrementing the number of retained snapshots over time…
This would involve changing 50 schedules one-at-a-time in the GUI each day for about 38 days to get the number down to 12… this would be extremely onerous and prone to human error.
I would like to create a cron-job that reduces the number of retained snapshots by 1 each day for each of the shares - down to a minimum of 12
Is there an API that I could utilise to modify the schedules or shall I just hack-into the postgres database?
Many thanks for any advice!