Operating System - HP-UX
1752788 Members
6387 Online
108789 Solutions
New Discussion юеВ

Can I extend file system on-line

 
Steven Chen_1
Super Advisor

Can I extend file system on-line

I am using HPUX 10.20 and I would like to know if I am able to extend file system on-line. The followings are fstab and bdf results:

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

bdf:
Filesystem kbytes used
avail %used Mounted on

/dev/vg00/lvol3 86016 20699
61291 25% /
/dev/vg00/lvol1 47829 18094 24952 42% /stand
/dev/vg00/lvol7 335872 246329 84232 75% /var
/dev/vg00/lvol6 552960 291458 245230 54% /usr
/dev/vg00/lvol4 32768 1885 29007 6% /tmp
/dev/vg00/lvol5 430080 225329 191980 54% /opt
----------------------------------------

I want to extend /tmp, /var and / (please let me know they are too small or not). While they are vxfs, I should not have to shut down to single user mode before doing lvextend and extendfs.

By the way, is there any files I can remove from /var?

Thank you.
Steve
12 REPLIES 12
Antoanetta Naghiu
Esteemed Contributor

Re: Can I extend file system on-line

To extend on line, you need OnLineJFS, a chargeble product. If you have it, yes, you can extend on fly vxfs fs. Not HFS.
To check if you have it,
swlist -l product | grep JFS

For how to extend and/or clean /var they were lots of posts. Do a search in the forum for /var.
See as ex.:
http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xda63c5ea0230d411ade80090279cd0f9,00.html
http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xd6677e990647d4118fee0090279cd0f9,00.html
John Palmer
Honored Contributor

Re: Can I extend file system on-line

Online JFS or not, you won't be able to extend / as the volume must be contiguous. (See previous threads on this issue).

Don't forget that you can create new logical volumes and filesystems and mount them under /var or / or whatever rather than extending the parent volume. This can have the added benefit of isolating problems to certain subsystems in the event of a filesystem becoming full. e.g. you create a new filesystem for /var/mail and it fills up, only the mail system is affected.
Steven Chen_1
Super Advisor

Re: Can I extend file system on-line

I am using the following command to yield a result:

#swlist -l product |grep JFS
PHKL_12340 B.10.00.00.AA VxFS (JFS) fsck(1M) cumulative patch

By checking original order, we have "Instant ignition of JFS". By checking fstab, /tmp, /var/, /usr, / etc are using vxfs.

So can I use online extend? If not, or on the save side, can I do it in single user mode?

Thanks.
Steve
John Palmer
Honored Contributor

Re: Can I extend file system on-line

You don't have ONLINE JFS so you can't extend the filesystems online.

You will have to boot to single user mode in order to extend /tmp and /var. You can extend the logical volume at any time with lvextend but the filesystem cannot be mounted when you run extendfs.
Antoanetta Naghiu
Esteemed Contributor

Re: Can I extend file system on-line

Sorry, my mistake.
run:
swlist -l bundle

If you have the product number: B3929A OnLineJFS, you are ok to extend vxfs file systems on line. If not, you need to umount file system before extended. Some of the fs, can be unmounted on multiuser mode. (ex. /opt). For /var, /usr you need to go to single user mode.
As it was already said, / and /stand need contiguous space, and actually, extending / is not supported (can be done; I guess you do not need to increase root).
So, check the bundle for OnLine JFS. If you had it, go ahead. Which fs would you like to extend?
Steven Chen_1
Super Advisor

Re: Can I extend file system on-line

By swlist -l bundle, I do not find B3929A OnlineJFS.

So single user mode. Can I extend them to what I have before, vxfs for /var and /tmp? (from fstab they are not hfs).

I feel very grateful for the gurus answering my questions.
Steve
Antoanetta Naghiu
Esteemed Contributor

Re: Can I extend file system on-line

Yes, in single user mode you can extend them.
First, increase the logical volume and after that extend the fs. See other posts about.
Antoanetta Naghiu
Esteemed Contributor
Victor BERRIDGE
Honored Contributor

Re: Can I extend file system on-line

As Antoanetta said : once in single user do:
lvextend -L /dev/vg00/lvol7
then
extendfs /dev/vg00/rlvol7