1 |
Dale writes: |
2 |
|
3 |
> It would be nice if something like *fdisk could edit the labels tho. |
4 |
> It would be so much easier. I didn't see anything in the man pages |
5 |
> tho. |
6 |
|
7 |
I'd like this, too. cfdisk displays them, but is not abel to edit. |
8 |
|
9 |
> I looked into LVM a good while ago. It's just to much for me to keep |
10 |
> up with since I just have a desktop system here. It has its good |
11 |
> points but just way overkill for what I have here. |
12 |
|
13 |
It's not that complicated. In a nutshell: |
14 |
|
15 |
Choose the partitions you want to use for LVM, and prepare them to be |
16 |
physical volumes: |
17 |
pvcreate /dev/sda[678] |
18 |
|
19 |
Create a volume group out of these partitions: |
20 |
vgcreate myvg /dev/sda[678] |
21 |
|
22 |
Create logical volumes in this volume group: |
23 |
lvcreate -L 5G -n lvm1 myvg |
24 |
lvcreate -L 2G -n lvm2 myvg |
25 |
|
26 |
Use these logical volumes just as disk partitions: |
27 |
|
28 |
mke2fs -j -L fs_on_lvm /dev/myvg/lvm1 |
29 |
mount /dev/myg/lvm1 /mnt/fs_on_lvm |
30 |
|
31 |
The file system is too small? Just extend its size by 1G, without |
32 |
unmouning: |
33 |
|
34 |
lvresize -L +1G /dev/myvg/lvm1 |
35 |
|
36 |
The volume groups is getting full, no space to add LVMs? Add other |
37 |
partitions. If you like, even from a 2nd drive: |
38 |
|
39 |
pvcreate /dev/sdb5 |
40 |
vgextend myvg /dev/sdb5 |
41 |
|
42 |
So, it's of course more complicated than just firing up cfdisk, create |
43 |
partitions and file systems on them, but you have much more flexibility. |
44 |
Once you have LVM, you do not have to care what the actual device names of |
45 |
your drives are. If sda becomes sdb and vice versa, no problem, and |
46 |
nothing to worry about. LVM does not use the device name, it scans each |
47 |
partition and uses the LVM UUIDs on them to identify what is what. |
48 |
|
49 |
Wonko |