On Sun, 27 Nov 2011 09:02:37 +0100 Róbert Čerňanský <hslis...@zoznam.sk> wrote:
> On Sun, 27 Nov 2011 00:01:07 +0100 > Alex Schuster <wo...@wonkology.org> wrote: > > > pvcreate /dev/sda5 > > vgcreate myvg /dev/sda5 > > lvcreate -n usr -L 10G myvg > > mke2fs -j /dev/myvg/usr > > > > Of course, just using /dev/sda5 for /usr is simpler. But what if > > this turns out to be too small? With so many partitions I would > > think this is very likely to happen sooner or later. With LVM, all > > you'd have to do is: > > > > lvresize -L +1G /dev/myvg/usr > > resize2fs /dev/myvg/usr > > Here I do not understand from where this +1G is taken? Don't you have > to make something smaller by 1G first? The 1G is taken from the free pool of unused extents. This assumes you have free extents, if not, then you do need to free some up somwehere else first. Using LVM is a lot like using a SAN - don't allocate everything right at the beginning, rather give each lv what it needs today and grow it as space needs change. This way you always have free extents available for use. -- Alan McKinnnon alan.mckin...@gmail.com