Author Topic: load nas server SOLVED  (Read 331 times)

Offline tm

  • Full Member
  • ***
  • Posts: 155
load nas server SOLVED
« on: March 19, 2013, 06:00:12 AM »
Good Morning to All
    I hope this is in the correct forum. I have been with you for years and have a working knowledge of GUI-kde.  I have a freenas server that I backup data from time to time. The problem is when I boot my system up the server is unmounted. I go into console as root and type" mount -t nfs 192.xxx.xxx.xxx:/mnt/server /mnt and all is fine . The server is ready to go. Is there some kind of SCRIPT (I know the word but have no idea how it works or what to do) that I can just start to mount the server . Any other thoughts would be appreciated. I realize this is not a specific software problem but this particular forum has been extremely helpful in my pclinux education
                                                                                                                                    tom
« Last Edit: March 22, 2013, 06:27:32 PM by tm »

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11071
  • MLUs Forever!
Re: load nas server
« Reply #1 on: March 19, 2013, 06:21:15 AM »
Configue your computer (PCC) - Network Sharing - access whatever type share the NAS is using?

In this case NFS  ;)


« Last Edit: March 19, 2013, 02:22:24 PM by Just17 »
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2343
Re: load nas server
« Reply #2 on: March 19, 2013, 01:28:12 PM »
Good Morning to All
    I hope this is in the correct forum. I have been with you for years and have a working knowledge of GUI-kde.  I have a freenas server that I backup data from time to time. The problem is when I boot my system up the server is unmounted. I go into console as root and type" mount -t nfs 192.xxx.xxx.xxx:/mnt/server /mnt and all is fine . The server is ready to go. Is there some kind of SCRIPT (I know the word but have no idea how it works or what to do) that I can just start to mount the server . Any other thoughts would be appreciated. I realize this is not a specific software problem but this particular forum has been extremely helpful in my pclinux education
                                                                                                                                    tom
The simplest way might be to add the known working mount command (from above) to the end of the file "/etc/rc.local"

That's what I did.   You'll need root privileges to edit it.  Make sure you leave a blank line at the end of the file.

Retired Senior Chief, Retired Software Engineer, Active GrandPa

Offline Roc4fun

  • Hero Member
  • *****
  • Posts: 619
  • The life so short, the craft so long to learn
Re: load nas server
« Reply #3 on: March 20, 2013, 06:01:44 AM »
Hi Chief,  I'm interested in your tip about mounting from rc.local.  Would I need to manually umount the share on reboot or shutdown?

TIA,

Dave

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2343
Re: load nas server
« Reply #4 on: March 20, 2013, 07:51:15 AM »
Hi Chief,  I'm interested in your tip about mounting from rc.local.  Would I need to manually umount the share on reboot or shutdown?


Nope.  rc.local gets executed on start up.  It is the script for any local customizations you want to run on each start up.  Unmounting isn't necessary, as that is automatic.  All mounted volumes are unmounted  (dismounted?) as part of normal shutdown.

Retired Senior Chief, Retired Software Engineer, Active GrandPa

Offline tm

  • Full Member
  • ***
  • Posts: 155
Re: load nas server
« Reply #5 on: March 20, 2013, 10:42:34 AM »
Chief  
  I am a little confused about your statement . Could you please write it out. this is on the mount -t nfs 192.xxx.xxx:/mnt/server  /mnt (command )  Thanks  tom
« Last Edit: March 20, 2013, 10:49:03 AM by tm »

Offline Roc4fun

  • Hero Member
  • *****
  • Posts: 619
  • The life so short, the craft so long to learn
Re: load nas server
« Reply #6 on: March 21, 2013, 05:51:09 AM »
Hi tm,  What Chief is saying is to insert your working mount command as a line in your /etc/rc.local file.  You will have to edit it as root.  Chief suggests leaving a blank line at the end of the file.  On subsequent reboots your share should be auto mounted.

If your command works for you, great.  I'm not a command line guru, but my understanding of mounting network shares looks like this...

"mount -t file-system //ipaddress/share /mount/point"

HTH,

Dave

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2343
Re: load nas server
« Reply #7 on: March 21, 2013, 08:29:45 AM »
Quote
I'm not a command line guru, but my understanding of mounting network shares looks like this...

"mount -t file-system //ipaddress/share /mount/point"

Neither am I, but I just used (in rc.local):

Code: [Select]
# Force mounting of the NAS folders.
mount //192.168.1.30/chuck
mount //192.168.1.30/Public

One public folder, one private folder.  But, that works, probably, because I also added them to fstab:

Code: [Select]
# Entries for MyBookLive :
//192.168.1.30/Public /home/chuck/NAS-Public cifs username=chuck,password=boogie,uid=chuck,defaults 0 0
//192.168.1.30/chuck /home/chuck/NAS-Chuck cifs username=chuck,password=boogie,uid=chuck,defaults 0 0

Since I did  that, it might well have also been possible to have them automount from fstab, same as the partitions on the internal hard drive, but I knew I could force it in rc.local, and it works just fine.  I also could have placed the mount points elsewhere, in /mnt or /media, for example.

Mu original point was that anything that works from the command line, will work exactly the same when placed in rc.local.

Retired Senior Chief, Retired Software Engineer, Active GrandPa

Offline tm

  • Full Member
  • ***
  • Posts: 155
Re: load nas server
« Reply #8 on: March 22, 2013, 06:27:08 PM »
to all
    tried it in rc.local but no luck. there was a file in the same folder "nfs server" installed it in there and it worked perfectly. Thanks ,you all are the best
                                     tom

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2343
Re: load nas server
« Reply #9 on: March 23, 2013, 03:17:49 PM »
to all
    tried it in rc.local but no luck. there was a file in the same folder "nfs server" installed it in there and it worked perfectly. Thanks ,you all are the best
                                     tom

Glad we were able to help.   :D

Retired Senior Chief, Retired Software Engineer, Active GrandPa