1833748 Members
2697 Online
110063 Solutions
New Discussion

how do extend /var

 
SOLVED
Go to solution
Pete Mattison
Advisor

how do extend /var

Okay, I need to prepare some space on var if my lovely workstation decides to have another crash. I've had a look around to see what I should do and I would like to confirm what I think is correct.

1 Using sam doesn't work since that is on var and can't unmount var so...

2 shutdown 0 - go into single user mode

3 lvextend -L 1024 /dev/vg00/lvol6

I've checked and var is already unmounted, and I would like a 1Gb partition.

4 extendfs -F hfs /dev/vg00/rlvol6

5 reboot

This will hopefully restart the workstation and automatically remount all volumes.

So, how does it look? Thanks for helping me in the idiots guide to extending partitions without using sam. Hopefully other people will find this useful too :-)

Thanks,

Pete

PS. No, I don't have any other utility that can help me with this and don't want to try with one - not on the day before my summer holiday...
9 REPLIES 9
Printaporn_1
Esteemed Contributor

Re: how do extend /var

if you got problem cannot found lvextend command cause /usr was umount with shutdown 0
please fsck and mount /usr

enjoy any little thing in my life
Pete Mattison
Advisor

Re: how do extend /var

Whoops, sorry I forgot to say that after going in to single user mode I did bdf to check which volumes were mounted and the volumes / and /usr are still mounted so I can do the commands.

Pete
Shahul
Esteemed Contributor

Re: how do extend /var


Hi

It is very simple. Follow these steps

Anyway U will have to reboot the system for extending the var file system.

While booting press and hold the Esc key, Then it will come to main menu, Ther U type like this

Main Menu>boot pri
select interact with ISL

ISL>hpux -lm

Now U will come to lvm maintanence mode.
Now Issue these following commands

#vgchange -a y vg00
#lvextend -L "New size" /dev/vg00/lvol6
#extendfs /dev/vg00/rlvol6
#mount -a
#bdf

Verify ur /var size...Now reboot the system and come to normal mode.

Now ur job is over..right?

Shahul
Ravi_8
Honored Contributor

Re: how do extend /var

Hi,
bring the system to single user mode repeat your 3 and 4 steps and instead of rebooting you can do #init 3 .
never give up
Michael Tully
Honored Contributor
Solution

Re: how do extend /var

Hi Pete,

Basically Shahul is on the right track,
however you don't need to reboot the
system after completing the task. From
the ISL> prompt issue this.

ISL>hpux -is

This will boot the system into single
use mode. Once the portion of the boot
has completed you can do the additional
size parts.

check to see /etc/fstab file to make sure
lvol6 is /var then
# lvextend -L "size that you want" /dev/vg00/lvol6
# extendfs /dev/vg00/rlvol6
# mount /dev/vg00/lvol6 /var
# bdf
# mount -a

Control D will bring your system up to
multi-user.

Good luck and Happy Holidays
Michael
Anyone for a Mutiny ?
Michael Tully
Honored Contributor

Re: how do extend /var

Hi again,

One think I forgot to mention as to why it
is better to reboot into single-user mode
than trying to do a shutdown is that
sometimes there are processes associated
with /var that will still run.

HTH
Michael
Anyone for a Mutiny ?
Pete Mattison
Advisor

Re: how do extend /var

The workstation is busy running. Why can't or shouldn't I just use shutdown 0 to get into the single user mode - isn't this easier than rebooting and having to hold the escape key etc...?

Pete
Michael Tully
Honored Contributor

Re: how do extend /var

Pete,

You can try it of course, but as I mentioned
in my last answer some processes that are
associated with /var may not terminate and
therefore you won't be able to unmount the
filesystem. It sometimes depends on how your
server or workstation is set up. In general
terms what has been posted previously is
usually what has to happen. You won't do any
damage by trying it.

Michael
Anyone for a Mutiny ?
Pete Mattison
Advisor

Re: how do extend /var

Thanks guys for the help. A colleague of mine has persuaded me to actually carry out your instructions on the day AFTER the hols and not the day before :-)

The help wasn't in vain, I'm confident everything will work but for safety's sake...

And, my congratulations to Michael on his new hat - funnily enough the first part of my holiday is to go to england and where this hat for real! Yeap graduation time for my M.Phil. in neural networks.

Pete