1

I've just moved over to Linux (Ubunutu 18.04) from Windows.

I have a WDNAS which I have mounted and works fine here.

mkdir mnt/NAS
sudo nano /etc/fstab
//192.168.1.17/wd_nas mnt/wdnas cifs credentials=/home/ubuntu/login.cred,uid=1000,gid=1000 0 0

Running sudo mount -a mounts as expected and I can see the share fine. It also appears in the gui Nautilus file manager.

The issue is, after a reboot the mount appears to have gone. It doesn't appear in file manager. It only works when run sudo mount -a.

df -h shows it mounted. //192.168.1.17/wd_nas 3T 1.2T 1.5T 30% /mnt/wd_nas

cat /var/log/syslog/ |grep wd_nas
Mar  6 20:51:22 ubuntu systemd[1]: Mounting /mnt/wd_nas
Mar  6 20:51:22 ubuntu systemd[1]: Mounted /mnt/wd_nas

If I run ls -la /mnt/wd_nas I can see the files I have placed there as test but if I navigate via the gui (nautilus file manager) I can't see anything?

So my first assumption was permissions but I checked and confirmed. Directories and all subs are chown to user with rw access. Googling frantically for days, I've tried almost everything I could find. Even topics relating the network not booting before fstab is being run, so adding _netdev and even configuring systemd. I've even tried to create a bash script to sleep for 20s and run mount -a via cron at reboot. Nothing! Although it doesn't at all appear to be related.

Now I'm here. Would you be able to help?

  • Have you tried the nofail option? Other than that, your fstab entry is similar to mine. – Organic Marble Mar 7 at 1:22
  • Yep, I've added it. I also even tried specifying the version. vers=1.0 or even vers=2.0.. And so many others with no luck :( I've been told it may be relating to the file system on the wd nas? but I'm sure it supports Linux and even when I run sudo mount - a it does actually mount just not automatically on boot. – Maverick32 Mar 7 at 8:02
  • Anybody able to help me? – Maverick32 Mar 9 at 9:09
1

On my UBUNTU 18.04 server and for my Synology NAS i have create 2 files script :

after install

apt-get install cifs-utils

The first:

nano ./mount.nas.sh 
mount -t cifs //192.168.1.xxx/home /mnt/NAS-xxx -o username=philippe,credentials=/home/philippe/.credential.phil,domain=WORKGROUP,vers=1.0

chmod 755 ./mount.nas.sh

the second :

nano ./.credential.phil
username=<username on NAS>
password=<Password>

 chmod 700 ./credential.phil

all are OK for a backup.shell script for test use

umount -f -l /mnt/NAS-xxx
df -h
  • Welcome to ask ubuntu. Please try to use proper formatting. I have fixed it for you but in the future when putting code in a post either leave a line blank and then start each line of the code block with 4 spaces (as I did here). Or if you just and single lines of code you can use " ` " before and after the code snippet to post inline like so . – Jeff Mar 16 at 22:23
0

I've figure it out after a painful week.

fstab was creating the mount point at /mnt which i believe is the root dir. So that is why df -h was showing it mounted, as it was, just elsewhere.

Was - //192.168.1.17/wd_nas mnt/wdnas

Now - //192.168.1.17/wd_nas /home/user/mnt/wdnas

Found this definition here in this forum..

"Using the /mnt directory should only work if the drive is a local volume rather than a network share or removable device."

Apologies, i'm new to Linux.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.