1847591 Members
4485 Online
110265 Solutions
New Discussion

/var

 
SOLVED
Go to solution
castro_2
Regular Advisor

/var

What is the procedure for enlarge de /var, I have to do in single user
Thanks
21 REPLIES 21
MANOJ SRIVASTAVA
Honored Contributor

Re: /var

Hi Castro


/var is a vxfs system and can be extended online if you have ONLIN JFS in teh system , incase you dont ahve it then you need to go to single user mode and then increase the size.


Manoj Srivastava
Alan Casey
Trusted Contributor
Solution

Re: /var

Hi,

you need to do this in single user mode:

Execute lvextend -L (NEWSIZE) /dev/vg00/lvol9 (this is /var)
Execute extendfs /dev/vg00/rlvol9
Reboot.
harry d brown jr
Honored Contributor

Re: /var


If you have online JFS you can extend it without shutting the system down. If you don't have online JFS then you will most likely have to do it from single user mode, unless you can get all processes stopped that use /var. It's a lot faster to just do it from single user mode if you have a lot of processes using /var.

live free or die
harry
Live Free or Die
James R. Ferguson
Acclaimed Contributor

Re: /var

Hi:

If you have licensed Online JFS then this can be down without the needed to change to single user mode.

If you do not have Online JFS, the easist way to expand filesystem like /var is to *reboot* into single user-mode. Do the required LVM maintenance with the commands in /sbin and when done, either reboot or chnage the 'init' level to its default (usually 3).

Regards!

...JRF...
Hai Nguyen_1
Honored Contributor

Re: /var

Castro,

If you do not have online-JFS, then go to single-user mode to expand /var.

If you are not comfortable with command line, you can use SAM to perform this task, which is safe and easier.

Hai
Martin Johnson
Honored Contributor

Re: /var

If your system disk is mirrored, remember to break the mirror before extending /var.

HTH
Marty
Sajid_1
Honored Contributor

Re: /var

hello,

I would prefer doing this in single-user mode. Once you are there, then:
# pvcreate -f new_pv_name
# vgextend vg_name pv_name
# lvextend -L new_size lv_name new_pv_name
# extendfs rlv_name
# fsck lv_name
# mount -a
# bdf
# shutdown -y -r 0

Also you can do the extend using 'fsadm' command too. If you are not familiar with commands, then best way is to use SAM.
learn unix ..
Kelli Ward
Trusted Contributor

Re: /var

Hi,
Just an added note.
If your filesystem is not vxfs and you have to use single user, in the end it is probably easier to do as previously suggested and reboot then go up into single user rather than going down from your current run level using init s.
Using init s won't kill all processes run from /var so if you use this option you'll have to find those processes and kill them manually in order to umount /var.
Good luck,
Kel
The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!
Sean OB_1
Honored Contributor

Re: /var

If you have online JFS you can do this on the fly.

Otherwise shutdown the system, boot it, select yes to interact with the ISL.

Then issue:

hpux -is # boots into single user mode.

Then:

lvextend -L newsize /dev/vg00/lvolNN whatever lvol is /var

extendfs /dev/vg00/rlvol9

Reboot the sytem.
Martin Johnson
Honored Contributor

Re: /var

What kind of messages are you getting in /etc/rc.log?

Marty
Martin Johnson
Honored Contributor

Re: /var

Oops! Wrong thread.

:-)
Marty
Deshpande Prashant
Honored Contributor

Re: /var

HI
If you have online JFS installed on your system, you will be able to extend with out shutting down the box.

Thanks.
Prashant.
Take it as it comes.
castro_2
Regular Advisor

Re: /var

The filesystem is:
/dev/vg00/lvol8 /var vxfs delaylog 0 2
I don't want to create only increase, and stupi question how I can knouw is a JFS Online.
Thanks
castro_2
Regular Advisor

Re: /var

I forgot the system disk is mirrored, I have to do anything special?.
Thanks
Kelli Ward
Trusted Contributor

Re: /var

That's not a stupid question at all.
A simple way is to use more /etc/fstab

If it says vxfs on the lvols it journeled.
If it says hfs, it's not.

Kel
The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!
Hai Nguyen_1
Honored Contributor

Re: /var

Castro,

The system will take care of the mirror. You do not have to worry about it.

Hai
Sajid_1
Honored Contributor

Re: /var

hello,

two things:
# swlist

check output and see if you have Online JFS installed. For file syste details:
# fstyp -v file_sys_name
learn unix ..
Deshpande Prashant
Honored Contributor

Re: /var

HI
In #swlist output of your system check for online JFS (B3929BA) or JFS for (JFS 3.3) verison.

Thanks.
Prashant.
Take it as it comes.
James R. Ferguson
Acclaimed Contributor

Re: /var

Hi Castro:

If your vg00 is mirrored, leave it mirrored. There is no problem when you extend a logical volume and filesystem in this configuraton. The only real issue is to know what you are doing.

To find out if you are licensed for Online JFS, do:

# swlist | grep -i onlinejfs

If you have the online component, you will be returned a string with that word in it.

Too, if you have OnlineJFS installed, instead of doing an 'extendfs' you will use 'fsadm' to enlarge the filesystem:

# fsadm -b newsize /mount_point

Note that the is specified in blocks as the manual will show you.

I suggest that you have a look at chapter-6 of "Managing Systems and Workgroups: A Guide for HP-UX System Administrators" which deals with filesystem maintenance:

http://docs.hp.com/hpux/onlinedocs/B2355-90742/B2355-90742.html

Regards!

...JRF...

castro_2
Regular Advisor

Re: /var

I don??t have JFS Online. I have installed some partches.
swlist -l product|grep JFS
PHCO_20030 1.0 Enhance ln(1) to work with JFS ACLs.
PHCO_20031 1.0 Enhance ls(1) to work with JFS ACLs.
PHCO_20032 1.0 Enhance mv(1) to work with JFS ACLs.
PHCO_2003 1.0 Enhance rm(1) to work with JFS ACLs.
PHCO_20034 1.0 Enhance shar(1) to work with JFS ACLs.
PHCO_20039 1.0 Enhance unpack(1) to work with JFS ACLs
PHKL_14763 1.0 JFS extended map inodes cause fsck failure
PHKL_18543 1.0 PM/VM/UFS/async/scsi/io/DMAPI/JFS/perf patch
PHKL_18800 1.0 Cumulative JFS patch - panic:dirty inval
PHKL_18801 1.0 Fix for JFS fsadm ENOSPC errors
PHKL_20675 1.0 Fix JFS 3.1 hang, data corruption
PHKL_21491 1.0 fix VxFS(JFS 3.1) fsadm hang

I will do this.
shutdown 0
fuser -u /dev/vg00/lvol10
lvextend -L 1200 /dev/vg00/lvol10
umount /var
extendfs -F vxfs /dev/vg00/rlvol10
mount /var
shutdown -r 0

Is correct?
Thanks everyone.



James R. Ferguson
Acclaimed Contributor

Re: /var

Hi:

OK, since you don't have Online JFS licensed, you are going to need to unmount /var to increase its size. The easiest way to do this is to first reboot your system into single-user mode (in which /var and /usr are not mounted):

1. shutdown -ry 0
2. Interrupt the boot process
3. boot pri #...at the ISL prompt
4. interact with ISL? Y #...response is Y
5. hpux -is #...to boot to single user mode
6. lvextend -L /dev/vg00/lvolX
7. extendfs /dev/vg00/rlvolX #...note (r)aw device
8. shutdown -ry 0 #...and you're done!

Regards!

...JRF...