LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 04-30-2013, 05:06 PM   #1
compix
LQ Newbie
 
Registered: Jan 2013
Distribution: CentOS
Posts: 17

Rep: Reputation: Disabled
LVM - Corrupt Logical Volume


Hi all,

I have recently been dealing with LVM and tried to resize a logical volume to 50 GB from 100GB which normally was using ~48GB of it's available space. However, something happened and the volume got corrupted. I noticed that the size of volume has grown over 50GB somehow and I am now unable to access it.

Thought about running fsck and here's what I see;

The filesystem size (according to the superblock) is 7864320 blocks
The physical size of the device is 524288 blocks
Either the superblock or the partition table is likely to be corrupt!

Any ideas what might have happened?

Thanks in advance!
 
Old 04-30-2013, 05:48 PM   #2
gdizzle
Member
 
Registered: Jul 2012
Posts: 197

Rep: Reputation: Disabled
When you resized the LVM, did you resize the filesystem first with
Code:
resize2fs
, or did you just try to resize the LVM first?

Also is this the root LVM??

Paste the steps you took to resize the LVM from 100gb to 50gb.
 
Old 04-30-2013, 06:02 PM   #3
compix
LQ Newbie
 
Registered: Jan 2013
Distribution: CentOS
Posts: 17

Original Poster
Rep: Reputation: Disabled
I tried to resize LVM first instead of resizing file system - was going to try resize2fs afterwards but the things gone bad. :\

Yes, this is a volume which consists root of a portable Linux installation.
 
Old 05-03-2013, 05:17 PM   #4
H5X00R
Member
 
Registered: Apr 2013
Posts: 39

Rep: Reputation: 1
Unlike the other volumes which can be mounted and unmounted to do resizing or other maintenance the root volume cannot be resized while it is mounted. You'll will need to use a linux recuse CD with LVM support to work on the lvm root volume.

Also, you must have enough free space to shrink volumes or data lost can occur. Most guides recommend backing up your data before resizing especially when shrinking.

I've found this guide online on LVM resizing
http://www.tcpdump.com/kb/os/linux/l...de/shrink.html

Last edited by H5X00R; 05-03-2013 at 05:34 PM.
 
Old 05-03-2013, 05:45 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,799

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
Quote:
Originally Posted by compix View Post
I tried to resize LVM first instead of resizing file system - was going to try resize2fs afterwards but the things gone bad. :\
*Very* bad idea. The filesystem must be resized first (when shrinking).

If the freed up space has not been used for something else, you could try resizing the LV back to the old size (or bigger), then immediately try a fsck. Seems to work most of the time.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
HELP! Restoring a LVM Logical Volume Checksumfail Linux - Server 2 12-18-2012 12:07 AM
Extended LVM Volume group and Logical Volume. But space not usable linuxlover.chaitanya Linux - Server 1 11-19-2012 09:37 AM
[SOLVED] delete logical volume (lvm) Art McClure Slackware 6 04-01-2012 07:04 PM
Shrinking a Logical Volume With LVM jimmyjiang Red Hat 1 02-28-2008 04:45 PM


All times are GMT -5. The time now is 04:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration