Operating System - HP-UX
1753918 Members
7992 Online
108810 Solutions
New Discussion юеВ

Re: Extending /var, /usr, /opt and /tmp

 
Paul Johnsen
Occasional Advisor

Extending /var, /usr, /opt and /tmp

I recently bought two new disk drives for my J5000 box. I installed them and striped them to be used for user file area. They were set as vg01. After moving the existing user data over and removing the partition from the original drive (vg00), I had a lot of room that could be allocated to other groups. I decided to extend the /opt, /var, /tmp, /usr and /apps areas. I had previously successfully extended the /opt. I rebooted into single user mode, used the lvextend and extendfs commands to extend the volume groups. SAM and the associated commands for volume group management report that the extensions went as they were supposed to. However, bdf and the file systems part of SAM both report the original group size. I am running HP-UX 10.20 with the latest ACE installed. The original hard disk is an 18 GB Seagate 118202LC drive and the two new ones are 18 GB Seagate 318404LC drives. The extension of the /apps group worked fine. How can I get the group extensions for the others to "take"?
9 REPLIES 9
Bruce Regittko_1
Esteemed Contributor

Re: Extending /var, /usr, /opt and /tmp

Hi,

It sounds as if the extendfs portion did not go as planned despite what SAM reported to you. If lvdisplay shows the "new" size and bdf does not, chances are you need to redo the extendfs command.

Instead of using SAM, I would run extendfs from the command line. As you noted, you will probably need to be in single user mode since the filesystems will need to be unmounted.

--Bruce
www.stratech.com/training
A. Clay Stephenson
Acclaimed Contributor

Re: Extending /var, /usr, /opt and /tmp

Hi Paul,

Make sure that your filesystems have a lost+found directory so that the .fsadm file can be written. Also, the process will fail if a filesystem is completely full.

Clay
If it ain't broke, I can fix that.
Alan Riggs
Honored Contributor

Re: Extending /var, /usr, /opt and /tmp

My guess is that the fsextend was not the problem but that the lvextend had too small a size specified. Use lvdisplay to examine the size of the /opt logical volume. If it still shows teh original size, then recheck your numbers and extend it again.
James R. Ferguson
Acclaimed Contributor

Re: Extending /var, /usr, /opt and /tmp

Hi Paul:

I agree with Alan. Remember that the '-l' option of 'lvextend' specifies extension in logical *extents* whereas the '-L' option specifies the size in *megabytes*. Make sure you specifying what you think you are.

...JRF...
Paul Johnsen
Occasional Advisor

Re: Extending /var, /usr, /opt and /tmp

Thanks for your inputs so far. However, I've tried all of those things before. Here is the command I used to extend the group:

lvextend -L 4096 /dev/vg00/lvol6

Then. of course, I issued the extendfs command. I did do this in command line mode and not SAM. Here is the output of the lvdisplay command (only for /opt):

--- Logical volumes ---
LV Name /dev/vg00/lvol6
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 4096
Current LE 1024
Allocated PE 1024
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

And here is the output for bdf:

/dev/vg00/lvol6 2050203 1124481 720701 61% /opt

Hopefully this can give someone a hint to help me. Thanks.

Paul
John Waller
Esteemed Contributor

Re: Extending /var, /usr, /opt and /tmp

What type of filesystem is /opt , hfs or vxfs. With the size shown by bdf (2050203? if it was a vxfs I would expect this to be exactly divisable by 1024). I believe it must be a hfs file system, if so try extendfs -F hfs /dev/vg00/rlvol6.
Vincenzo Restuccia
Honored Contributor

Re: Extending /var, /usr, /opt and /tmp

Your lvextend is correct.In single user digit
#extendfs -F vxfs /dev/vg00/lvol6 ?
The file system is full ?
See also fsadm if you have Online JFS
#fsadm -F vxfs -b 4194304 /opt,without umount and with system up.
Dave Wherry
Esteemed Contributor

Re: Extending /var, /usr, /opt and /tmp

Instead of extending all of these file systems have you considered breaking them up into a few new file systems. For example if you do not already have them you can create /var/adm/crash and /var/ad/sw and others that just make managing your system a little easier.
A good example is that if you do a lot of printing you can create a /var/spool/lp file system. If you have printers down and jobs keep putting print jobs in the queues. You could fill /var and affect the entire system. With a seperate file system then printing is the only thing affected. The same goes for mail, or if you collect sar stats you can create /var/adm/sa and that file system will remain pretty constant, but not take up space in /var.
CHRIS ANORUO
Honored Contributor

Re: Extending /var, /usr, /opt and /tmp

Hello Paul,

I have had this problem before. Those filesystems must be hfs. There is a discrpancy with bdf and hfs filesystems. The thing to do is convert them to vxfs filesystem.
Steps to take in converting from hfs to vxfs:
1. Backup all the data from the filesystems involved
2. Copy /etc/fstab to /etc/fstab.old, change the /etc/fstab file for the /dev/vg00/lvoln to replace the hfs with vxfs for the filesystems in question.
3. Reboot the to single user mode (thereby unmounting
the filesystems)
4. Do newfs -F vxfs /dev/vg00/lvoln
5. Do fsck -F vxfs /dev/vg00/lvoln
6. Mount /dev/vg00/lvoln
7. Do fstyp /dev/vg00/lvoln (To confirm that the filesystem is now vxfs).
8. Restore from that backup media
9. Reboot the system.

I hope this helps.

Regards!
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.