1 |
Róbert Èeròanský writes: |
2 |
|
3 |
> On Sun, 27 Nov 2011 00:01:07 +0100 |
4 |
> Alex Schuster <wonko@×××××××××.org> wrote: |
5 |
> |
6 |
> > pvcreate /dev/sda5 |
7 |
> > vgcreate myvg /dev/sda5 |
8 |
> > lvcreate -n usr -L 10G myvg |
9 |
> > mke2fs -j /dev/myvg/usr |
10 |
> > |
11 |
> > Of course, just using /dev/sda5 for /usr is simpler. But what if this |
12 |
> > turns out to be too small? With so many partitions I would think this |
13 |
> > is very likely to happen sooner or later. With LVM, all you'd have to |
14 |
> > do is: |
15 |
> > |
16 |
> > lvresize -L +1G /dev/myvg/usr |
17 |
> > resize2fs /dev/myvg/usr |
18 |
> |
19 |
> Here I do not understand from where this +1G is taken? Don't you have |
20 |
> to make something smaller by 1G first? |
21 |
|
22 |
I assumed that /dev/sda5 is large enough and has free space that is not |
23 |
being used for logical volumes. The lvcreate -L 10G step creates a |
24 |
logical volume of 10 GB size, the rest of the volume group (that is using |
25 |
the physical volume /dev/sda5) is being unused. You can create other |
26 |
logical volumes with lvcreate, or extend existing ones, until all of that |
27 |
space is being used. Then, you need to make something smaller of course |
28 |
(which can be done), or you can extend your volume group by another |
29 |
partition. Which may be on the same drive, or even on another one. |
30 |
|
31 |
pvcreate /dev/sda6 |
32 |
vgextend myvg /dev/sda6 |
33 |
lvresize... |
34 |
|
35 |
Wonko |