You are not logged in.

#1 2024-07-21 13:44:44

Schark
Member
Registered: 2024-07-21
Posts: 1

/opt exists in filesystem

I recently installed new Arch distro by hand and I decided to have /home and /opt on a different partition /dev/sdd4. I explicitly decided to not have /home and /opt individually mounted into the partition but keep them in a direcotry named /userdata which is mounted on sdd4. This is to have A: a better overview and B: be safe for future root directories which need to be in / but I may don't want them to be in the root partition.

For that I moved the direcotires /home and /opt into /userdata and created a symlink for both directories in the root direcotry.

commands:

sudo mv /home /userdata/
sudo mv /opt /userdata/
sudo ln -s /userdata/home /home
sudo ln -s /userdata/opt /opt

My main problem is for /home everything works fine for now. But if I wan't to install a package which installs its data into /opt e.g. discord. This ended up in an error message which says.

error: failed to commit transaction (conflicting files)
discord: /opt exists in filesystem

I don't want to use --override even this may work it woudn't be correct even for future packages.

If I try to install vivaldi everything seem to work properly in the first place but vivaldi overrides the symlink and creates a real directory in place. If i move /opt/vivaldi by hand and recreate the symlink I sometimes experience random crashes of vivaldi pages or even the whole application.

Both the root and userdata partition uses btrfs.

I think this may be a permission issue but I'm unsure. Is there anything special where I need to pay attention to?

Offline

#2 2024-07-21 13:50:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: /opt exists in filesystem

This whole approach does not seem wise to me, but I'm pretty sure bind mounts would be much less of an issue than symlinks.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2024-07-21 13:51:12

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: /opt exists in filesystem

You cannot replace dirs managed by pacman with symlinks. Look into bind mounts.

Offline

Board footer

Powered by FluxBB