NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

benawhite1's avatar
benawhite1
Aspirant
Feb 27, 2012

Auto-Mount CIFS Share on Boot

How can I mount a CIFS share to a folder on my ReadyNAS NV+ when it boots.
I can log in manually an execute the following command, but I would like this to be done automatically on boot.
Sorry for the noob question.

mount -t cifs //server/share /c/media/remoteshare -o username=user,password=pass


Thanks in advance

7 Replies

Replies have been turned off for this discussion
  • benawhite

    I understand that you would like to mount a share to a folder when the ReadyNAS boots. Are you wanting a mapped drive? What operating system are you using? There are many ways this can be done, and it depends on what system you are using.
  • I was trying to add a shared folder from another Linux machine on to my ReadyNAS NV+.
    I wanted to then use the built in Media Server to make that content available along side my other content stored on my ReadyNAS.
    I was hoping I could then configure my ReadyNAS to mount this on every boot.

    It seems the DLNA server does not scan this content though, so I'm not sure that mounting this share will help now.
    I would still be interested on how to mount it on boot, but it has less value now.
    Any Ideas?
  • You should be able to add the folder to ReadyDLNA in Frontview, no idea about other media servers though.

    If I wanted to mount the remote share on boot I'd add it to /etc/fstab, but you have to realise that this sort of meddling may effect your warranty and support contract if you have one.
  • benawhite

    I agree with John Bean. I too would use /etc/fstab to do so. If you need a greater understanding of the command, there is a decent article on wikipedia about it.
  • Unfortunately modifying the fstab file on a Readynas unit is not advisable as it has been shown to be an unreliable method of mounting external volumes due to the way that file seems to get manipulated by the ReadyNAS firmware

    Better to add a shell script to /etc/rc2.d which will always be called on boot and also be unaffected by firmware updates
  • Yep, sounds like a much safer solution. My suggestion was theoretical but having looked at fstab on my Duo I see that it adds (and presumably removes) things like mounted USB drives to fstab, so it's probably best left alone.
  • Thanks for the tip, this worked just as I had hoped.
    I was even able to share the content of my remote share from the ReadyNAS DLNA server.
    Thanks!

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More