cancel
Showing results for 
Search instead for 
Did you mean: 

increase root FS

gany59
Regular Advisor

increase root FS

Can we able to increase the root file system if we have a online jfs in online , without going to lvm maintanenece mode.
4 REPLIES
Patrick Wallek
Honored Contributor

Re: increase root FS

The root file system '/' MUST be contiguous. So no, you really can't. Even in LVM Maintenance mode this is almost impossible.

The easiest way to increase the '/' LV is to create an Ignite backup, restore your system from that and increase your LV sizes as necessary.

This begs the question though -- Why do you think you need to increase '/'?
James R. Ferguson
Acclaimed Contributor

Re: increase root FS

Hi:

First ask why you think you need to increase the root ('/') filesystem. You may be storing things there that don't belong. Correspondingly, you may need to resize it in order to do an upgrade of your operating system level.

Second, search this forum. You will find that Ignite is one (safe) way to resize your vg00 filesystems.

If you have free, contiguous physical disk extents immediately adjacent to '/dev/vg00/lvol3' (which is '/') then with OnlineJFS you can increase '/'. If you don't have free, adjacent extents you will have to make volume group adjustments to create them.

Regards!

...JRF...
njia_1
Trusted Contributor

Re: increase root FS

hi there

Yes, you can

Not for the faint of heart.

No outage required , if you have online jfs.
If you do not have online jfs , do all the following in LVM maintenance mode.
Note: this will only work if SWAP is NOT the next lvol after /

a. Login as root.
b. Find out a free disk / un mirror the rootvg and make that disk free.
c. find out the next logical volume after lvol3(assumed lvol3 is root)
d. pvmove that logical volume onto the newly added disk
[ pvmove -n /dev/vg00/lvol4 /dev/dsk/CURRENT /dev/dsk/NEW]
e. now you should be able to increase root filesystem to an additional `size_of_the_lvol4`.
f. pvmove the lvol4 back to root vg ( vg00)

boot,swap and root are the only lvols that needs a contegeous policy. so , it does not matter where lvol4 is.

Example, move lvol4 away from lvol3 , thus creating a contegeous space right after lvol3. If you need more space on "/" you will be able to move lvol5 ...6 to the next disk and do the stuff. Do remember to migrate them back to the original disk.

Now, if you have mirrored root vg, then break the mirror before you do this.

Practical Example (actual test)

# bdf |grep vg00
/dev/vg00/lvol3 204800 151616 53184 74% /
/dev/vg00/lvol1 125808 49064 64160 43% /stand
/dev/vg00/lvol7 4194304 2501208 1680472 60% /var
/dev/vg00/lvol6 3145728 1856304 1279456 59% /usr
/dev/vg00/lvol5 524288 160992 361104 31% /tmp
/dev/vg00/lvol4 2097152 1833496 261656 88% /opt
/dev/vg00/lvol8 1048576 622656 422632 60% /home
/dev/vg00/lvol10 2097152 1270980 774595 62% /app

Find a spare disk:

strings /etc/lvmtab |grep c7t0d6
pvcreate -f /dev/rdsk/c7t0d6
vgextend /dev/vg00 /dev/dsk/c7t0d6
lvdisplay -v /dev/vg00/lvol4 |more
lvreduce -m 0 /dev/vg00/lvol4
lvdisplay -v /dev/vg00/lvol4 |more
pvmove -n /dev/vg00/lvol4 /dev/dsk/c0t6d0 /dev/dsk/c7t0d6

lvextend -L 1024 /dev/vg00/lvol3
fsadm -b 1024M /

pvmove -n /dev/vg00/lvol4 /dev/dsk/c7t0d6 /dev/dsk/c0t6d0
vgreduce /dev/vg00 /dev/dsk/c7t0d6

lvextend -m 1 /dev/vg00/lvol4

# bdf |grep vg00
/dev/vg00/lvol3 1048576 151640 890456 15% /
/dev/vg00/lvol1 125808 49064 64160 43% /stand
/dev/vg00/lvol7 4194304 2506048 1675672 60% /var
/dev/vg00/lvol6 3145728 1856304 1279456 59% /usr
/dev/vg00/lvol5 524288 160992 361104 31% /tmp
/dev/vg00/lvol4 2097152 1833552 261600 88% /opt
/dev/vg00/lvol8 1048576 622656 422632 60% /home
/dev/vg00/lvol10 2097152 1270980 774595 62% /app
shanmuhanandam
Regular Advisor

Re: increase root FS

Hi,
yes you can do it online if you have the online JFS. For that you required one more disk on the vg00 with free PE's.

but before that think why it is necessary to increase the "/".

Thanks,
Shan.