Operating System - HP-UX
1827855 Members
1455 Online
109969 Solutions
New Discussion

Extending /var in single user mode: umount error

 
Con O'Kelly
Honored Contributor

Extending /var in single user mode: umount error

Hi

Last night I extended /var FS. I booted into single user mode (hpux -is). I thought in single user mode only / FS was mounted. However I ran mount command and it showed / /stand /var & /usr were all mounted. /etc/mnttab also showed these FS's as mounted. However I couldn't unmount /var as it gave an error message saying "can't unmount /var block device required.

In the event I didn't have a problem as i did an lvextend, extendfs on /var, mountall and it worked perfectly.

I'm curious as to this behaviour. I suspect that the /var, /usr were not really mounted but mount was giving incorrect info?
Am I missing something or does anyone have an explanation.

Cheers
Con
10 REPLIES 10
Patrick Wallek
Honored Contributor

Re: Extending /var in single user mode: umount error

Did you actually boot into single user mode (shutdown -ry 0, interrupt boot, etc..) or did you just do 'shutdown' to go down to single-user mode?

If you booted up into single-user then nothing should have been mounted. I don't know why anything would have been mounted.

If you shutdown into single-user mode, then yes, things could still be mounted since not everything has shutdown and there are still some processes accessing some of the mount points.

If you need to get into single-user mode ALWAYS shutdown (shutdown -ry 0) and come up into it. That is the safest.
Con O'Kelly
Honored Contributor

Re: Extending /var in single user mode: umount error

I did boot into single user mode (ie shutdown -ry, interupted boot & then ran hpux -is from ISL prompt.)
I expected only to see / mounted but the other 3 FS's mentioned in my previous post were also mounted - at least that's what mount reported. Any ideas?

Cheers
Con
Michael Tully
Honored Contributor

Re: Extending /var in single user mode: umount error

Con,

Check the content of /etc/fstab for the run level for the mounting of filesystems.
The only ones that should be mounting at single user level is / and /stand
Make sure that the others (/usr /var /opt /tmp have an entries like this.)

/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /opt vxfs delaylog 0 2
/dev/vg00/lvol5 /tmp vxfs delaylog 0 2
/dev/vg00/lvol6 /usr vxfs delaylog 0 2
/dev/vg00/lvol7 /var vxfs delaylog 0 2

Unfortunately you'll have reboot into single-user mode again :(

Regards
Michael

Anyone for a Mutiny ?
Con O'Kelly
Honored Contributor

Re: Extending /var in single user mode: umount error

Hi Michael
Thanks for that.
/etc/fstab looks normal as per your reply. Is the last field the run level where FS's are mounted, I thought it was the order in which they were checked by fsck (or does this amount to the same thing?).
I feel its possible mount was incorrect as if /var was really mounted, I shouldn't have been able to run extendfs??

Cheers
Con
Michael Steele_2
Honored Contributor

Re: Extending /var in single user mode: umount error

Check your /etc/fstab file and verify that you are not using /dev/vg00/rlvol8.

Other tries:

0) check for syncer daemon from single user mode. syncer updates file systems every 30 seconds by flushing RAM out to disk and also updates /etc/mnttab. 'syncer' should be seen from the console as:

Start syncer daemon
Output from "/sbin/rc1.d/S520syncer start":

Note any options like -s or -d are not the norm.

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B9106-90008/B9106-90008_top.html&con=/hpux/onlinedocs/B9106-90008/00/04/404-con.html&toc=/hpux/onlinedocs/B9106-90008/00/04/404-toc.html&searchterms=init%7csyncer&queryid=20030618-192710

http://docs.hp.com/cgi-bin/onlinedocs.py?mpn=B9106-90008&service=hpux&path=00/04/404&title=HP-UX%2011i%20Version%201.5%20Reference%20Volume%202%2C%20Section%201M

Other possibilities:

1) umount /dev/vg00/lvol8

2a) mv /etc/mnttab /etc/mnttab_old
2b) mount -a (* rebuild mnttab *)

3a) vgscan -a -v -p (* -p preview *)
3b) strings /etc/lvmtab
3c) cp /etc/lvmtab /etc/lvmtab_old
3d) vgscan -v -a

lsof /var from single user mode. You'll have to mount /usr to use it.

Note: (* ENOTBLK block device required error 15 *)
Support Fatherhood - Stop Family Law
Con O'Kelly
Honored Contributor

Re: Extending /var in single user mode: umount error

Thanks Michael, I've looked into the suggestions you made & all appears normal.
As I said I don't have any issues now as it all worked.
I was more curious as to why the FS's were reported as being mounted when I'm fairly sure they weren't - otherwise I shouldn't have been able to run extendfs(??). Just wondered if anyone had seen this situation before. Thanks for the help.

Cheers
Con


K.Vijayaragavan.
Respected Contributor

Re: Extending /var in single user mode: umount error

I think it is because of the difference between the runlevels 1 and S.

both are single user modes but has some difference.

runlevel S may have, all the filesystems except /stand and / should be unmounted.

runlevel 1 may have some more file system as well.

"Let us fine tune our knowledge together"
Con O'Kelly
Honored Contributor

Re: Extending /var in single user mode: umount error

I booted into single user using hpux -is from ISL therefore assumed only / & /stand should be mounted.
What I discovered by looking in /etc/rc.log.old is that umount failed for /var & /usr when I shutdown the system (shutdown -ry 0). I assume as a result they left an entry in /etc/mnttab. Hence when the system came back up it thought these 2 FS's were mounted due to entries in /etc/mnttab.
As I said I had no problems extending /var but was curious as to why the mount command reported /var & /usr as mounted.

Cheers
Con
Jdamian
Respected Contributor

Re: Extending /var in single user mode: umount error

Hi, Con.

I suffered this problem too some time ago.
I realized /usr wasn't really mounted because some commands cannot be found. Then I typed:

# cd /usr/bin
# ls

but no file was found...

The problem, as you have explained, is due to failed unmount in shutdown... some time ago, my HP account engineer persuaded me to install VxFS patches because, in some situations, umount_vxfs may hang... It was true. These umount problems ocurred in several boxes (in both testing and production systems). Thus I suggest to install VxFS patches.

Jerome Baron
Respected Contributor

Re: Extending /var in single user mode: umount error

Hi Con,

It seems as if init() is using some memory mapped files during shutdown, which causes the file system(s) to appear to be busy.
So at shutdown filesystem aren't properly unmount.
This failing umount is unlikely to be a problem, however, be aware that this
could result in a longer startup time, as these filesystems are probably NOT being marked CLEAN on shutdown. If the filesystems are of type HFS, the fsck will inevitably take a considerable time during startup (VxFS doesn't have this problem, being able to use log replay).

Regards,
Jerome