Operating System - HP-UX
1833819 Members
2804 Online
110063 Solutions
New Discussion

Re: split or reduce a Online LV

 
senthil_3
Frequent Advisor

split or reduce a Online LV

Hi,

Can we Split/ Reduce a LV with out data loss ..?? if it is possible Please let me the steps because there is 60 GB of data over the LV of 100 GB. I want to reduce it to 70 GB as other space can be used for another LV.

Waiting for Help.

Senthil
4 REPLIES 4
Stefan Farrelly
Honored Contributor

Re: split or reduce a Online LV


You can only split a mirrored lvol - so if this lvol is mirrored you can lvreduce -m 0 it and use the free'd up space for another lovl.

Reducing an lvol is a different story. The only GUARANTEED (almost 100%) way to do an lvreduce on the fly is to use HP-UX 11i and OnlineJFS vB.11.11 (vxfs v4) as when you do the reduce (fsadm) it detects any data on the part of the lvol you want to reduce and moves it out of the way so you can accomplish the reduce. Ive used it lots, it works perfectly.

JFS 3.3 for HP-UX 11.0 has an earlier version of this 'moving data out of the way when doing an online reduce' but its not reliable and at best only works part of the time. This is a different product to OnlineJFS - its;
B3929CA B.03.03 JFS 3.3 Filesystem For 11.00
(basically a newer version).

If you have the old OnlineJFS product then you wont be able to do the reduce im afraid. It is unable to move data out of the way when you attempt a reduce. You will have to offload your data, reduce to new size, newfs, then reload.

Im from Palmerston North, New Zealand, but somehow ended up in London...
Bill McNAMARA_1
Honored Contributor

Re: split or reduce a Online LV

If you don't have online jfs, and if your lv is not so big, just create a second lv, backup (or mirror) all your data to it, (split your mirror), modify your /etc/fstab to update the lvm device configuration (lvol device file has now changes).

The fsadm defragmentation works best for large lvols..

Later,
Bill
It works for me (tm)
Elif Gius
Valued Contributor

Re: split or reduce a Online LV

Hi,

if you habe enough space in the vg I would create a new lvol with 70 GB, mount it to a temporary mountpoint and then copy the old data to the new lvol.
After that besure to keep a backup of the data! Then you can delete the old lvol, umount the new lvol from the temporary mountpoint and mount it on the regular mount point.

If you have not enough space, keep one/two backups of the data.Then delete the lvol and create a new one with the size you want. Then restore the data.
I would not do this with lvreduce...there is no 100% guarantee.
senthil_3
Frequent Advisor

Re: split or reduce a Online LV

I will Try the Steps and then I will let Assign the Points and Get back if I face any Problem

Senthil