On Fri, 23 May 2014 00:34:25 +0200, Stefan G. Weichinger wrote:

> > I'm working on this btrfs malarkey and have a question about best 
> > practice. It is recommended to leave the root volume empty and
> > create a subvolume for the root filesystem which is set with btrfs
> > subvolume set-default, which I have done.  
> 
> Alternative: mount the subvol via option "subvolid" etc in fstab .... if
> you plan to mount different snapshots, for example.

I went with set-default for the root subvolume, if I need the root volume
I can mount it with subvolid=0.

> > What is the recommended way to create subvolumes that are mounted
> > further down the filesystem? Let's say I was usr and var on their
> > own subvolumes. Do I create them in the btrfs root, which means
> > they have to be mounted from /etc/fstab - or do I create hem below
> > the subvolume called root?  
> 
> I saw more examples mounting every dir via a
> separate line in fstab (which also adds the choice to mount them with
> different options, think compression etc).

That makes sense, and will be useful should we ever get encryption.

> My understanding is:
> 
> * create and use subvols for entities you want to be able to snapshot
> and rollback individually.
> 
> * create and use subvols for entities you want to apply special
> options to: compression, (no)COW, quota ...
> 
> I would mount each subvol via extra line and create them in parallel ...

That's what i ended up doing, thanks. I did have an issue with systemd
failing to mount them because the correct symlinks hadn't been created
when I run cryptsetup in the initramfs, because it doesn't use udev, but
that was fairly easy to fix.

> > That raises another question. Assuming I've done it wrong (well, my
> > wife always does) is there an equivalent to the zfs rename command
> > to move or rename a subvolume?  
> 
> As far as I understand you are allowed to mount the root volume (or
> academic: any subvol in a higher level) and use plain "mv" to rename
> the subvols as if you renamed sub-dirs.

rust me to overlook the easy way of doing things, I was looking for an
equivalent to "zfs rename" and never considered mv. So far, btrfs looks
good on my laptop - time to think about putting it on my desktop.


-- 
Neil Bothwick

Ifyoucanreadthis,youspendtoomuchtimefiguringouttaglines.

Attachment: signature.asc
Description: PGP signature

Reply via email to