1 |
On 08/28/2010 10:42 PM, Dale wrote: |
2 |
> Alex Schuster wrote: |
3 |
>> Dale writes: |
4 |
>> |
5 |
>>> It would be nice if something like *fdisk could edit the labels tho. |
6 |
>>> It would be so much easier. I didn't see anything in the man pages |
7 |
>>> tho. |
8 |
>> I'd like this, too. cfdisk displays them, but is not abel to edit. |
9 |
>> |
10 |
>>> I looked into LVM a good while ago. It's just to much for me to keep |
11 |
>>> up with since I just have a desktop system here. It has its good |
12 |
>>> points but just way overkill for what I have here. |
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 |
45 |
>> names of |
46 |
>> your drives are. If sda becomes sdb and vice versa, no problem, and |
47 |
>> nothing to worry about. LVM does not use the device name, it scans each |
48 |
>> partition and uses the LVM UUIDs on them to identify what is what. |
49 |
>> |
50 |
>> Wonko |
51 |
>> |
52 |
> |
53 |
> Since I finally got this thing settled with partition sizes, that's |
54 |
> pretty complicated. I have root, /boot, /home, portage and a data |
55 |
> partition for misc. junk. I doubt it will change any in the near future. |
56 |
> |
57 |
> I did read up on it one time a while back. It's neat when you have to |
58 |
> add drives and resize things but still a bit much for a little desktop. |
59 |
|
60 |
I'd stay away from LVM. I started using it on a Debian Lenny machine |
61 |
and performance went down the drain. For example, deleting a 3GB file |
62 |
was almost instant and now it takes like 15 seconds. It's almost as if |
63 |
with LVM, deleting a file means writing 0 all over the 3GB first :-/ |