Chris Murphy wrote: > On Mon, Jun 1, 2015 at 6:36 AM, Neal Becker <ndbecker2@xxxxxxxxx> wrote: >> I have everything under /: >> >> sudo btrfs subvolume list / >> ID 257 gen 65795 top level 5 path root > > root is a subvolume, but is not the top level (default) subvolume. >> >> I want to move /home onto it's own subvolume. I hope I can do this while >> the root device is mounted. > > Yes. > > You need to mount the top level and create a new subvolume. Assuming > you haven't changed the default subvolume, just mount the device > normally: > > mount /dev/sdaX /mnt > btrfs sub create /mnt/home > cp -a --reflink /mnt/root/home /mnt/ > vi /etc/fstab ## to add an entry to mount subvol=home at /home > umount /home > mount /home > > And then at your leisure you can blow away the contents of the copied > and no longer used /home directory still in the root subvolume. Just > be certain you're deleting the correct home. You could: > cd /mnt/root/home > rm -rf * ## egads be certain > > This is not a mount point, but the old home directory which is no > longer in use. The path to the in use one is /mnt/home as well as > /home (in the above example). > Thanks, this all worked just fine. Only thing I did differently, I needed to rename the old /home to /oldhome and mkdir /home for the new subvol mount, so that I now have /home and /oldhome and can, at my leisure, rm -rf oldhome (otherwise, mounting /home would have hidden the old /home and made it impossible to rm). -- 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
