On Tue, Jul 3, 2012 at 10:03 PM, Bob Cochran <[email protected]> wrote:
> I ran out of space for my cobbler repos in my CentOS 6.2 home for cobbler.
> Specifically, the default CentOS install allocates only 50 GiB of space for
> the LVM filesystem /dev/mapper/*/lv_root, which is mounted on /, and I
> needed more of that. Since /opt comes under this, it was as empty of space
> as /var. So this meant using lvm commands to resize *lv_root and add space
> to it. I got into trouble with this unfortunately.
>
> Stuart suggested using 'lvextend' and 'lgextend' and perhaps I should have
> researched that more. Instead, I found this how-to and followed it:
>
> http://www.how2centos.com/centos-lvm-resizing-guide/
>
> I robbed 1.2T of space from /dev/vg_cobbler1/lv_home using 'lvresize' and
> got these messages:
>
> lvresize -L -1.2T /dev/vg_cobbler1/lv_home
> rounding up size to full physical 1.20 TiB
> ..
> reducing logical volume lv_home to 577.98 GiB
>
> Then tried putting this space into /dev/vg_cobbler1/lv_root:
>
> lvresize -L +1.2T /dev/vg_cobbler1/lv_root
> rounding up size to full physical extent 1.20 TiB
> Extending logical volume lv_root to 1.25 TiB
> Insufficient free space: 314573 extents needed but only 314572 available
>
>
> what is this trying to tell me? And how do I fix it? Have I ruined the
> filesystem(s) at this point?
>
> Should I have used 'lvextend' as suggested by Stuart, instead?
>
> The story will continue with what I did after this, but I would like to stop
> here and see what those of you more expert than me think.
>
> Thanks
>
> Bob
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://fedorahosted.org/mailman/listinfo/cobbler

Bob,

At first glance the problem of following that particular guide is that
it describes how to resize a SWAP partition.  The difference between a
SWAP partition and your home directory is that swap doesn't need a
file system so resizing the partition is all that is needed.

But your home partition contains a filesystem.

To exted you need to resize a partition then resize the filesystem, to
reduce you need to reduce the filesystem *first* then resize the
partition carefully so the filesystem still fits on the reduced
partition.

Now if you did not make any other changes chances are you can still
recover from this.  You're system appears to be in an invalid state
witht eh filesystem larger than the partition.  But as far ar I know
it can still work.

First of all backup your data before you make any more changes!
This is really important so I'll repeat: create a backup and verify it
on a different system.

Then I'd suggest to resize the partition back to it's original size.
Then reduce the size of the filesystem first and then reduce the size
of the partition again.

The basic instructions are available at
http://tldp.org/HOWTO/LVM-HOWTO/reducelv.html but it is very brief.  A
longer guide is available at
http://www.tcpdump.com/kb/os/linux/lvm-resizing-guide/shrink.html.

Good luck

Bram
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to