Operating System - HP-UX
1851139 Members
3258 Online
104056 Solutions
New Discussion

reducing logical volume size ?

 
SOLVED
Go to solution
rbarot
Occasional Advisor

reducing logical volume size ?

I have one logical volume of 500 MB on HDD and want to reduce it to 350 MB. Data on HDD is 58 MB. HOw to go ahead ? Can I use lvreduce ? What abt DATA on HDD..will it be there ?
4 REPLIES 4
ketan_5
Valued Contributor
Solution

Re: reducing logical volume size ?

Simple command...just reduce it by giving lvreduce. But it is sure ,you will be losing your data...take reliable backup first..
TSaliba
Trusted Contributor

Re: reducing logical volume size ?

hi
to reduce your logical volume you maust first take a backup up , then perform:

lvreduce -L 350 /dev/vg##/lvol#

then newfs -F vxfs /dev/vg##/rlvol#

then restore the data to the new reduced lvol.

hope this help
jj
Robert-Jan Goossens
Honored Contributor

Re: reducing logical volume size ?

Hi,

I don't know id you have online jvs installed, but below notes are save.

Create an archive in an other filesystem,

# cd /dir
# tar cvf /tmp/test.tar .
# cd /
# umount /filesystem
# lvreduce -L 350 /dev/vgXX/lvolX
# newfs -F vxfs /dev/vgXX/rlvolX
# mount /filesystem
# cd /tmp
# tar xvf test.tar /dir
Thayanidhi
Honored Contributor

Re: reducing logical volume size ?

Hi,

Do you have Online JFS installed?
Is it a vxfs filesystem on the HDD?

If the bth of above id false then you may lose your data!!

Keep good backup of data and do a

# lvreduce -L /dev/vgXX/lvolXX

TT
Attitude (not aptitude) determines altitude.