I didn't know how to phrase this question better. I hope the following description is clear.
I have Linux Mint 19.3 Cinnamon installed alongside Windows 10, on a dual-boot system. Between the two OS, I have a shared partition, named DATA
, where I put files that I may need to access from either of the OS. This drive/partition, DATA, is located at /media/username
folder in Linux.
Now, I need to access a remote folder and its subfolders, kept on our server. Let's say, the shared folder is at //192.168.100.100/OurSharedFolder
with several subfolders. I thought to map/mount this remote folder to a location on my DATA drive, more specifically, at /media/username/DATA/Projects/MappedFolders
.
One important detail. The above address and OurSharedFolder are accessible only when I am connected via VPN.
To permanently map this network folder was easy in Windows 10. To do this on Linux, I followed simple steps given at this page, in the "Permanent mount" section. Basically, created and saved a credentials file using
sudo nano /root/.smbcredentials
and also saved the mount path configuration in fstab
file
//192.168.100.100/OurSharedFolder /media/username/DATA/Projects/MappedFolders cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
Then I created the MappedFolders
folder at the /media/username/DATA/Projects/
location. Finally, I executed
mount -a
This created the desired mounted drive. So far so good.
But the problem started when I changed the name of the MappedFolders folder to SharedFolders.
I changed the physical folder name, as well as the path in the fstab file. Then executed mount -a
again.
It created the mount folder, but automatically, the location of my "Projects" folder, which is inside the shared drive DATA, changed from /media/username/DATA/Projects/
to /media/username/DATA1/Projects/
.
I unmounted using the
umount -a -t cifs
but, the DATA1
alias remained.
I changed back the mounted folder's name to MappedFolders
as earlier, and mounted again, and now there is DATA
, DATA1
and DATA2
.
They all point to DATA
. But it has changed the location of my Projects folder to DATA2
.
In short, for each mount
and umount
operation, it created a new shortcut for DATA
drive.
The implication is that now the datafiles inside the Projects folder have a new path, and broken links in the files that access those datafiles.
I hope I am clear in my description.
Thanks ahead!