FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 03-27-2008, 07:28 AM
"Laurent Vaills"
 
Default yum freezes on an NFS mount

Hi.

On my Fedora box I have defined some NFS mount points like this in my /etc/fstab :
<hostname>:/path/to/exported/dir /nfs/mount-point** nfs** user,hard,intr 0 0


But sometimes the machine <hostname> is not powered up.
When I run "yum -y upgrade" it freezes on "Running transaction test" .
So I decided to strace it and I saw it stops at stat64("/nfs/mount-point", ....


My first question is :
- Why yum/rpm has to go in that directory ?
- What are the correct options to put in the fstab in order not to have any process frozen when they try access an NFS directory that does not respond ?


Regards,
Laurent



--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-27-2008, 01:07 PM
Todd Denniston
 
Default yum freezes on an NFS mount

Laurent Vaills wrote, On 03/27/2008 04:28 AM:

Hi.

On my Fedora box I have defined some NFS mount points like this in my
/etc/fstab :
<hostname>:/path/to/exported/dir /nfs/mount-point nfs user,hard,intr 0 0

But sometimes the machine <hostname> is not powered up.
When I run "yum -y upgrade" it freezes on "Running transaction test" .
So I decided to strace it and I saw it stops at stat64("/nfs/mount-point",
....

My first question is :
- Why yum/rpm has to go in that directory ?


Assuming no soft/hard-links are used to obfuscate the location
grep nfs.mount-point /etc/yum.repos.d/*

i.e., do you have a yum repo there?
Or do you have an rpm that installs some files there?


- What are the correct options to put in the fstab in order not to have any
process frozen when they try access an NFS directory that does not respond ?


hard,intr - safe but freezes process until server responds
soft - IO errors to process and process does something sane (in theory)

I highly suggest NEVER use soft with a mount that you have any care for data
integrity. I have seen too many _silent_ data corruptions using soft.
examples of programs that corrupt data on soft: cp, mv, gnome, kde ... well
pretty much everything. The probability of corruption increases reasonably
proportionally with the number of times larger the file is than the
rsize||wsize, i.e., for my tests ([rw]size=4k) I never saw an error with a
file smaller than ~8kB, but I _ALWAYS_ saw corruptions with files bigger than
~100MB. I am not sure if the TCP variant of NFS would cope better than UDP
with soft (I think it should), that is something that would have to be tested
to be really sure.


As suggested in other threads, you might be served by setting up the mount
using the autofs. autofs has the quality that if the mount has not been used
in a while, it is umounted, and if you need it autofs will mount it for you.
For an NFS server that is not expected to be up all the time autofs makes a
lot of sense, because you do not have to remember to umount the uses of it
prior to server shutdown.



--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-27-2008, 01:09 PM
"Patrick O'Callaghan"
 
Default yum freezes on an NFS mount

On Thu, 2008-03-27 at 09:28 +0100, Laurent Vaills wrote:
> Hi.
>
> On my Fedora box I have defined some NFS mount points like this in
> my /etc/fstab :
> <hostname>:/path/to/exported/dir /nfs/mount-point nfs
> user,hard,intr 0 0
>
> But sometimes the machine <hostname> is not powered up.
> When I run "yum -y upgrade" it freezes on "Running transaction test" .
> So I decided to strace it and I saw it stops at
> stat64("/nfs/mount-point", ....
>
> My first question is :
> - Why yum/rpm has to go in that directory ?

Is /nfs/mount-point the actual name of the directory? Is some other part
of your filesystem symlinked into some part of it?

> - What are the correct options to put in the fstab in order not to
> have any process frozen when they try access an NFS directory that
> does not respond ?

It freezes because that's how NFS hard mounts are defined to work when
the remote filesystem is not available. The process will hang for as
long as it takes for the filesystem to come online again. This preserves
Unix filesystem semantics at the cost of possibly having to wait
"forever".

You can use 'soft' instead of 'hard' in the mount options, but be sure
you know what the consequences are -- any access to a file on the
unavailable NFS filesystem will behave as if the file doesn't exist. Is
that what you really want, especially as you don't seem to know what
file(s) are being accessed? What happens if the server changes state in
the middle of the update process? For a yum update it probably isn't
that critical (anything it misses will likely be caught at some future
update) but of course the 'soft' option applies to *all* processes
accessing *all* files on the mounted system.

poc

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 09:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org