Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

how to create permanent access to folders on other disk?

Linux Kernel, Network, and Services configuration.
Message
Author
canti
Posts: 74
Joined: 2011-01-31 12:57
Location: The Netherlands

Re: how to create permanent access to folders on other disk?

#21 Post by canti »

p.H wrote: You don't want to do that.
Here I had my strong suspicion...
p.H wrote: - create a directory /home/familie/data (if you want to access the contents of the filesystem under this path)
I'm struggling to create the directory /home/familie/data on the filesystem sdb1 using the mkdir command, this seems not possible when this filesystem is unmounted
p.H wrote: Note : the filesystem being mounted on /media/familie/data normally means its label is "data" and it was mounted in the GUI session opened by user "familie".
Ah, interesting. So this probably means I only have to create /home/familie on sdb1 as this is already labeled as "data"?

Yes, I know I'm a long time Linux user, but still with limited knowledge of commands and basic principles of files structure. I'm a bit lazy thanks to the beautiful GUI Gnome and the good Debian installer. But I'm absolutely not averse to use Linux commands and like to learn them!
HP Envy 17 n120nd containing Debian Bullseye (Gnome 3)

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: how to create permanent access to folders on other disk?

#22 Post by Dai_trying »

I thought I would just put down here what I do to achieve this in case it might be useful to OP.

First I create an fstab entry to mount my "DATA" partition to /media/<username>/DATA/

Next (on a fresh installation) I remove (delete) any Documents/Downloads/Pictures/Videos folders from my $HOME.

After this I simply create a symlink to the relevant directories of my DATA partition. For simplicity I have them named Documents, Downloads, Pictures etc etc...

If you are in the "target" directory (where you want the symlink placed) and the folder name is the same in your DATA partition as you want to use in the filesystem you can use this simple command (replace "dai" with your own username)
sudo ln -s /media/dai/DATA/Documents

If your DATA folder names are different to what you want in your filesystem you can use this command to give your custom folder (sym-link) name.
sudo ln -s /media/dai/DATA/random_folder_name My_custom_folder

The reason I do this is to make easy use of all my data from different OS's (I usually have a multi-boot system with between 4 and 6 different OS's).

Note 1 I use the /media/<user>/ folder to place my mount which I have read on this forum is not good practice but I had been doing it this way for years without issue before reading that and so keep it this way, you may prefer to use a more "recommended" location for your mount point.

Note 2 I use sudo here but the same results can be achieved if you run the command as root another way.

Post Reply