I think its the same reason I do it in my kickstarts. If a filesystem fills up 
it's not going to kill the OS. I have customers fill up /opt(a filesystem) with 
oracle logs. This causes oracle to have issues but doesnt impact the rest of 
the OS.

If I had the same issue..one option is to just symbolic link the directory 
without messing with LVM resizing.

-Jim


-----Original Message-----
From: cobbler-boun...@lists.fedorahosted.org on behalf of Dick Davies
Sent: Wed 7/4/2012 8:30 AM
To: cobbler mailing list
Subject: Re: [cobbler] Using 'lvresize' vs. 'lvextend' to correct space 
shortage in /var/www/cobbler
 
Think it's fundamentally an EL 6.x issue where they changed the autopart
defaults to split out into multiple filesystems. Still can't see why.

On 4 July 2012 13:54, Bob Cochran <bcochra...@verizon.net> wrote:
> On 7/4/12 2:59 AM, Bram Mertens wrote:
>>
>> On Tue, Jul 3, 2012 at 10:03 PM, Bob Cochran<bcochra...@verizon.net>
>> 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
>>> cobbler@lists.fedorahosted.org
>>> 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
>
>
> Bram and Ramon,
>
> Thank you very much for your help with this. I understand my mistakes better
> now. I do have a complete backup of my CentOS system: I cloned the entire
> hard drive to a spare hard drive, and then did all my resizing work from the
> spare drive. So the original system drive is untouched.
>
> It is extremely rare for me to need to do LVM resizes. I think I've done
> only one before, a few years ago. After making the above mistakes yesterday
> (and actually making them a lot worse by using resize2fs on *lv_root) I
> decided to simply reinstall CentOS 6.2 on that hard drive, reinstall cobbler
> and its dependencies, and get the partition sizing correct from the start.
>
> I think the Cobbler installation instructions need to contain a note that on
> CentOS systems which are using LVM, the root partition isn't going to get
> enough space in a default installation, so an LVM resize will be needed or
> even a reinstall of CentOS. I didn't understand this clearly until James
> pointed it out to me -- that on my system /var had run out of space. It is a
> lot easier to get the OS partitioned correctly before one is well into using
> cobbler.
>
> Since I do have the original system drive, I will practice an LVM resize on
> that. I can see myself needing to work with LVM much more in the future.
>
> Thanks!
>
>
> Bob
>
> _______________________________________________
> cobbler mailing list
> cobbler@lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/cobbler
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler

_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to