Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   nfs filesystems can not be mounted automatically after reboot (http://www.linux-archive.org/ubuntu-user/401990-nfs-filesystems-can-not-mounted-automatically-after-reboot.html)

Karan Grover 07-21-2010 05:23 AM

nfs filesystems can not be mounted automatically after reboot
 
Have you checked out for the nfs client daemons, if they are running on the box. They need to be enabled in the rc scripts so that the filesystems can be mounted in run level 3. also, mark options for nfs mounts to be soft and bg, so that the mounting happens in the background.
Karan Grover





On Wed, Jul 21, 2010 at 10:39 AM, Peng Yu <pengyu.ut@gmail.com> wrote:

Hi,

I have the following fstab. The nfs filesystem can not be
automatically mounted after reboot. I have to run 'mount -a' to mount

them. Does anybody know how to enable automatic mount?

$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier

# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> * <type> *<options> * * * <dump> *<pass>

proc * * * * * */proc * * * * * proc * *nodev,noexec,nosuid 0 * * * 0
# / was on /dev/sda1 during installation
UUID=11bf0413-4054-492e-b5f3-b1b074fc4ea4 / * * * * * * * ext4
errors=remount-ro 0 * * * 1
# swap was on /dev/sda5 during installation

UUID=685e3202-fe16-424f-bf7f-8d562ed29e16 none * * * * * *swap * *sw
* * * * * 0 * * * 0

xxx.xxx.xxx.xxx:/home * */home * nfs * * rw * * *0 * * * 0
xxx.xxx.xxx.xxx:/data * /data * nfs * * rw * * *0 * * * 0

#pearson nfs
yyy.yyy.yyy.yyy:/pearson/data * */pearson/data * nfs * * rw * * *0


--
Regards,
Peng

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Nils Kassube 07-21-2010 06:04 AM

nfs filesystems can not be mounted automatically after reboot
 
Peng Yu wrote:
> I have the following fstab. The nfs filesystem can not be
> automatically mounted after reboot. I have to run 'mount -a' to mount
> them. Does anybody know how to enable automatic mount?

> $ cat /etc/fstab
[...]
> xxx.xxx.xxx.xxx:/home /home nfs rw 0 0
> xxx.xxx.xxx.xxx:/data /data nfs rw 0 0
> #pearson nfs
> yyy.yyy.yyy.yyy:/pearson/data /pearson/data nfs rw 0

I suppose the network is not yet ready when the file systems mentioned
in fstab are mounted. You could add a line "mount -a" to the file
"/etc/rc.local" to do your manual command automatically at the end of
the boot process. This is probably not what you are looking for, but it
might be a workaround if you don't find a better way.


Nils

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Nils Kassube 07-21-2010 06:05 AM

nfs filesystems can not be mounted automatically after reboot
 
Karan Grover wrote:
> Have you checked out for the nfs client daemons, if they are running
> on the box. They need to be enabled in the rc scripts so that the
> filesystems can be mounted in run level 3.

In a standard Ubuntu system, runlevel 3 isn't used. I suppose you are
mixing up things with other distributions.


Nils

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Tom H 07-21-2010 08:49 AM

nfs filesystems can not be mounted automatically after reboot
 
On Wed, Jul 21, 2010 at 1:09 AM, Peng Yu <pengyu.ut@gmail.com> wrote:
>
> I have the following fstab. The nfs filesystem can not be
> automatically mounted after reboot. I have to run 'mount -a' to mount
> them. Does anybody know how to enable automatic mount?
>
> $ cat /etc/fstab
> # /etc/fstab: static file system information.
> #
> # Use 'blkid -o value -s UUID' to print the universally unique identifier
> # for a device; this may be used with UUID= as a more robust way to name
> # devices that works even if disks are added and removed. See fstab(5).
> #
> # <file system> <mount point> * <type> *<options> * * * <dump> *<pass>
> proc * * * * * */proc * * * * * proc * *nodev,noexec,nosuid 0 * * * 0
> # / was on /dev/sda1 during installation
> UUID=11bf0413-4054-492e-b5f3-b1b074fc4ea4 / * * * * * * * ext4
> errors=remount-ro 0 * * * 1
> # swap was on /dev/sda5 during installation
> UUID=685e3202-fe16-424f-bf7f-8d562ed29e16 none * * * * * *swap * *sw
> * * * * * 0 * * * 0
>
> xxx.xxx.xxx.xxx:/home * */home * nfs * * rw * * *0 * * * 0
> xxx.xxx.xxx.xxx:/data * /data * nfs * * rw * * *0 * * * 0
> #pearson nfs
> yyy.yyy.yyy.yyy:/pearson/data * */pearson/data * nfs * * rw * * *0

Add "_netdev" to your nfs mounts in fstab.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Alin-Andrei 07-21-2010 08:54 AM

nfs filesystems can not be mounted automatically after reboot
 
Use this script and it should set up everything for you: http://www.webupd8.org/2010/04/ubuntu-script-to-automatically-mount.html


On Wed, Jul 21, 2010 at 11:49, Tom H <tomh0665@gmail.com> wrote:

On Wed, Jul 21, 2010 at 1:09 AM, Peng Yu <pengyu.ut@gmail.com> wrote:

>

> I have the following fstab. The nfs filesystem can not be

> automatically mounted after reboot. I have to run 'mount -a' to mount

> them. Does anybody know how to enable automatic mount?

>

> $ cat /etc/fstab

> # /etc/fstab: static file system information.

> #

> # Use 'blkid -o value -s UUID' to print the universally unique identifier

> # for a device; this may be used with UUID= as a more robust way to name

> # devices that works even if disks are added and removed. See fstab(5).

> #

> # <file system> <mount point> * <type> *<options> * * * <dump> *<pass>

> proc * * * * * */proc * * * * * proc * *nodev,noexec,nosuid 0 * * * 0

> # / was on /dev/sda1 during installation

> UUID=11bf0413-4054-492e-b5f3-b1b074fc4ea4 / * * * * * * * ext4

> errors=remount-ro 0 * * * 1

> # swap was on /dev/sda5 during installation

> UUID=685e3202-fe16-424f-bf7f-8d562ed29e16 none * * * * * *swap * *sw

> * * * * * 0 * * * 0

>

> xxx.xxx.xxx.xxx:/home * */home * nfs * * rw * * *0 * * * 0

> xxx.xxx.xxx.xxx:/data * /data * nfs * * rw * * *0 * * * 0

> #pearson nfs

> yyy.yyy.yyy.yyy:/pearson/data * */pearson/data * nfs * * rw * * *0



Add "_netdev" to your nfs mounts in fstab.



--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Chris Jones 07-21-2010 09:20 AM

nfs filesystems can not be mounted automatically after reboot
 
Hi,

Had you thought about using automount to manage your NFS mounts ? With
this, they are automatically mounted as and when needed, instead of
focring them to be mounted at boot time (which as others have noted may
be problematic if your network isn't ready). Works much better, in my
opinion.

Just google for "automount nfs", there are plenty of links.

Chris

Peng Yu wrote:
> Hi,
>
> I have the following fstab. The nfs filesystem can not be
> automatically mounted after reboot. I have to run 'mount -a' to mount
> them. Does anybody know how to enable automatic mount?
>
> $ cat /etc/fstab
> # /etc/fstab: static file system information.
> #
> # Use 'blkid -o value -s UUID' to print the universally unique identifier
> # for a device; this may be used with UUID= as a more robust way to name
> # devices that works even if disks are added and removed. See fstab(5).
> #
> # <file system> <mount point> <type> <options> <dump> <pass>
> proc /proc proc nodev,noexec,nosuid 0 0
> # / was on /dev/sda1 during installation
> UUID=11bf0413-4054-492e-b5f3-b1b074fc4ea4 / ext4
> errors=remount-ro 0 1
> # swap was on /dev/sda5 during installation
> UUID=685e3202-fe16-424f-bf7f-8d562ed29e16 none swap sw
> 0 0
>
> xxx.xxx.xxx.xxx:/home /home nfs rw 0 0
> xxx.xxx.xxx.xxx:/data /data nfs rw 0 0
> #pearson nfs
> yyy.yyy.yyy.yyy:/pearson/data /pearson/data nfs rw 0
>
>


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Jordon Bedwell 07-21-2010 09:26 AM

nfs filesystems can not be mounted automatically after reboot
 
On Jul 21, 2010, at 4:20 AM, Chris Jones wrote:Hi,

I have the following fstab. The nfs filesystem can not be
automatically mounted after reboot. I have to run 'mount -a' to mount
them. Does anybody know how to enable automatic mount?

$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> **<type> *<options> ******<dump> *<pass>
proc ***********/proc **********proc ***nodev,noexec,nosuid 0 ******0
# / was on /dev/sda1 during installation
UUID=11bf0413-4054-492e-b5f3-b1b074fc4ea4 / **************ext4
errors=remount-ro 0 ******1
# swap was on /dev/sda5 during installation
UUID=685e3202-fe16-424f-bf7f-8d562ed29e16 none ***********swap ***sw
**********0 ******0

xxx.xxx.xxx.xxx:/home ***/home **nfs ****rw *****0 ******0
xxx.xxx.xxx.xxx:/data /data nfs rw 0 0
#pearson nfs
yyy.yyy.yyy.yyy:/pearson/data ***/pearson/data **nfs ****rw *****0



Personally I would opt to mount it with SSH using a key and rc.d
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Chris Jones 07-21-2010 09:45 AM

nfs filesystems can not be mounted automatically after reboot
 
> Personally I would opt to mount it with SSH using a key and rc.d

For mounting filesystems from *any* network connection I agree, sshfs is
a great tool, I use it myself a lot. However, on a local network with a
cluster of machines with shared logins, home area etc, its an
unnecessary overhead and NFS works just fine, and combining it with
automount is I think more robust in terms of network outage etc. I've
not tried it, but I doubt sshfs could handle the load we put our NFS
servers through....

cheers Chris

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Marius Gedminas 07-21-2010 09:49 AM

nfs filesystems can not be mounted automatically after reboot
 
On Wed, Jul 21, 2010 at 04:49:39AM -0400, Tom H wrote:
> On Wed, Jul 21, 2010 at 1:09 AM, Peng Yu <pengyu.ut@gmail.com> wrote:
> >
> > I have the following fstab. The nfs filesystem can not be
> > automatically mounted after reboot. I have to run 'mount -a' to mount
> > them. Does anybody know how to enable automatic mount?

Been there, done that, cursed Ubuntu to hell and back, wrote cron scripts to
check for NFS mounts and try to remount every hour:

WHAT=server:/path
[ -z "$(grep "$WHAT.* nfs " /proc/mounts)" ] && {
echo "$WHAT is not NFS-mounted, trying to remount"
mount -a -t nfs
[ -z "$(grep "$WHAT.* nfs " /proc/mounts)" ] && {
echo "... mount -a -t nfs didn't help"
}
}

This feels like a server papercut to me.

> Add "_netdev" to your nfs mounts in fstab.

Best answer in this thread, thank you! I had no idea about the _netdev fstab
option. The fstab(5) or mountall(8) manual pages don't mention it.
Google finds a mention in https://help.ubuntu.com/community/SettingUpNFSHowTo

Any ideas about which Ubuntu versions support/require this?

Marius Gedminas
--
QOTD:
"A child of 5 could understand this! Fetch me a child of 5."
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Chris Jones 07-21-2010 09:59 AM

nfs filesystems can not be mounted automatically after reboot
 
> Been there, done that, cursed Ubuntu to hell and back, wrote cron scripts to
> check for NFS mounts and try to remount every hour:
>
> WHAT=server:/path
> [ -z "$(grep "$WHAT.* nfs " /proc/mounts)" ] && {
> echo "$WHAT is not NFS-mounted, trying to remount"
> mount -a -t nfs
> [ -z "$(grep "$WHAT.* nfs " /proc/mounts)" ] && {
> echo "... mount -a -t nfs didn't help"
> }
> }
>
> This feels like a server papercut to me.

This is just a poor mans implementation of part of what automount does
for you ;)

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


All times are GMT. The time now is 07:58 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.