Re: Updating the wiki pages adding btrfs command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 15, 2010 at 15:37, Chris Ball <cjb@xxxxxxxxxx> wrote:
...
>   > Why not just do:
>   > # btrfs subvolume delete /path/to/subvolume1
>   > # btrfs subvolume delete /path/to/subvolume2
>   > # sync
>
> Or even better, "btrfs filesystem sync <path>".
>
> I'm assuming that the caller wants to wait until the subvol delete
> has happened, but is unwilling to wait until all other writes to the
> FS have finished, and is even more unwilling to wait for all writes
> on the rest of the system to finish.
>
> I don't know whether that's actually a reasonable/plausible use case,
> though.

I think so, because I have that use case (sorta).  I have a home
fileserver with btrfs, and a cron job on that machine runs hourly,
taking snapshots.  However, once the disk fills up, I want to delete
the oldest snapshots:

while [[ disk > xx% full ]]; do
    btrfs subvol delete /the/oldest/snapshot
    wait for space to free up
done

If delete does not wait to free space, I'll delete too many snapshots.
 But if I force a filesystem-wide sync after every delete, the loop
may take longer, which on a system busier than mine could take more
than the hour to complete.

-- Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux