Am Montag, den 19.09.2011, 19:15 -0400 schrieb Johnny Tan:
Anyway, here's the real issue with LVM, at least in CentOS-6:
You would deal with the same issues in older lvm versions.
[root@jttest ~]# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vg_main-lv_root 1548144 1548144 0 100% /
Do i read that correctly and 1548144 1K Blocks are about 1,5G of Root File System? Please tell me you have a seperated /var for log files.
If not, for production use, install a tool which gives you a warning when reaching the 5% Level.
[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
So I can't extend a logical volume if there's no space in /etc?
lvm tries to be helpfull if you ran into a power failure and can then recover due his tmp files in /etc.
Granted, I only need to delete like 2k worth of files in the same logical volume as /etc to make the above work, but I don't recall lvresize or lvextend requiring space in /etc to do a resize. Has this always been the case? I don't have any 5.x servers handy to test this with. Can anyone verify?
You will have the same problem, i think this procedure is the same in all lvm2 versions, which seems a long time now.
If this is new, this seems less-than-ideal. /etc itself rarely fills up, so, in theory, I could make it its own LV, but that's even less ideal. For now, I'll stick to deleting just enough to do the extend/resize.
This is why the older unix guys always seperate stuff from / which could fill up the root file system. ;)