1 |
On Sunday 29 August 2010 03:24:42 Nikos Chantziaras wrote: |
2 |
> On 08/28/2010 10:42 PM, Dale wrote: |
3 |
> > Alex Schuster wrote: |
4 |
> >> Dale writes: |
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 |
> >> |
9 |
> >> I'd like this, too. cfdisk displays them, but is not abel to edit. |
10 |
> >> |
11 |
> >>> I looked into LVM a good while ago. It's just to much for me to keep |
12 |
> >>> up with since I just have a desktop system here. It has its good |
13 |
> >>> points but just way overkill for what I have here. |
14 |
> >> |
15 |
> >> It's not that complicated. In a nutshell: |
16 |
> >> |
17 |
> >> Choose the partitions you want to use for LVM, and prepare them to be |
18 |
> >> physical volumes: |
19 |
> >> pvcreate /dev/sda[678] |
20 |
> >> |
21 |
> >> Create a volume group out of these partitions: |
22 |
> >> vgcreate myvg /dev/sda[678] |
23 |
> >> |
24 |
> >> Create logical volumes in this volume group: |
25 |
> >> lvcreate -L 5G -n lvm1 myvg |
26 |
> >> lvcreate -L 2G -n lvm2 myvg |
27 |
> >> |
28 |
> >> Use these logical volumes just as disk partitions: |
29 |
> >> |
30 |
> >> mke2fs -j -L fs_on_lvm /dev/myvg/lvm1 |
31 |
> >> mount /dev/myg/lvm1 /mnt/fs_on_lvm |
32 |
> >> |
33 |
> >> The file system is too small? Just extend its size by 1G, without |
34 |
> >> unmouning: |
35 |
> >> |
36 |
> >> lvresize -L +1G /dev/myvg/lvm1 |
37 |
> >> |
38 |
> >> The volume groups is getting full, no space to add LVMs? Add other |
39 |
> >> partitions. If you like, even from a 2nd drive: |
40 |
> >> |
41 |
> >> pvcreate /dev/sdb5 |
42 |
> >> vgextend myvg /dev/sdb5 |
43 |
> >> |
44 |
> >> So, it's of course more complicated than just firing up cfdisk, create |
45 |
> >> partitions and file systems on them, but you have much more flexibility. |
46 |
> >> Once you have LVM, you do not have to care what the actual device |
47 |
> >> names of |
48 |
> >> your drives are. If sda becomes sdb and vice versa, no problem, and |
49 |
> >> nothing to worry about. LVM does not use the device name, it scans each |
50 |
> >> partition and uses the LVM UUIDs on them to identify what is what. |
51 |
> >> |
52 |
> >> Wonko |
53 |
> > |
54 |
> > Since I finally got this thing settled with partition sizes, that's |
55 |
> > pretty complicated. I have root, /boot, /home, portage and a data |
56 |
> > partition for misc. junk. I doubt it will change any in the near future. |
57 |
> > |
58 |
> > I did read up on it one time a while back. It's neat when you have to |
59 |
> > add drives and resize things but still a bit much for a little desktop. |
60 |
> |
61 |
> I'd stay away from LVM. I started using it on a Debian Lenny machine |
62 |
> and performance went down the drain. For example, deleting a 3GB file |
63 |
> was almost instant and now it takes like 15 seconds. It's almost as if |
64 |
> with LVM, deleting a file means writing 0 all over the 3GB first :-/ |
65 |
|
66 |
That sounds like a different issue. |
67 |
I haven't noticed any major performance issues myself. |
68 |
|
69 |
But to test quickly: |
70 |
LVM: |
71 |
# ~/speedtest $ time dd if=/dev/zero of=3gigfile bs=1024 count=3000000 |
72 |
3000000+0 records in |
73 |
3000000+0 records out |
74 |
3072000000 bytes (3.1 GB) copied, 33.3029 s, 92.2 MB/s |
75 |
|
76 |
real 0m33.305s |
77 |
user 0m0.440s |
78 |
sys 0m16.370s |
79 |
# ~/speedtest $ time rm 3gigfile |
80 |
|
81 |
real 0m3.827s |
82 |
user 0m0.000s |
83 |
sys 0m1.131s |
84 |
|
85 |
# hdparm -Tt /dev/sda |
86 |
|
87 |
/dev/sda: |
88 |
Timing cached reads: 4758 MB in 2.00 seconds = 2379.87 MB/sec |
89 |
Timing buffered disk reads: 274 MB in 3.02 seconds = 90.84 MB/sec |
90 |
************** |
91 |
Non-LVM: |
92 |
# /data/speedtest $ time dd if=/dev/zero of=3gigfile bs=1024 count=3000000 |
93 |
3000000+0 records in |
94 |
3000000+0 records out |
95 |
3072000000 bytes (3.1 GB) copied, 38.2821 s, 80.2 MB/s |
96 |
|
97 |
real 0m38.284s |
98 |
user 0m0.397s |
99 |
sys 0m9.490s |
100 |
# /data/speedtest $ time rm 3gigfile |
101 |
|
102 |
real 0m0.721s |
103 |
user 0m0.000s |
104 |
sys 0m0.720s |
105 |
|
106 |
# hdparm -Tt /dev/sdb |
107 |
|
108 |
/dev/sdb: |
109 |
Timing cached reads: 3396 MB in 2.00 seconds = 1698.30 MB/sec |
110 |
Timing buffered disk reads: 252 MB in 3.00 seconds = 83.94 MB/sec |
111 |
|
112 |
|
113 |
Both filesystems are ext3 |
114 |
|
115 |
Based on this, it takes about 3 seconds more. That is something I can easily |
116 |
live with. |
117 |
But instantaneous to 15 seconds, I think there might be some other factors |
118 |
there? |
119 |
|
120 |
-- |
121 |
Joost |