Operating System - HP-UX
1753543 Members
5415 Online
108795 Solutions
New Discussion

reduce /var/ without online JFS

 
SOLVED
Go to solution
Dave Chamberlin
Trusted Contributor

reduce /var/ without online JFS

Greetings. Discovered on older server that though there are two internal disks, and we have mirror-ux, that the boot disk is not and cannot be mirrored. Lvols 1-3 are on disk 0, the other 5 lvols have some extents on both disks. Disk 0 has no free extents. I noted that /var is way oversized, and if reduced to a third of its current value, it still would have room to grow, and everything would fit on disk 0. Then I could mirror the boot disk. I would like opinion on doing this:

                                               copy /var data to another disk, like a data disk 

                                               bring the system down and boot to single user mode

                                               unmount /var

                                               lvreduce /var to new desired size

                                               newfs /var

                                               mount the new /var

                                               mount the data disk

                                               copy the backup of the /var data off the data disk to the new /var

                                               use pvmove to move extents from other lvols off of 2nd disk

                                               vgreduce the 2nd disk, do the pvcreate -B, mkboot etc.

Will this work? Thanks for your suggestions.

2 REPLIES 2
Matti_Kurkela
Honored Contributor
Solution

Re: reduce /var/ without online JFS

You did not provide any hard details like vgdisplay -v outputs (and/or summaries of pvdisplay -v) so I'll have to rely on your interpretation of the situation, but yes, your plan looks OK to me.

 

Remember that mass-manipulation like this will cause extra strain to the disks, which might trigger a disk failure if a disk is already close to the end of its life. Remember that MirrorDisk can do three-way mirroring too: if you can temporarily have an extra disk, you might want to establish an extra mirror before doing the pvmove step. Even if the extra mirror is not immediately bootable (e.g. located on a HBA that cannot be booted from by the current firmware), having an extra copy of the LVs' contents would make recovery easier should a disk fail in mid-operation.

MK
Dave Chamberlin
Trusted Contributor

Re: reduce /var/ without online JFS

My plan worked exactly as intended. The only issue I had was  when backing up parts of /var online, I did not use the p flag to preserver permissions and had to fix a few of those. System disk is now mirrored correctly. Thanks for input.