#[SOLVED] sharing home partition via symbolic links across partitions

21 messages · Page 1 of 1 (latest)

prisma cipher
#

I'm starting this on two different arch installs, and I want to install fedora a well, but all with a shared home directory.
I have:
sda3 = ext4 and is the place for the home (mounted on both of the below at /home2)
sdb1 = bootloader
sdb2 = ext4 arch
sdb3 = btrfs arch
sdb4 = currently empty (will be fedora)

On btrfs I've run:

ln -s /home2/Downloads ~/Downloads
ln -s /home2/Desktop ~/Desktop
ln -s /home2/Public ~/Public
ln -s /home2/Music ~/Music
ln -s /home2/Pictures ~/Pictures
ln -s /home2/Videos ~/Videos
ln -s /home2/Templates ~/Templates```

But since doing that, not sure if it's related, suddenly on ext4 `ls /mnt/btrfs/home/`no longer contains my user directory, even though when I load into btrfs it's right there. I don't see how the above could've done this?

I had previously tried to run one commands `ln -s /home2/* ~/*` and `ln -s /home2/* -t ~/`but neither seemed to work as expected.
prisma cipher
#

maybe it'd be easier to explain what I'd like to do, and someone can tell me if I'm being stupid:
I'd like anything in the default directories of a home directory to be shared between 3 different installs, but not files (e.g. ~/.local would all be different in all 3, but if I put a file in ~/Documents, that'd be saved to sda3 and be accessible by all 3 installs)
I had sdb2, sdb3 and sdb4 for my installs, and I had sda3 for my home, it has nothing on it, and is in ext4.

What is the best way to share the home directory?

lunar quail
#

I'd recommend bind mounts more

prisma cipher
#

Ohh a new thing for me to learn about

#

Just need someone to look after the dog so I don’t have to :p

#

@lunar quail regarding the setup, does what I’m asking for in my second message make sense? Or is it not feesible?

lunar quail
#

it sounds feesable
so basically you want to share your xdg-user-dirs? but things like .loca, .config, .profile and etc are seperate
hm, can i see your lsblk? or findmnt?

prisma cipher
#

I just want the home directories shared between installs

#

I assume that’s the xdg bit? I don’t know much about xdg-user-diets. My lsblk is rather bulky, I can post it when I can get away from grumpy angry dog XD

lunar quail
#

lol tis fine
xdg-user-dirs are your documents, videos, pictures, music, desktop, template and downloads folder, yes

prisma cipher
#

So recap:
Sda3 is blank, ext4
Sdb2 is ext4 installation
Sdb3 is btrfs installation
Sdb4 will be fedora

I’ll look up bind mounting shortly

prisma cipher
#

@lunar quail so couple of things I'm unsure of, firstly if I do bindmount them, where is the data actually stored? is it duplicated? Secondly, if I upload a file into one of the bind mounted directories on one system, can I just delete it from the others, or do I need to play around with ownership at all? Thirdly would I just individually bind mount all the xdg-user-dirs? lastly, would I need to do any sym linking, or just bind mounting?

prisma cipher
#

I wonder if the real solution is having lots of partitions, 1 for each directory, which is mounted

#

you wanted my lsblk:

#

Maybe I'll use the hdd (which for some reason is called sdd) for some of it that's not expected to be big

#

sorry that is expected to be big

#

or even all of it, and just use the ssd for games

lunar quail
prisma cipher
#

I've been somewhat warned against bind mounting in another server, I have however tried sym linking both and, it just doesn't seem to work, I'm tempted to make 8 partitions, 1 for each of the xdg-user-dirs, and mount them to each install, maybe with a hook to change the ownership to the uid of each user (I'll be making sure they all have the same uid on each system)

prisma cipher
#

solution:
Chown user: and Chmod 700 the mountpoint
make the directories in the mountpoint
Then repeat on each OS:
delete the directories from ~/
make sure different users have the same Uid and Gid
ln -s /<mountpoint>/<directory> ~/<directory>