4

My SSD is only 110 GB in size, so moving the old /home (btrfs) to a new /home (also btrfs) on a bigger HDD is likely a good idea.

Is it possible to combine btrfs-subvolumes as separate subvolumes on separate partitions (even on separate devices) but as children of the top level subvolume (ID 5)????

Does this procedure enable snapshots of the new /home?

This is my current entry for the old /home on SSD in fstab:

UUID=23cef669-f46c-4f5b-8476-ba548256e754 /home btrfs rw,noatime,compress=lzo,ssd,space_cache,subvolid=258,subvol=/@home,subvol=@home 0 0

As far as i know the procedure to move /home is as follows:

a) create a mountpoint for the new /home (e.g. /mnt/home)

b) adjusting fstab entry of /home: UUID> mountpoint> btrfs> mountoptions

c) copy all files from old to new /home via life system (e.g. cp -ar /oldhome/* /newhome)

But i'm not sure what to do with mount options: can i use the old subvolume options?:

subvolid=258,subvol=/@home,subvol=@home

Should be harmless as long as the old entry is going to be deleted?! If yes, the new fstab entry on HDD for /home would look like this:

UUID=7ad83a78-4e19-45df-9c6e-1d931a9f999c /mnt/home btrfs noatime,compress=lzo,subvolid=258,subvol=/@home,subvol=@home 0 2

What did i forget? Any comments, hints or suggestions for improvement?

1
  • Fairly certain that no, you cannot have subvolumes on two separate pools. Fstab can be used to mount multiple partitions or drives together, but each device has separate pools (as they should; SSD and HDD have different characteristics and you DO want btrfs to operate in its respective support modes for both of these cases.) You will have to use btrfs-send and btrfs-receive to transfer snapshots between drives, should you desire the snapshots live on the larger drive.
    – Skrylar
    May 15, 2018 at 2:54

1 Answer 1

0

I created a new subvolume 'home' in the new /home on /dev/sda2. Copied the data old/home to new/home and then i adjusted fstab to:

# /dev/sdb1 LABEL=archroot
UUID=23cef669-f46c-4f5b-8476-ba548256e754   /           btrfs       rw,noatime,compress=lzo,ssd,subvolid=257,subvol=/@root,subvol=@root  0 0

# /dev/sdb1 LABEL=archroot   OLD/HOME on SSD  ID 258 gen 3060 top level 5 path @home
# UUID=23cef669-f46c-4f5b-8476-ba548256e754 /home       btrfs       rw,noatime,compress=lzo,ssd,subvolid=258,subvol=/@home,subvol=@home  0 0

# /dev/sdb1 LABEL=archroot
UUID=23cef669-f46c-4f5b-8476-ba548256e754   /.snapshots btrfs       rw,noatime,compress=lzo,ssd,subvolid=259,subvol=/@snapshots,subvol=@snapshots   0 0

# /dev/sda2 LABEL=archhome   NEW/HOME on HDD  ID 260 gen 30 parent 5 top level 5 path home
UUID=7ad83a78-4e19-45df-9c6e-1d931a9f999c       /home           btrfs           rw,noatime,compress=lzo,space_cache,subvolid=260,subvol=home 0 0

Works like a charm. Did i forget something? Any hints? I hope to be able of making snapshots from this new /home too.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .