Róbert Čerňanský 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?

Robert



Nope. Not if you have 1Gb of space that is not used yet. Here is a example:

root@fireball / # vgdisplay
  --- Volume group ---
  VG Name               data
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  9
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               698.63 GiB
  PE Size               4.00 MiB
  Total PE              178850
  Alloc PE / Size       102400 / 400.00 GiB
  Free  PE / Size       76450 / 298.63 GiB
  VG UUID               eNF7B0-3BDb-qe1W-5FTH-4Uah-wRe1-xD7Xa8

root@fireball / #

Right now there is 400Gbs of space used. I have 298Gbs of free space. If I wanted to add some space to something, lvresize -L +1G /dev/<path to lv here> would get it added then just resize the file system.

That help?

Dale

:-)  :-)

--
I am only responsible for what I said ... Not for what you understood or how 
you interpreted my words!


Reply via email to