[Solved] How to mount a NAS????

I tried to mount my share/Music folder from my Popcorn Hour A-200 to Volumio.
The A-200 is almost the same as a NAS.
At first I tried to enter the data by using the web-ui, but this did not work.

Then I followed the three steps from this topic (thanks Lechuck)


I used Putty

sudo apt-get update

sudo apt-get install cifs-utils

After I entered this rule with ip , username and password from the Popcorn Hour

sudo mount.cifs // /mnt/NAS —verbose -o user=USERNAME,password=PASSWORD,rw,iocharset=utf8,sec=ntlm

After finishing this three steps the NAS (A-200) had to update first and then everything was working like a charm.

After making a reboot on Volumio the playlist was still there but did not play anymore.
I tried to update the NAS again but then everything was gone.
Everything was the same as I started, no NAS :angry: :angry:

What to do now:

I entered the rule with username/pass again in Putty but now it did not work anymore.

I tried to mount the NAS again with the web-ui as Joep wrote on this topic:


Still no success. :frowning: :frowning:

I saw that Michelangelo wrote:

[i]“you can add the same string in /etc/fstab

That way your share will be mounted every reboot…”[/i]

Could this be my last hope? :unamused: :unamused:


How do you add the same string in /etc/fstab???
Please be more clear! :frowning: :frowning: :frowning: :frowning:

I hope somebody can help me :unamused: :unamused:

Could you log in to putty and just type “mount” and paste what it returns into here?

I’ve had issues with my NAS unmounting on it’s own as well.

OK I typed “mount” and this is the result:

C 2013 Michelangelo Guarise - Volumio.org

Volumio Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Mar 11 20:11:49 2014 from pc-van-johnberg.local
volumio@volumio:~$ mount
/dev/root on / type ext4 (rw,noatime,nouser_xattr,errors=remount-ro,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=240196k,nr_inodes=60049,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=49692k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=262144k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/sda1 on /mnt/USB type fuseblk (rw,nosuid,nodev,noexec,noatime,sync,user_id=0,group_id=0,allow_other,blksize=4096)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
Ramdisk on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=262144k)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)

By he way, when I try to mount the NAS for the second time in Putty by typing this rule:

sudo mount.cifs // /mnt/NAS —verbose -o user=nmt,password=1234,rw,iocharset=utf8,sec=ntlm

I get this message:

Couldn’t chdir to /mnt/NAS: No such file or directory

So what to do now,

I don’t know anything about Linux
I hope you can find something that is giving the solution!

I am also very interesting in what Michelangelo wrote:

[i]“you can add the same string in /etc/fstab

That way your share will be mounted every reboot…”

Is this clear for you
How to add this “same string” ???

Sounds like you need to create the /mnt/NAS directory first.

Have a look at Pete’s post in the first thread linked above.

I would also very much like to know how to do what Michelangelo wrote:

[i]“you can add the same string in /etc/fstab
That way your share will be mounted every reboot…”

as I have to remount NAS after a reboot. Any help, and guidance as far as configuring /etc/fstab will be gratefully appreciated. This is really turning into a learning journey!

I tried editor /etc/fstab in root, and entered " //192.168.X.XX/Source/Music /mnt/NAS —verbose -o user=guest,rw,iocharset=utf8,sec=ntlm " in a new line, but this returned an error message.

This probably isn’t the best way, but I have achieved something similar using the following method. I used parts of this to auto-update the webradio catalogue, but I’ve also set it up to restart MPD and re-mount once a day. To mount your NAS automatically on restart, do the following (credit to steves here - auto-updating-tagged-radio-streams-bbc-t527.html):

Like a lot of things here, looks like a lot of work but in reality it’s about 5 minutes.

Volumio runs a script at start up to optimise the system and turn stuff off. We need to keep one of the processes. Edit the optimisation file with…

sudo nano /var/www/command/orion_optimize.sh

Look for the following lines (be careful, quite a few similar looking lines, make sure you get the right one!)…

[code]if [ “$2” == “startup” ]; then

kill useless system processes[/code]

… then find the following in that block of code…

killall -9 cron

add a “#” to comment (disable) the killall command so it looks like follows

#killall -9 cron

Save and exit nano.

Right now we need to edit crontab to add our command.

sudo crontab -e

NOTE: we need the script to run as root, hence the sudo. Add this to the end of the file (replacing the mount code with your specific code):

@restart mount.cifs // /mnt/NAS —verbose -o user=USERNAME,password=PASSWORD,rw,iocharset=utf8,sec=ntlm

Save and exit nano

Alternatively, you could have it try to mount every hour if you are losing the mount randomly:

0 * * * * mount.cifs // /mnt/NAS —verbose -o user=USERNAME,password=PASSWORD,rw,iocharset=utf8,sec=ntlm

Or every day at 5:30am if you weren’t restarting every day…:

