Solved

AIX: mounting filesystems

Posted on 2001-07-03
11
2,037 Views
Last Modified: 2012-05-04
I have an annoying startup problem. We are running all kinds of AIX 4s (4.1.5 - 4.3.3). AT startup we are mounting a couple of filesystems (one of the entries from /etc/filesystems:

/home/ep1/cron_reposit:
        dev             = "/home/ep1/cron_reposit"
        vfs             = nfs
        nodename        = earth
        mount           = true
        options         = bg,hard,intr,timeo=3,retry=3
        account         = false
)

Now although we are setting the timeout and the retry value for the mount, it takes always 10 minutes or so for each filesystem that is not available. Because of our strange configuration (no automount, local build directories) a restart of the servers after a power outage takes veeeeery long, since the clients we have to mount are not up yet.
Does anybody have a clue how to fix that problem?

I will be out for the rest of the week, but I promise to get to you ...

======
Werner
0
Comment
Question by:griessh
  • 6
  • 2
  • 2
  • +1
11 Comments
 
LVL 4

Expert Comment

by:newmang
ID: 6250741
Werner

The problem is that you use a "hard" option which dictates that the mount does not return until the operation succeeds and you infer a fg option (default) which means that the mount operates in foreground if the first mount attempt fails.

You could either change hard to soft so the mount returns an error if it fails then retry the mount manually or explicitly code the bg option so the mount continues in background if the first attempt fails.

Refer to the mount man page

Cheers - Gavin
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6251547
as newmang said: use soft instead of hard
It also prewvents your hanging your server if the mounted fs is temporarily unavailable ;-)
0
 
LVL 11

Author Comment

by:griessh
ID: 6252877
Thanks newmang

As I said I am out of office until Monday, but then I'll try it. Everything you explain sound reasonable.

======
Werner
0
 
LVL 11

Author Comment

by:griessh
ID: 6265673
The 'fg' is the default, but as you might see, I am actually using the 'bg' option.

The 'hard/soft' sounded intrigueing, but the behaviour doesn't change. Even with

 options = bg,soft

the system hangs if the other system is powered down. I looked up man pages for "mount" and "filesystems" and was surprised that the "filesystems" doesn't tell me about the "options" attribute (although these options show up right when I run the 'mount' command).

Any more ideas where to look at?

Thanks
=======
Werner
0
 
LVL 4

Expert Comment

by:newmang
ID: 6267239
I'm sorry, I read into your post that the problem was when your system started up and the NFS server was not available. In these cases the soft and bg options do apply.

These options apply to the mount command and therefore would not apply once the mount has completed and the server then went down which is the situation your later posts infer.

In these situations it would depend on the nfs client timeout variables, I've looked through smit and can't find a reference to nfs client timeouts. I suspect you'll have to find an NFS reference for more info if no-one else posts anything here

Cheers - Gavin
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 11

Author Comment

by:griessh
ID: 6267463
Gavin

I think you were right in the beginning. Let's just set up a scenario:

It is Monday morning, I am firing up my AIX system called 'neptune' (I usually shut down for the weekend). My neighbor box 'earth' is still down (I am the first one to come in :-).
The 'mount all' command is started from the /etc/rc file. According what you and the man pages tell me, by changing the 'options' in my stanza in rc to 'bg,soft', I should not see the 10 minute wait for /home/ep1/cron_reposit failing to mount. But that is exactly what happens. It looks like mount doesn't care about fg/bg and hard/soft. The disturbing part is I saw that under 4.1.5, 4.3.2 and now under 4.3.3 again. I just thought somebody might have the same problem ... and knows where to tweak the mount.

======
Werner
0
 
LVL 11

Author Comment

by:griessh
ID: 6267465
Oh, BTW, the fileserver doesn't behave any different than these clients ...

======
Werner
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6269725
simple question: did you restart the NFS server after changing to  bg,soft ?
0
 
LVL 11

Author Comment

by:griessh
ID: 6270202
simple answer: shutdown -Fr :-)
0
 
LVL 11

Author Comment

by:griessh
ID: 6783560
I will ask CS to PAQ this question now.

Several people tried to solve that problem (it's not my problem only anymore ...) but none of the option work. My workaround is:


In the /etc/filesystems I only set local filesystems
mount=true

For all external filesystems I created a new
type=remote_server

Since 'mount all' is run from rc (that is of action type 'wait' in inittab) the initial mount process works without problems. I created a new entry in inittab 'mount' of action type 'once' (could also be respawn) to call a script that does the 'mount -t remote_server'. This script is able to run in the background.
This way you get to your login prompt even if the box is still waiting for remote systems.

======
Werner
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 6784140
points reduced to 0 and placed in PAQ.
Thank you
Computer101
Community Support Moedrator
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now