Operating System - HP-UX
1838703 Members
3718 Online
110128 Solutions
New Discussion

Re: Problem trying to extend /usr

 
Peter Caddy
New Member

Problem trying to extend /usr

Hi
I am trying to extend /usr. I rebooted to single user mode, then ran lvextend on lvol7. When I try to run extendfs it fails, saying cannot extend a mounted fs. If I try and unmount the file system, I get the error cannot unmount /usr : block device required

Any ideas on how I can progress? Unfortunately I forgot to note how big the LV was before extending it
8 REPLIES 8
Mauro Gatti
Valued Contributor

Re: Problem trying to extend /usr

You can extend a logical volume "online" (that mans You can do a "lvextend" on a mounted logical volume) but You can't extend filesystem (that means You can't do a "extendfs") on a mounted lv.
The only way You have to extend a filesystem "online" is to use "Online JFS" that is a licesend HP product.
When you extend a FS using "extendfs" You must use r-named-special file.
If You have Online JFS "fsdm" needs directory name.

RGDS
Ubi maior, minor cessat!
Mark Grant
Honored Contributor

Re: Problem trying to extend /usr

One thing I noticed once whilst trying to unmount /usr in single user mode was that I ran a "bdf" before doing anything else. This used a library that was in /usr so I couldn't unmount it. In other words, make sure the first thing you do is unmount /usr.

Alternatively I once increased the logical volume (which you can do online) and then put the "extendfs" command in the startup scripts before it attempts to mount /usr. This means that you can set it all up, re-boot, and the filesystem is increased as it comes up.
Never preceed any demonstration with anything more predictive than "watch this"
Pete Randall
Outstanding Contributor

Re: Problem trying to extend /usr

Your /usr got mounted some where along the line and you need to get it unmounted. Simply reboot again into single user mode and run your extendfs command from there.


Pete

Pete
Peter Caddy
New Member

Re: Problem trying to extend /usr

I found another forum message where someone else got the block device required message. In that one, there had been a problem unmounting the /usr file when the system was shutdown before the reboot, and the entry for /usr had not been taken out of the /etc/mnttab file (or something like that). As a result, some commands thought the /usr filesystem was mounted when it wasn't. I was able to mount the file system, then unmount it. Then I was able to extendfs successfully
Bill Kimbell
Advisor

Re: Problem trying to extend /usr

If you haven't purchased online JFS then you can reboot (do a setboot -b off) and at the ISL prompt type in: hpux -is. This will boot the system without mounting any logical volumes. Type in mount -a to mount lvol's (you can do a bdf at this point to see the size of /usr) then umount /dev/vg00/lvol7 which will take /usr offline and allow you to do an lvextend and then an extendfs. Do a bdf to confirm the new size and then reboot.
(/var requires the same approach)
Bill
Tim D Fulford
Honored Contributor

Re: Problem trying to extend /usr

Boot into single user mode, and extend filesystem in single user mode (i.e. /usr is not mounted yet!)

# shutdown -r -y now
at press any key to interupt boot sequence, do so...
ISL> boot
ISL> interact with ISL prompt> y
ISL> hpux -is
# vgchange -a y vg00
# extendfs -F vxfs .... ...
# init 3

Regards

Tim
-
Suresh Patoria
Super Advisor

Re: Problem trying to extend /usr

Hi

1) shutdown -ry 0

2) Interrupt the system by pressing the space bar and boot with ISL

3)ISL>hpux -is

4)umount the /usr
#exec umount /usr

5)set the shell to use the commands
#unset HISTFILE
#exec sh

6>lvextend -L <> /dev/vg00/lvol7

7>extendfs /dev/vg00/rlvol7

8>shutdown -ry 0

Thanx
Elmar P. Kolkman
Honored Contributor

Re: Problem trying to extend /usr

Or reboot to LVM maintenance mode (-im) next time you want to do this instead of single user mode. The commands you need (extendfs and lvextend) are both in /sbin.
Every problem has at least one solution. Only some solutions are harder to find.