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 > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 01-26-2011, 11:31 AM
John Hodrien
 
Default how to unmount an NFS share when the NFS server is unavailable?

On Wed, 26 Jan 2011, Rudi Ahlers wrote:

> That won't really work. The NFS clients run cPanel and we need a way
> for end-users to have full access to their backups all the time. We
> used to run backup over FTP, but then when a client wanted to restore
> data one of the techs first had to download it from the backup server
> and then let the client restore it. So I'm trying to cut down on
> unnecessary support tasks.

Double check that autofs isn't what you want, as I suspect you're wrong in
discounting it. With autofs, a user is free to access files in a currently
unmounted nfs path, as autofs will mount it dynamically as required. But it
generally copes a lot better than just static NFS mounts.

jh
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-26-2011, 01:10 PM
Paul Heinlein
 
Default how to unmount an NFS share when the NFS server is unavailable?

On Wed, 26 Jan 2011, Les Mikesell wrote:

>> That won't really work. The NFS clients run cPanel and we need a
>> way for end-users to have full access to their backups all the
>> time. We used to run backup over FTP, but then when a client wanted
>> to restore data one of the techs first had to download it from the
>> backup server and then let the client restore it. So I'm trying to
>> cut down on unnecessary support tasks.
>
> I don't see why the automounter wouldn't work for this, but you can
> mount with the soft,bg options to keep from hanging.

You need to be completely sure that 100% of your apps know how to
handle I/O errors before using soft mounts.

Errors in hard-mounted NFS filesystems will produce hanging
applications, which are admittedly a pain, but the apps will stop
issuing i/o calls until the filesystem returns. An app can never be
fooled into think a write or read operation succeeded when it didn't.

Soft-mounted filesystems, however, return error codes that
applications can (and most often do) ignore, resulting in all sorts
file corruption.

--
Paul Heinlein <> heinlein@madboa.com <> http://www.madboa.com/
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-26-2011, 09:55 PM
"Dr. Ed Morbius"
 
Default how to unmount an NFS share when the NFS server is unavailable?

on 10:23 Wed 26 Jan, Rudi Ahlers (Rudi@SoftDux.com) wrote:
> Hi All,
>
> How do I unmount an NFS share when the NFS server is unaivalable?
>
> I tried "umount /bck" but it "hangs" indefinitely
> "umount -f /bck" tells me the mount if busy and I can't unmount it:
>
> root@saturn:[~]$ umount -f /bck
> umount2: Device or resource busy
> umount: /bck: device is busy
> umount2: Device or resource busy
> umount: /bck: device is busy
>
> This non-working NFS share is causing problems on the server and I
> need to unmount it until such a time when the NFS server (faulty NAS)
> is repaired.

The specific solution is 'umount -fl <dir|device>'.

The general solution's a little stickier.

I'd suggest the automount route as well (you're only open to NFS issues
while the filesystem is mounted), but you then have to maintain
automount maps and run the risk of issues with the automounter (I've
seen large production environments in which the OOM killer would
arbitrarily select processes to kill ....).

Monitoring of client and server NFS processes helps. If it's the filer
heads which are failing, and need warrants it, look into HA failover
options.

Soft mounts as mentioned won't hange processes, but may result in data
loss. This is most critical in database operations (where atomicity is
assumed and generally assured by the DBMS). If the issue is one of
re-running a backup job, and you can get a clear failure, risk would be
generally mitigated.

--
Dr. Ed Morbius
Chief Scientist
Krell Power Systems Unlimited
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-27-2011, 06:54 AM
John Hodrien
 
Default how to unmount an NFS share when the NFS server is unavailable?

On Wed, 26 Jan 2011, Dr. Ed Morbius wrote:

> I'd suggest the automount route as well (you're only open to NFS issues
> while the filesystem is mounted), but you then have to maintain
> automount maps and run the risk of issues with the automounter (I've
> seen large production environments in which the OOM killer would
> arbitrarily select processes to kill ....).

Once you're into an OOM state, you're screwed anyway. Is turning off
overcommit a sane option these days or not?

jh
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-27-2011, 01:55 PM
 
Default how to unmount an NFS share when the NFS server is unavailable?

Rudi Ahlers wrote:
> On Thu, Jan 27, 2011 at 3:00 PM, Les Mikesell <lesmikesell@gmail.com>
> wrote:
>> On 1/27/11 12:57 AM, Rudi Ahlers wrote:
>>>
>>>> Actually, since the original question involved access to backups, I
>>>> should have given my usual answer which is that backuppc is the thing
<snip>
> It currently backs up everything over FTP, and works fairly well but
> when a user wants to restore a broken website one of our techs needs
> to download the backup from the FTP server, to the cPanel server and
> then restore it on the client's behalf.
>
> Thus, mounting the NFS share basically added enough storage to the
> cPanel todo the backups "locally", and then the users can restore the
> backups themselves by logging into cPanel. i.e. all the necessary
> security checks are performed automatically.
<snip>
Well, I wouldn't be running ftp, anyway, but may I offer an alternative?
How 'bout either rsync or scp; have the users' backups in their own
directories, and set up ssh keys, and then give them a canned script to
run, so that
a) they say, AUGH! Website bad! Gotta restore!
b) they go to cPanel, to the, what's it called, system maintenance? page,
then are offered an icon that brings of a page that allows them to
select one or more directories, or the whole site,
c) clicking a <restore> button rcyncs or sftp's it over, from the backup
directory that's owned by them to their site, with no passwords
needed?

mark "ftp bad, *so* 1980's/early '90s, when the 'Net was a better
place"


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-27-2011, 08:23 PM
"Dr. Ed Morbius"
 
Default how to unmount an NFS share when the NFS server is unavailable?

on 07:54 Thu 27 Jan, John Hodrien (J.H.Hodrien@leeds.ac.uk) wrote:
> On Wed, 26 Jan 2011, Dr. Ed Morbius wrote:
>
> > I'd suggest the automount route as well (you're only open to NFS issues
> > while the filesystem is mounted), but you then have to maintain
> > automount maps and run the risk of issues with the automounter (I've
> > seen large production environments in which the OOM killer would
> > arbitrarily select processes to kill ....).
>
> Once you're into an OOM state, you're screwed anyway. Is turning off
> overcommit a sane option these days or not?

Our suggested fix was to dramtically reduce overcommit, or disable it.
I don't recall what was ultimately decided.

Frankly, bouncing the box would generally be better than letting it get
in some weird wedge state (and was what we usually ended up doing in
this instance anyway). Environment was a distributed batch-process
server farm. Engineers were disciplined to either improve memory
management or request host resources appropriately.

Now, if you were to run monit, out of init, and restart critical
services as they failed, you might get around some of the borkage, but
yeah, generally, what OOM is trying to tell you is that you're Doing It
Wrong[tm].

--
Dr. Ed Morbius
Chief Scientist
Krell Power Systems Unlimited
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 12:57 PM.

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