Search code examples
unixredhatmountfstab

Not able to mount directory after updating fstab


On a Windows file share I created a folder and shared it with a service account.

I have added a mount point entry to fstab like this:

//server/folder /mnt/folder cifs credentials=/root/creds/creds,noperm

Where the creds file contains credentials for above mentioned service account.

Then run mount -a to activate the mount point.

It gives an error like:

mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Couldn't chdir to /mnt/folder: No such file or directory

I have tried mounting the directory manually and receive the same error.

What the heck am I missing?


Solution

  • Ah. I had not created folder in /mnt/folder on the UNIX side. Did mkdir /mnt/folder.

    I was then able to see folder in /mnt but it was empty.

    Did a mount -a and can now see the contents of the Windows share in /mnt/folder

    I seems like I had to do mount -a from /etc as when I issued the command from /mnt it just hung for a while until I killed it and then tried from /etc