Re: LVM lvresize/lvextend requires some space in /etc to grow a logical volume?

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



On Mon, Sep 19, 2011 at 10:19 PM, Keith Keller
<kkeller@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, Sep 19, 2011 at 07:15:09PM -0400, Johnny Tan wrote:
>> Anyway, here's the real issue with LVM, at least in CentOS-6:
>>
>> [root@jttest ~]# df
>> Filesystem           1K-blocks      Used Available Use% Mounted on
>> /dev/mapper/vg_main-lv_root
>>                        1548144   1548144         0 100% /
>>
>> [root@jttest ~]# lvextend -L 2G /dev/vg_main/lv_root
>>   /etc/lvm/archive/.lvm_jttest.pp.local_5523_51321310: write error
>> failed: No space left on device
>>   Volume group "vg_main" metadata archive failed.
>>   /etc/lvm/cache/.cache.tmp: write error failed: No space left on device
>
> Many LVM modifications make a backup of the lvm metadata, which
> typically resides in /etc/lvm.  You might try the -A n switch to
> disable the automatic backups (after strongly heeding the advice
> in man lvm; but as you said, on a test system, it's fine to play
> with).

That did the trick:

[root@jttest~]# lvresize -L 2G /dev/vg_main/lv_root
  /etc/lvm/archive/.lvm_jttest.pp.local_1416_1029753972: write error
failed: No space left on device
  Volume group "vg_main" metadata archive failed.
  /etc/lvm/cache/.cache.tmp: write error failed: No space left on device
[root@jttest~]# lvresize -A n -L 2G /dev/vg_main/lv_root
  Extending logical volume lv_root to 2.00 GiB
  WARNING: This metadata update is NOT backed up
  Logical volume lv_root successfully resized
  /etc/lvm/cache/.cache.tmp: write error failed: No space left on device

(And the subsequent resize worked too.)

Thank you for pointing out the -A flag (missed the fine print of
common options being in man lvm).

As you noted, I would probably never run into this situation in a
non-testing environment and, if I did, would have much bigger
problems. This probably explains why I never saw it previously. Good
to know.

johnny
_______________________________________________
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