Thursday, May 16, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1585  / 3 Years ago, fri, december 3, 2021, 11:14:53

I want several Linux distros to share the same home/data partition, each having a unique user name and implicitly a separate home directory.
I installed Debian Wheezy, and formatted this partition as btrfs.
But then, when I install Ubuntu 13.04 and select that partition as /home it creates a new directory, @home, in which it puts another folder with the user name.



Why does this happen?


More From » partitioning

 Answers
5

I'm guessing Ubuntu always wants to use subvolumes, if you use btrfs for the root partition you will automatically get two subvolumes, "@/" and "@home/" (see the Ubuntu wiki btrfs entry for more info on this), and it might set up the "@home/" subvolume just for the sake of consistency.



On a side note: If you look in /etc/fstab you should see the option "subvol=@home" for the /home mountpoint, which means that it mounts the "@home/" subvolume of that btrfs (subvolumes are quite similar to directories in some sense).






Answer to comment:



Yes, you can mount the top node and the subvolume node simultaneously:



mount /dev/sdX# /mnt/top_node -o subvolid=5
mount /dev/sdX# /mnt/home_subvol -o subvol=@home


(If the top node is the default mount point (default case) you can omit the "-o subvolid=5" option)



Here the @home/ subvolume will be accessible both through /mnt/top_node/@home/ and /mnt/home_subvol/ equivalently.



It might be worth it to have the two dirs there alongside @home/ be subvolumes instead, that way you could snapshot and mount them all independently...


[#33369] Sunday, December 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
diket

Total Points: 167
Total Questions: 124
Total Answers: 109

Location: Somalia
Member since Wed, Mar 15, 2023
1 Year ago
;