Operating System - HP-UX
1753774 Members
7171 Online
108799 Solutions
New Discussion

Re: extend root file system

 
sujit kumar singh
Honored Contributor

Re: extend root file system

hello

the best suggested method in this case and the satndard one is to make an ignite and restore the ignite back on to the server.

the other ways possible are as follows:
if u can use additional new disks, create a new VG say rootvg then u can follow the procedure of creating new LVs on them in accordance to what u have now on the root VG and copy the data using find -xdev -depth | cpio -pdvmvx /new_mt_pt.
make sure
1)that on the new VG lvol, lvol2 and lvol3 as u have created using the desired size follow the -C y -s y that is strict and contiguous in aloocation Policy , make this time the root be larger.
2)Create the other LVs as on the original root VG.
3) on new disk at creating the rootvg make sure that u follow mkboot -e -l etc according to the Integrity Platform.
, after that doing an lvlnboot , setboot to the new boot path , reboot the system, start in LVMMaintenance mode, Export the vg00 and reimport the New disks as put into vg00, do a vgcfgbackup, setboot to this path , make the entry in /stand/bootconf and reboot with this path.


OR u can use a new disk, add to the vg00 and make this bootable,create lvol1new lvol2new lvol3new and lvol4new with the new sizes, copy the data using find -xdev -depth | cpio -pdmvx synatx and copy only lvol1 lvol2 lvol3 and lvol4 only. use lvlnboot to define the new boot swap root and dump , add entry to /stand/bbotconf and setboot to this path to boot the system.Make necessary entry changes in /etc/fstab to mount the /dev/vg00/lvol1new and /dev/vg00/lvol4new ,commenting the existing entry lvol1 and lvol4 and modifying if swap entries accordingly if anyy in the fstab.
In this thought not standardily suggested at all the System will boot from the new disk and take other /usr ,/tmp and other mt. pts from the LVs on the other disk.


note: after u have achieved this config , Plan for a down time immediately for the system and do make an Ignite Restore of the system with the deired root disk config.


Sujit
sujit kumar singh
Honored Contributor

Re: extend root file system

HI there is one way out looking at the swap space that u decreased and that has given u a 3GB of contig space just after the location of the LVOL3.Make the Pry swap still smaller to free upto 6 GB of space.

All u need to know is the start and end PEs for this space and make a note of that and create an LV in that space with -Cy and -sy options for contig and strict allocation policy and name this as /dev/vg00/newroot.

follow th efollowing seq of steps:
1) #lvcreate -L 6000 -C y -s y -n newroot /dev/vg00.

This space allocation shall auto happen from the fre PE and shall take the PEs in the free pool that u have recently freed up as allocation of PE to an LV takes palace by default like that.

2)#newfs -F vxfs -b 1092 /dev/vg00/rnewroot
3)#mkdir /newroot
4)#mount -F vxfs /dev/vg00/rnewroot /newroot
5)#cd /
6)#find . -xdev -depth | cpio -pdmvux /newroot
after the copying has been finished,
7)#lvrmboot -r /dev/vg00
8)#lvlnboot -r /dev/vg00/newroot
9)#lvlnboot -b /dev/vg00/lvol1
10)#lvlnboot -s /dev/vg00/lvol2
11)#lvlnboot -d /dev/vg00/lvol2
12)#lvlnboot -R
12)#vi /etc/fstab

to change the enries for mounting the root fs.change this from /dev/vg00/lvol4 to /dev/vg00/newroot take care of the swap lV entries in the /etc/fstab also

Shutdown and rebbot the system.

13) after the system has successfully come up and all works fine, do an lvremove for the /dev/vg00/lvol4
14)recreate an LV of reqd size with -C y and -s y option and the same space for lvol4
15) use the Lvol4 for the New additional Swap that u will require, put the entries for swap in /etc/fstab for device swap on the /dev/vg00/lvol4 and activate the same suing swapon /dev/vg00/lvol4.


This will work, if u apply with proper rules for LVM.

Still suggest u to take an Ignite for the syatem and later on amke standard LVs for the Root VG as lvol1 - boot , lvol2 -- primary swao and dump and lvol3 as root.


Regards
Sujit