[arch-general] BTRFS integration

C Anthony Risinger anthony at extof.me
Thu May 6 01:49:44 CEST 2010

On Wed, May 5, 2010 at 6:28 PM, Isaac Dupree
<ml at isaac.cedarswampstudios.org> wrote:
> On 05/05/10 19:10, C Anthony Risinger wrote:
>> subvolumes can be mounted two ways via a mount option:
>> 1) subvol=<subvolume_name>
>> 2) subvol=<subvolume_id>
>> 1 can only be used if the subvolume is in the root of the FS, i.e.
>> /__active would work, but /root/__active would NOT... the mount option
>> cannot have slashes and i don't know if this will change.
> since we control the structure, why not the (slightly uglier)
> /root__active
> /root__rollback
> /root__20090807
> /home__active
> /home__...
> just remove the slashes or replace them with some other character like dash
> or underscore.  `ls` will still sort things alphabetically so there will
> still be some semblance of order for the humans, and it would behave nearly
> the same to the machine.  And it will be easier for debugging purposes if
> all these subvolumes are accessible by name.  (Do you think you can ask
> upstream whether they want to change or keep the restriction on slashes(i.e.
> volumes in subdirectories), in light of our '.' organizational ideas?)

ah, yeah thanks, i meant to mention that too but got lost in the
myriad of letters i had written :).

this would work just fine, and has the benefit of working on pretty
much any recent-ish kernel/btrfs version.  the end user should never
see any of this anyway.  iirc, this is how fedora does it (something
like yum_snapshot_20090807).  but fedora installs into the default "."
subvolume, so each time you take a snapshot you get a bunch of empty
folders from previous snapshots (the snapshot yum_snapshot_20090808
would have an empty folder yum_snapshot_20090807 [snapshots not
recursive]); we can stop this by not installing into the "." subvolume
and using an actual mount point for operations, plus it keep the real
root "device" (root__active) nice and clean.

as for upstream, they are pretty receptive to changes right now.  im
not sure if the slash thing is a limit of the mount command/something
else, or just was not implemented.  afiak, the <id> mounting was
implemented to replace the name mounting [and for setting a new
default], i'm not sure if <name> mounting will be dropped or not.
also even if they did implement, we prob wouldn't see it until 2.6.35

any other ideas besides rollbacks and an original snapshot that btrfs
could be used for?

C Anthony

More information about the arch-general mailing list