LVM lvreduce & lvextend

A

azurtem

Guest
Hi

On a Debian squeeze HP Proliant with Smartarray four disk RAID 1+0 135GB
my client's /var volume was in the mid ninety percent full so I proposed that we reduce /home

I executed the following commands :

umount /home
lvreduce -L-20G /dev/LVM/home
lvextend -L+20G /dev/LVM/var
mount /home

the mount didn't go well and I realised that I had omitted a command, so I ran:

resize2fs /dev/LVM/home

Which requested that I run :

e2fsck -f /dev/LVM/home

which produced the following error:

Error reading block 2655233 (Invalid argument). Ignore error<y>?

I ran through the various repair steps that this utility handles and yet the /home volume still won't mount - I get the same result if I run e2fsck again

I don't mind losing the /home volume, but I'd hate (ok worse than hate) to lose the /var
volume

Is there any way to undo these commands or at least to cancel the lvextend on /var ?

I haven't rebooted the server yet.

thanks for your help
yann
 


Well part of the issue is you have RAID 1+0 AND LVM. Due to RAID the changes have to be reflected across the drives which in turn means you have to wait until all the drives are updated before you can continue on with the next step. Sounds like you didn't take this into consideration and you fubar'ed the setup.

I'm not aware of a way of cancel an extend via LVM, but if you can still access the /var data then I'd back it up and recreate the structure if you can from scratch.
 
Does ur lvstatus is "available" or "not avalilable"??


you can get it through
Example
#lvdisplay
--- Logical volume ---
LV Path /dev/VG0/LV0
LV Name LV0
VG Name VG0
LV UUID tvaMx7-L67p-c6aO-F6xo-YdZG-QzDB-97lYci
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2013-12-13 12:08:37 +0530
LV Status available
# open 1
LV Size 5.00 GiB
Current LE 1279
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
 
Hi
I managed to fix this issue by simply executing a resize on var and recreationg a (new) home volume
All is well now thanks
yann
 

Members online


Top