1 |
Róbert Èeròanský wrote: |
2 |
> On Sun, 27 Nov 2011 00:01:07 +0100 |
3 |
> Alex Schuster<wonko@×××××××××.org> wrote: |
4 |
> |
5 |
>> pvcreate /dev/sda5 |
6 |
>> vgcreate myvg /dev/sda5 |
7 |
>> lvcreate -n usr -L 10G myvg |
8 |
>> mke2fs -j /dev/myvg/usr |
9 |
>> |
10 |
>> Of course, just using /dev/sda5 for /usr is simpler. But what if this |
11 |
>> turns out to be too small? With so many partitions I would think this |
12 |
>> is very likely to happen sooner or later. With LVM, all you'd have to |
13 |
>> do is: |
14 |
>> |
15 |
>> lvresize -L +1G /dev/myvg/usr |
16 |
>> resize2fs /dev/myvg/usr |
17 |
> Here I do not understand from where this +1G is taken? Don't you have |
18 |
> to make something smaller by 1G first? |
19 |
> |
20 |
> Robert |
21 |
> |
22 |
> |
23 |
|
24 |
Nope. Not if you have 1Gb of space that is not used yet. Here is a |
25 |
example: |
26 |
|
27 |
root@fireball / # vgdisplay |
28 |
--- Volume group --- |
29 |
VG Name data |
30 |
System ID |
31 |
Format lvm2 |
32 |
Metadata Areas 1 |
33 |
Metadata Sequence No 9 |
34 |
VG Access read/write |
35 |
VG Status resizable |
36 |
MAX LV 0 |
37 |
Cur LV 1 |
38 |
Open LV 1 |
39 |
Max PV 0 |
40 |
Cur PV 1 |
41 |
Act PV 1 |
42 |
VG Size 698.63 GiB |
43 |
PE Size 4.00 MiB |
44 |
Total PE 178850 |
45 |
Alloc PE / Size 102400 / 400.00 GiB |
46 |
Free PE / Size 76450 / 298.63 GiB |
47 |
VG UUID eNF7B0-3BDb-qe1W-5FTH-4Uah-wRe1-xD7Xa8 |
48 |
|
49 |
root@fireball / # |
50 |
|
51 |
Right now there is 400Gbs of space used. I have 298Gbs of free space. |
52 |
If I wanted to add some space to something, lvresize -L +1G /dev/<path |
53 |
to lv here> would get it added then just resize the file system. |
54 |
|
55 |
That help? |
56 |
|
57 |
Dale |
58 |
|
59 |
:-) :-) |
60 |
|
61 |
-- |
62 |
I am only responsible for what I said ... Not for what you understood or how you interpreted my words! |