I have a Network Attached Storage (NAS) and I'm mounting multiple network shares using script:
It was working fine before, but currently the issue is that it mounts the same network share to each folder. It always mounts the first share mounted after boot so I reordered them to have most important one as the first one.PASS=$(zenity --password) &&
sudo mount -t cifs -m -o noperm,noserverino,user=${USER},password=${PASS},vers=2.1,sec=ntlmssp //${IP}/Share1 /run/media/${USER}/NAS/Share1 &&
sudo mount -t cifs -m -o noperm,noserverino,user=${USER},password=${PASS},vers=2.1,sec=ntlmssp //${IP}/Share2 /run/media/${USER}/NAS/Share2 &&
sudo mount -t cifs -m -o noperm,noserverino,user=${USER},password=${PASS},vers=2.1,sec=ntlmssp //${IP}/Share3 /run/media/${USER}/NAS/Share3 &&
sudo mount -t cifs -m -o noperm,noserverino,user=${USER},password=${PASS},vers=2.1,sec=ntlmssp //${IP}/Share4 /run/media/${USER}/NAS/Share4 &&
sudo mount -t cifs -m -o noperm,noserverino,user=${USER},password=${PASS},vers=2.1,sec=ntlmssp //${IP}/Share5 /run/media/${USER}/NAS/Share5
I checked dmesg for any issues when mounting. I already fixed all warnings by adding additional params you can see in the script above so currently the log contains just:
I tested LTS kernel and figured out that the behavior is dependent on kernel used.[ 141.570491] CIFS: Attempting to mount \\${IP}\Share1
[ 141.863082] CIFS: Attempting to mount \\${IP}\Share2
[ 141.917773] CIFS: Attempting to mount \\${IP}\Share3
[ 141.954368] CIFS: Attempting to mount \\${IP}\Share4
[ 141.995645] CIFS: Attempting to mount \\${IP}\Share5
When using 6.1.15-1-lts kernel, this script successfully mounts 5 different shares as expected.
With linux kernel 6.2.2 scripts execute without reported issues but mounts Share1 in all 5 folders.
I didn't find similar issue reported online yet. Can you tell me where should I ask this question or where to report this issue so it will be fixed? I'm starting with the forum of the distribution I use.
I think that if the script is working without any change on other kernel version, it's no longer an issue with some wrong parameters for the mount command.