On 2014/02/13 09:02 PM, Kai Krakow wrote:
Hi!
Is it technically possible to wait for a snapshot completely purged from
disk? I imagine an option like "--wait" for btrfs delete subvolume.
This would fit some purposes I'm planning to implement:
* In a backup scenario
I have a similar use-case for this also involving backups. In my case I
have a script that uses a btrfs filesystem for the backup store using
snapshots. At the end of each run, if diskspace usage is below a
predefined threshold, it will delete old snapshots until the diskspace
usage is below that threshold again.
Of course, the first time I added the automatic deletion, it deleted far
more than was necessary due to the fact that the actual freeing of
diskspace is asynchronous from the command completion. I ended up
setting a small delay (of about 60 seconds) between each iteration and
also set it to monitor system load. If load is not low enough after the
delay then it waits another 60 seconds.
This complicated (frankly broken) workaround would be completely
unnecessary with a --wait switch.
Alternatively, perhaps a knob where we can see if a subvolume deletion
is in progress could help.
--
__________
Brendan Hide
http://swiftspirit.co.za/
http://www.webafrica.co.za/?AFF1E97
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html