1834264 Members
76278 Online
110066 Solutions
New Discussion

Re: lvreduce

 
Abhijit P.
Valued Contributor

lvreduce

Dear all,

Please find attached file herewith containing the available VGs on a MSA 1000. The problem now is I need to freed up space from these and create a new LV which will be around 1.5 TB cause to take a Oracle Daily HOT Backup.

Please guide me what all steps I should take to do a lvreduce or do i need to do a vgreduce too, cause there are 2 diff. VGs.

Early response appreciated.

Thanks in advance

Abhijit
10 REPLIES 10
RAC_1
Honored Contributor

Re: lvreduce

Did not see the attachment, but this is how you should be doing it.

1. Decide which VG the lvol be creted in.
2. Back it up.
3. Make free space avaialbale. You should be deleting unwanted files.
4. Reduce the lvols to appropriate sizes.
(If you have OnlineJFS, you can do it online, else you will have to unmount the FS)
If you have onlineJFS, the procedure is as follows.

fsadm -F vxfs -b "new_size" /dev/vgxx/lvolx
lvreduce -L "new_size" /dev/vgxx/lvolx

If you do not have onlineJFS, then as follows.

umount /FS
fsadm -F vxfs -b "new_size" /dev/vgxx/lvolx
lvreduce -L "new_size" /dev/vgxx/lvolx

Check if everything is OK., I would like to repeat that take the backup first.

Anil
There is no substitute to HARDWORK
Jean-Luc Oudart
Honored Contributor

Re: lvreduce

From your attachement it seems you have the space but across different vg.
not only you will have to lvreduce lv from volume group but you will have to fund which disk tcan be taken from one volume group and used for the vg where you want to create you 1.5Tb lv.

check these links :
for lvreduce
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=74968

for vgreduce
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=816216
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=139550

Also, I would start the procedure with a proper backup.

Regards
Jean-Luc
fiat lux
Abhijit P.
Valued Contributor

Re: lvreduce

Hi anil,
thanks for early reply....

First thing is I don't have Online JFS and second is I have two diffrent VGS as mentioned in the file.

so I need to freed up the space from these two make it as a raw space and then create a LV in one of the VG and extend it to that space.

how to go abt it.....?

Abhijit
Etienne Roseau
Frequent Advisor

Re: lvreduce

hi,
so you have the answer, reduce space from one(or more)LV, create a new LV.
your job to think which to reduce....
if choosing a non-system LV doing it with SAM, will be the easier, and you won't forget anything.
if choosing LV containing /var /opt ...etc..
(IF NO OTHER CHOICE): you'll have to boot as a single user.
even see : man lvextend / vgextend
or thread, where discussing about increase/decrease LV and FS :
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=640683

HTH
E.
RAC_1
Honored Contributor

Re: lvreduce

If you have free space in two different vgs, then you need to make pvs in that vgs free and add to one of vgs. (or a seperate VG)

Run pvdisplay on each of pvs in vgs and check if you can move any of the data to some other pvs. (check pvmove command. Read man page first) If vgs are stripped, you can not use pvmove command.

Once a pv/pvs are made free, vgreduce those pvs and create (or add to a vg, where you want to create a FS)

Then, vgcreate
lvcreate. While doing vgcreate take care of no. pes. Check man page of vgcreate)

Anil
There is no substitute to HARDWORK
Devender Khatana
Honored Contributor

Re: lvreduce

Hi,

Have you checked wheather your VG have some unallocated space or not. They might have some free physical Volumes. Check it by

vgdisplay -v /dev/vgname

Do it for both VGs. Attachment shows output that envolves three VGs. Which two you want to play with. Do it for those two.

HTH,
Devender
Impossible itself mentions "I m possible"
Abhijit P.
Valued Contributor

Re: lvreduce

hi friends,

thanks for your early responses but I have one more query that as these VGs are in MSA when I give vgsiplave -v VGNAME it shows me only single PV per VG as attached herewith.

So please giude me how to take care of the PVs while doing a vgreduce

Thanks and Regards,
Abhijit
Naveej.K.A
Honored Contributor

Re: lvreduce

Abhi,

Looks difficult to create a single filesystem with all the free PEs and the free space left on each logical volume. The maximum space you can create is on the third VG where you have some Free PEs and you can perhaps do an lvreduce on some logical volumes in the third VG and create a volume out of it.

The maximum space you get depends on how well you handle the Free PEs and free space.


/back04 is around 413GB free.. lvreduce this filesystem and take the maximum space from this. /dev/vgmsa03 has around 15288 free PEs which comes to 978GB.


Regards,
Naveej
practice makes a man perfect!!!
Devender Khatana
Honored Contributor

Re: lvreduce

Hi,

As earlier clarified, You can have a single volume of 978GB in /dev/vgmsa03 Volume group without altering anything.

Another thing I would suggest is to have an existing volume extended to the allowed limit here by another 978 GB to become a total of 1490GB.

If you can do it with creating multiple volumes then you can also create one volume each of 578GB in /dev/vgmsa01 and /dev/vgmsa02.

The best thing you can do here is to create a new volume in either /dev/vgmsa01 or /dev/vgmsa02 of 512GB and copy the data from /dev/vgmsa03/back04 onto it and mount it on /back04 and extend /dev/vgmsa03/back04 to 1490Gb and use it in place of new Volume you are intending to create having mount at a desires mount point.

HTH,
Devender
Impossible itself mentions "I m possible"
SS_6
Valued Contributor

Re: lvreduce

Hi Abhijit,
First you must defrag the file system before reducing it. See my posing in the link.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=517467
By providing solutions I am helping myself