30 5 * * * mount.cifs // /mnt/NAS —verbose -o user=USERNAME,password=PASSWORD,rw,iocharset=utf8,sec=ntlm

Crontab is quite powerful once you understand how it works. I’ve edited the crontab file to make mine reboot, restart MPD, mount the drive and update MPD once a day, seems to have kept things running smoothly.


I think this might be the code you’ll need (not sure whether you need to add sudo or not):

mkdir /mnt/NAS mkdir /mnt/NAS/NAS chmod -R 7777 /mnt/NAS/NAS

How to “Save and exit nano”

Please understand Linux is complete new for me :blush: :blush:

LeChuck wrote:

I think this might be the code you’ll need (not sure whether you need to add sudo or not):

mkdir /mnt/NAS
mkdir /mnt/NAS/NAS
chmod -R 7777 /mnt/NAS/NAS

Do you have to use enter after every rule, so three enters (I did so)

Or… Copy and paste the three rules at once and then only one enter?

After doing this I could add the NAS again by entering the user/pass-rule.
And Volumio did show the content of the Musicfolder…Happy. But after a reboot it still is showing the content but not playable.
After updating the NAS everything was gone again :cry: :cry:

Save and exit nano: If you look at the bottom of the screen in putty, there are some short cuts to commands. So save = CTRL + O, exit = CTRL + X

You were right about pressing enter after each line of code.

I’m still learning all this as well so hopefully someone more knowledgeable can help. Try following the instructions I gave to mount the NAS every time Volumio starts, see if that fixes it.


I tried to follow your instructions.
Placing the # before the killall -9 cron rule I think its OK.
When I open it for the second time the # is still there so it is saved well.

But editing the crontab is giving problems.
I entered the command sudo crontab -e
The I copied the user/pass-rule at the end of the list that I see
Then ctrl+O
Then you must choose a directoryname or something like that??
I entered yes
Then ctrl+x

I think I do it complete wrong!
Here the crontab list:

Edit this file to introduce tasks to be run by cron.

Each task to run has to be defined through a single line

indicating with different fields when the task will be run

and what command to run for the task

To define the time you can provide concrete values for

minute (m), hour (h), day of month (dom), month (mon),

and day of week (dow) or use ‘*’ in these fields (for ‘any’).#

Notice that tasks will be started based on the cron’s system

daemon’s notion of time and timezones.

Output of the crontab jobs (including errors) is sent through

email to the user the crontab file belongs to (unless redirected).

For example, you can run a backup of all your user accounts

at 5 a.m every week with:

0 5 * * 1 tar -zcf /var/backups/home.tgz /home/

For more information see the manual pages of crontab(5) and cron(8)

m h dom mon dow command

@restart mount.cifs // /mnt/NAS —verbose -o user=nmt,password=1234,rw,iocharset=utf8,sec=ntlm

After I tried to save and exit nano, I think it is going wrong here

Then I see this:

crontab: installing new crontab
“/tmp/crontab.8DxVfg/crontab”:22: bad time specifier
errors in crontab file, can’t install.
Do you want to retry the same edit? (y/n)

What have I done wrong?
Sorry I don’t know anything about Linux and really need “Donkeylanguage”

By the way:
The NAS content is keeping showed after a reboot now but not playable, but this is a little progres!

Hello I am giving: sudo apt-get update and then sudo apt-get install cifs-utils but I get in return ''E: Unable to locate package cifs-utils" , any help?

I couldn’t download cifs-utils because I didnt enter the right dns servers. I tried to mount with cifs-utils and it worked! Currently I am updating my database, I just had edit crontab to give mount command at every startup and I will try later if it works.

Lechuc the problem I think is at “@restart”, when I put just * * * * its saved well. There should be another phrase for “@restart

I think “@restart” should be changed with “@reboot”, I haven’t tried it yet but it should be right

Before I install Volumio 1.3… Has the issue of mounting shares via the GUI been fixed? Or is SSH fiddling still required?

Bump!!! :imp:

It’s not working for me.

When I do a clean install of Volumio and mount a folder from my laptop it works, but not the HDD attached to my Asus router running custom firmware ‘Padavan https://code.google.com/p/rt-n56u/

The first error I get it this ‘mount: cannot mount block device // read-only’

Then I followed some of all the suggestions found in the forum, including installing cifs-utils.
After that the web GUI comes with this error: ‘mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)’

But now I can’t even use the mount from my laptop, after following the instructions in this thread.

Is there any help from the developer?

I’m also having some trouble with this line:

sudo mount.cifs // /mnt/NAS —verbose -o user=USERNAME,password=PASSWORD,rw,iocharset=utf8,sec=ntlm

What is the correct sign before ‘verbose’? Is it a long dash ‘-’ as the above code shows, or just a normal one? or is it a dot ‘.’ as I have seen in other forums?
I keep getting errors with this particularity code.

By the way, I have no problems mounting the HDD in RuneAudio. That just works out of the box.

It’s two dashes.