Help with mounting NAS

so, I was trying to mount my NAS using fstab and ended up in a rather peculiar (or very trivial) error. Being a newbie to linux I couldn’t figure it out.

As a good netizen, I looked up some of the fstab related topics in the forum and haved managed to gather some additional info that might help in troubleshooting.

I followed this tutorial from the wiki.

I got through all the steps without any error except the ‘ls’ part. Whenever I try ls, I get the ‘not a directory’ error.

osmc@osmc:/$ sudo nano /etc/fstab
osmc@osmc:/$ sudo mount -a
osmc@osmc:/$ sudo systemctl daemon-reload
osmc@osmc:/$ sudo systemctl restart
osmc@osmc:/$ cd /mnt/nas_movies
osmc@osmc:/mnt/nas_movies$ ls
ls: reading directory .: Not a directory
osmc@osmc:/mnt/nas_movies$ sudo mount /mnt/nas_movies
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

My fstab:

/dev/mmcblk0p1 /boot vfat defaults,noatime,noauto,x-systemd.automount 0 0
#rootfs is not mounted in fstab as we do it via initramfs. Uncomment for remount (slower boot)
#/dev/mmcblk0p2 / ext4 defaults,noatime 0 0
// /mnt/nas_movies cifs guest,noauto,x-systemd.automount,uid=1000,gid=1000,iocharset=utf8,rw 0 0

I was able to verify with smbclient that I am able to see the shares from the PI

osmc@osmc:/mnt/nas_movies$ smbclient -L -N
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.24]

    Sharename       Type      Comment
    ---------       ----      -------
    BT              Disk
    web_page        Disk      Enter Our Web Page Setting
    lp              Printer   USB Printer
    Volume_1-1      Disk
    IPC$            IPC       IPC Service (DNS-323)

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.24]

    Server               Comment
    ---------            -------
    DLINK-B3B16F         DNS-323
    OSMC                 Samba 4.2.14-Debian

    Workgroup            Master
    ---------            -------
    WORKGROUP            OSMC

showmount errored out for me
osmc@osmc:/mnt/nas_movies$ showmount -e
clnt_create: RPC: Port mapper failure - Unable to receive: errno 111 (Connection refused)

Any idea what / where I could be doing/going wrong?

p.s: For the love of god I couldn’t figure out how to get the proper formatting done, apologise for the mess.

Are you sure there is a folder BT on Volume_1-1? As you actually have another share that is called BT.
Also do you need to use guest access? No users configured on the NAS?

Thanks for your reply. Yea, I have both of them shared, BT is predominantly for movies. I did try with volume_1-1 before this and got the same error.


I just wanted to keep it simple, but I can thrown in some cred if it helps.

Give it a try

no dice mate, still the same error.

Any comment on the below error I am getting for showmount?

osmc@osmc:/mnt/nas_movies$ sudo showmount -e
clnt_create: RPC: Port mapper failure - Unable to receive: errno 111 (Connection refused)

Showmount is for NFS shares not for SMB. So that’s normal unless you have NFS configured.

How does your fstab look now? What does ls -lah and df -h give?
Also post output of dmesg | paste-log

Ok, so looks like I messed up something. Re-added the mount with the credentials and it seemed to work for a different folder.

Am gonna try some trial and error to see if I can get the actual folder I need to work without credentials.

BTW once I get the mount working, how can I know that OSMC is using it? How can I make the NAS folders visible from within OSMC?

You need to add them as sources, check the wiki it’s explained there

You mean this? I had the NAS add as a source this way already, but I read in the forum that mounting provides improvement over network sharing, besides wanted to try something new.

If I had mounted the NAS and also added it as a network share, how to make sure Kodi gets to the NAS via the mount?

Remove the existing sources and add them again going via root Filesystem - mnt - your share

cheers mate, will give it a try and let you know if I face any issues.