Re: LVM Resizing Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Al Sparks spake the following on 5/3/2007 6:39 PM:
> --- Matt Hyclak <hyclak@xxxxxxxxxxxxxx> wrote:
> 
>> On Wed, May 02, 2007 at 11:06:31PM -0700, Al Sparks enlightened us:
>>>> Did you resize the filesystem, too?
>>>>
>>>> Matt
>>> Nope.  How do you do that?
>> resize2fs would be a good guess. Usually this is done *before* you shrink
>> the disk out from underneath it. If anything was in those sectors you
>> removed from the LV, you might be out of luck. 
>>
>> Matt
> 
> Well, I was able to get my server back up.
> 
> First, I had to boot it up on a recovery CD (standard CentOS) and
> comment out the bad volume it wanted to mount in /etc/fstab.
> 
> When the server came back up, I tried using resize2fs to resize.  The
> resize2fs would not let me resize until I manually ran fsck because
> the file system and logical volume block counts wouldn't match (been
> there, done that, no joy).  So I increased the logical volume back to
> where it was to make them match, ran fsck again, and everything
> checked out.  I then was able to use resize2fs to decrease the file
> system size, and then run lvreduce to decrease the volume size.
> 
> However, because neither application didn't seem to allow me to use
> block size parameters, I used units of Megabytes and would end up
> within a few blocks of each other.  I then would estimate how much
> more units of +/- MB I needed to get things in sync.
> 
> Kind of a pain.  Anyway, I appreciate the help.  Nice to have these
> tools available to use.
>    === Al
If it worked for you then you could resize2fs to "smaller" than you need,
resize the LV, and resize2fs with no size parameters I believe will resize to
all available space in the filesystem. Yes, it is one extra step, but it
should work. I haven't used resize2fs for so long, I did't think it worked on
ext3. I guess past pains don't always carry to the future.

-- 

MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux