Operating System - HP-UX
1836462 Members
2525 Online
110101 Solutions
New Discussion

Extending filesystem size

 
SOLVED
Go to solution
Francisco Mancardi_1
Frequent Advisor

Extending filesystem size

I have read one question (and teh answers) regarding this issue, but I have problems.

Steps I have followed. (extending /tmp)

1. command line login as root
2. init S ( Am I really going single user ??)
3. lvextend -L 100 /dev/vg00/lvol7
4. umount /tmp
-> device busy
5. fuser /tmp
tmp:
why then I can?t umount /tmp ?

6. reboot
7. command line login as root
8. lvdisplay shows the increase of size
9. reboot
10. Stop boot sequence
11. bo pri
11 interact ? Yes
12 hpux -lm
13 extendfs -F vxfs /dev/vg00/lvol7
cannot open /dev/vg00/lvol7

What is wrong ?

Best Regards
Francisco
9 REPLIES 9
Christopher Caldwell
Honored Contributor

Re: Extending filesystem size

vgchange -a y /dev/vg00
Bill McNAMARA_1
Honored Contributor

Re: Extending filesystem size

the vg is not active because your in lvm maintenance mode

vgchange -a y vg00

extendfs then

You don't need to hpux -lm
hpux -is is just as good.

Later,
Bill
It works for me (tm)
Kenneth Platz
Esteemed Contributor

Re: Extending filesystem size

Francisco:

Either of the following sequences of commands should be able to extend your /tmp partition:

1) Determine what logical volume your /tmp filesystem is mounted on:

# bdf /tmp

2) Shut down to single-user mode:

# shutdown

3) Kill all processes that have files open on the /tmp filesystem:

# fuser -k /tmp

4) Extend the /tmp volume group:

# lvextend -L /dev/vg00/lvolXX

5) Extend the filesystem associated with tmp. Note, you need to use the RAW device here:

# extendfs -F vxfs /dev/vg00/rlvolXX

Alternatively, if you boot your system into single-user mode (do not use LVM maintenance mode), you can simply do steps 4 and 5.

I hope this helps.
I think, therefore I am... I think!
boley janowski
Trusted Contributor

Re: Extending filesystem size

first, as im sure you read, install online jfs if you can, this will save you a world of work. next when you boot, hpux -im (im not that familiar with going into this mode i would suggest going into hpux -is, then finally why check and make sure the command your calling sees the path correctly, at single user mode with everything not mounted you will usually need to use the /sbin path, im sorry i cant be more specific, its been so long sence i hade to extend and lvol from single user mode. anyway consider it.

good luck
James R. Ferguson
Acclaimed Contributor

Re: Extending filesystem size

Hi:

You can't unmount a filesystem that is in use, hence the "device busy" message. /tmp is likely to be inuse by root processes. To see what/who is using the filesystem, do this:

# fuser -cu

To look and kill do:

# fuser -cuk

My preference, rather than to try and drop to single user mode is to bootup into single user mode. I find you have better control in situations like you describe.

Next, as to your second error, the 'extendfs' command should specifiy the *raw* device:

# extendfs -F vxfs /dev/vg00/rlvol7

...JRF...
Patrick Wallek
Honored Contributor

Re: Extending filesystem size

To answer the first part of your question - you couldn't umount /tmp after your 'init s' because there were still some processes useing /tmp for stuff. You could have done an 'fuser -cu /tmp' and it would have told you all of the processes that were using /tmp. You then could have killed all of those processes and then unmounted /tmp.

The easiest way I have found to get to single-user mode and to make sure there are no extraneous processes running is to just do a reboot, interact with the boot and do an 'hpux -is'. To extend a filesystem you would then have to do the 'vgchange -a y /dev/vg00'.
Kofi ARTHIABAH
Honored Contributor

Re: Extending filesystem size

Instead of /dev/vg00/lvol7 (in step 13) it should be /dev/vg00/rlvol7

check the man on extendfs.

you should have tried (in steps 1-5)
# fuser -ku /tmp ; fuser -ku /dev/vg00/lvol7
# umount /dev/vg00/lvol7

good luck.
nothing wrong with me that a few lines of code cannot fix!
Rita C Workman
Honored Contributor

Re: Extending filesystem size

FIRST THING:
If you have Online JFS than you can extend /tmp on the fly with the lvextend and fsadm commands
lvextend -l xxx /dev/vgxx/lvol7
fsadm -F vxfs -b xxxx /tmp
BUT IF YOU DON'T HAVE ONLINE JFS then
When you type S...your in single user, but everything is still mounted (and probably busy).
If you attempt to umount /tmp you could run into some headaches (I forced it down once...ouch!!)

Another way to extend is to reboot and interupt the boot.
boot admin> bo pri ipl
ISL> hpux -is
interact> yes

Now the only thing mounted is /. I generally mount /usr and /var (so I have certain commands to check my work) and at this point I would do the lvextend and then extendfs as usual and then you can check your work with vgdisplay...when you're done...reboot.

Regards,
Rita
Shannon Petry
Honored Contributor
Solution

Re: Extending filesystem size

Some of this is here, but really you have to look at your process. It is not correct for what you need to do.

1. reboot
2. Interupt the boot process by holding any key (older systems may require the escape key, or break key)

3. at the boot prompt type
>boot pri

4. The system should ask then if you want to interacet with ISL. Type
>y

5. at the ISL prompt, type
>hpux -is

This is the only way besides modifying the default run level in iniitab to get HP_UX into single user mode.

6. You should not have to log in, as single user mode will start you in "/sbin/sh"
So if you have a login screen, you either did something wrong, your not on HP-UX, or your systems is trashed!

7. Type
>vgchange -a y

8. /tmp is usually mounted from /dev/vg00/lvol5. so to allocate more space for /tmp type.
>lvextend -L $MM /dev/vg00/rlvol5

$MM is the NEW size in MB total! not the space you want to add. I.E. if you have 128mb now, and wanted 256mb, you would use
>lvextend -L 256 /dev/vg00/rlvol5

It should tell you whether it succedded or failed. Normal failures are caused by lack of capacity in vg00 to accomodate the new space.

9. Extend the file system to new capacity.
>extendfs /dev/vg00/rlvol5

Again, you should see a message for success or failure.

10. mount /tmp and /usr so that you can use bdf to verify the change.
> mount /tmp
> mount /usr
> bdf /tmp
Should tell you the capacity at your new size.

If you follow these steps, you will either succed, or fail with knowlege of why it failed. I.E see item 8.

Regards,
Shannon
Microsoft. When do you want a virus today?