User: Password:
Subscribe / Log in / New account

Deleting subvolumes

Deleting subvolumes

Posted Jan 6, 2014 20:26 UTC (Mon) by zlynx (subscriber, #2285)
In reply to: Deleting subvolumes by dlang
Parent article: Btrfs: Subvolumes and snapshots

To do it with ordinary file systems you need free raw blocks. It almost requires the use of LVM, in fact.

Also, snapshots aren't as easy to create our manage.

(Log in to post comments)

Deleting subvolumes

Posted Jan 7, 2014 8:38 UTC (Tue) by smurf (subscriber, #17840) [Link]

Plus, if you do it with LVW and copy-on-write, you never know when you're going to run out of disk space. A random I/O error during some metadata operation will leave your file system in an inconsistent state. Btrfs might have problems deleting files when your FS is full, but it will not corrupt its structure.

Plus, with btrfs subvolumes you *can* delete files from snapshots and actually free some space (like the large download which you no longer need). No such luck with LVM.

Plus, creating a snapshot with LVM requires a consistent FS state. How do you assert that (and keep it until the snapshot command returns), on a live system, if you can't unmount?

Deleting subvolumes

Posted Jan 7, 2014 10:50 UTC (Tue) by Yenya (subscriber, #52846) [Link]

It is filesystem-dependent, but it can be done. See

Deleting subvolumes

Posted Jan 7, 2014 17:02 UTC (Tue) by zlynx (subscriber, #2285) [Link]

I think that all of the supported file systems in RedHat Server do a live freeze during LVM snapshot, so that isn't really a problem. It might be a problem for your application performance, if you can't stand an unresponsive filesystem for a few seconds.

I know that ext3, ext4 and xfs all work fine after a LVM snap.

Deleting subvolumes

Posted Jan 16, 2014 16:41 UTC (Thu) by (guest, #94131) [Link]

Isn't the filesystem-on-disk always in a consistent state for crash safety anyways? You just need to take a point in the block scheduler - the child FS will be in the same state as after "all calls to schedule_new_block(or whatever) hang, scheduler writes all blocks to disk, system crashes" - which is valid (by crash safety).

Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds