1 |
Just a think |
2 |
|
3 |
I'm trying lvm, it's great ! |
4 |
We can add remove logical volume, resize them on the fly, and a great |
5 |
think : |
6 |
use power of both disk combinated (strippes) |
7 |
|
8 |
One disk speed for me in read = 45 mo /s |
9 |
Two disk combinated in read = 75 mo /s |
10 |
|
11 |
Have fun |
12 |
|
13 |
Dale a écrit : |
14 |
> Dirk Heinrichs wrote: |
15 |
>> Am Freitag, 17. November 2006 23:30 schrieb ext Dale: |
16 |
>> |
17 |
>> |
18 |
>>> Somewhat on topic here. How hard is it to do this with no previous |
19 |
>>> knowledge of how it works? I am constantly running into the same thing |
20 |
>>> the OP is and having to move things around. Currently I have two 80GB |
21 |
>>> |
22 |
>>> drives. Here is my partition scheme at the moment: |
23 |
>>> |
24 |
>>>> root@smoker / # mount |
25 |
>>>> /dev/hda6 on / type reiserfs (rw) |
26 |
>>>> /dev/hda1 on /boot type reiserfs (rw,noatime,notail) |
27 |
>>>> /dev/hda7 on /home type reiserfs (rw) |
28 |
>>>> /dev/hda8 on /usr type reiserfs (rw) |
29 |
>>>> /dev/hda9 on /usr/portage type reiserfs (rw) |
30 |
>>>> /dev/hda10 on /data type reiserfs (rw) |
31 |
>>>> root@smoker / # |
32 |
>>>> root@smoker / # df |
33 |
>>>> Filesystem 1K-blocks Used Available Use% Mounted on |
34 |
>>>> /dev/hda6 9765136 1896004 7869132 20% / |
35 |
>>>> /dev/hda1 146612 45880 100732 32% /boot |
36 |
>>>> /dev/hda7 9765136 1236144 8528992 13% /home |
37 |
>>>> /dev/hda8 9765136 4269660 5495476 44% /usr |
38 |
>>>> /dev/hda9 5859272 3052004 2807268 53% /usr/portage |
39 |
>>>> /dev/hda10 43762436 10667796 33094640 25% /data |
40 |
>>>> root@smoker / # |
41 |
>>>> |
42 |
>>> Just looking to get a better grasp on this since it sounds like |
43 |
>>> something I need to try. |
44 |
>>> |
45 |
>> |
46 |
>> OK, here's my proposal: First, decide which volume management system to use |
47 |
>> (LVM or EVMS). LVM is just one more volume management tool which you would |
48 |
>> have to learn (beside fdisk, mkfs.*, raid tools, ...), while EVMS does it |
49 |
>> all, and more. Then, do the real work: |
50 |
>> |
51 |
> |
52 |
> Which one is better and good for someone new to this? I'm fairly |
53 |
> descent at Linux. Just thought I would warn you I am not a guru, |
54 |
> yet. ;-) I'm working on it though. |
55 |
>> You mentioned you have two 80G disks, but in the output above I only see one |
56 |
>> in use. If this is really the case, you could start converting to LVM/EVMS |
57 |
>> with the second one (assuming you don't use SW RAID, which I have no |
58 |
>> knowledge of). Emerge LVM or EVMS, depending on your choice, and make sure |
59 |
>> you have CONFIG_BLK_DEV_DM in your kernel. Then either switch to runlevel 1 |
60 |
>> or use a LiveCD to do the real work. |
61 |
>> |
62 |
> |
63 |
> I do have two 80GB drives. One is a Maxtor and one is a Western |
64 |
> Digital. The Maxtor is faster since it has more cache. It is hda and |
65 |
> the one I boot off of. I use the other to back up on before a major |
66 |
> upgrade, like gcc or something that can really screw things up. Even |
67 |
> did it once before a --depclean too. Never needed it but I had it if |
68 |
> I did. I usually boot the Gentoo CD and mount the partitions and just |
69 |
> do a cp -av and let it roll by. I never could master that tar thing |
70 |
> others use. |
71 |
>> 1) Create one big partition on the second disk, with type LVM |
72 |
>> 2) Create a volume group from this partition, choose whatever name you like. |
73 |
>> 3) Create logical volumes inside this volume group, one for each partition |
74 |
>> you have on hda, except /boot and /, create filesystems on them and mount |
75 |
>> them somewhere. From the values above, you still have /var and /opt inside |
76 |
>> hda6. Create new LV's for these two also. |
77 |
>> 4) Copy over the data partitionwise, like: cd /home && tar -clf - .| |
78 |
>> tar -C /mnt/home -xBpvf - |
79 |
>> 5) Change fstab accordingly and check RC_VOLUME_ORDER in /etc/conf.d/rc. |
80 |
>> 6) Rename your old /var and /opt (to /var.save and /opt.save) and recreate |
81 |
>> them as empty directories (you will mount the new LV's there). |
82 |
>> 7) Since you didn't touch /boot and /, you should now be able to boot with |
83 |
>> working LVM/EVMS setup. If this is the case, we can now do some changes on |
84 |
>> hda. |
85 |
>> 8) You will need to boot a LiveCD now, for shrinking hda6 to a reasonable |
86 |
>> amount (256M). |
87 |
>> 9) Create a (temporary) LV, create a filesystem, mount it somewhere and use |
88 |
>> tar as above to copy over / to the new filesystem. |
89 |
>> 10) Repartition hda: Delete all partitions except hda1 (/boot). Create 2 new |
90 |
>> ones, hda2 (/, 256M) and hda3 (rest of the disk, type LVM), make a |
91 |
>> filesystem on hda2 and mount it. |
92 |
>> 11) Delete the old (renamed) /var.save and /opt.save from the temporary copy |
93 |
>> of /, then use tar again to copy your / back to hda1. |
94 |
>> 12) Add hda3 to the already existing volume group. |
95 |
>> 13) (Optional) You could now move all logical volumes to hda3 and afterwards |
96 |
>> delete hdb1 from the volume group. This would enable you to setup SW RAID 1 |
97 |
>> (Mirroring) in the future. If you want to use all 160G, keep it as it is. |
98 |
>> 14) reboot, without LiveCD. Hopefully your system should be up and running |
99 |
>> now. |
100 |
>> 15) Delete the temporary LV from step 9). |
101 |
>> |
102 |
>> |
103 |
>> Enjoy your new flexibility. |
104 |
>> |
105 |
>> Bye... |
106 |
>> |
107 |
>> Dirk |
108 |
>> |
109 |
> |
110 |
> OK. I did a cfdisk /dev/hdb and I found type "8E Linux LVM" and I |
111 |
> assume that it is the one you mentioned. I have not changed anything |
112 |
> just yet. I'm just exploring the idea here. So . . I make a boot |
113 |
> partition like I normally would, hda1. Then create another partition |
114 |
> that is the LVM type, primary or logical or doesn't matter? Is that |
115 |
> correct? Is that all I have to do with cfdisk? I assume the rest is |
116 |
> done elsewhere. This is the part I am trying to get my head wrapped |
117 |
> around. I can't seem to figure out how it gets split up quite yet. |
118 |
> Maybe you can "dummy" it down a bit for me? LOL |
119 |
> |
120 |
> Can I also assume the 2006 Gentoo CD supports this? You also realize |
121 |
> this is going to screw up my uptime? It sounds like this may be worth |
122 |
> it though. Alexander mentioned a snapshot. Is that like making a |
123 |
> backup? Sounds like a windoze restore point or whatever they call |
124 |
> that thing. I don't use windoze at all here. I just mess with |
125 |
> everybody elses crap. |
126 |
> |
127 |
> My plan, copy my OS over to hdb, then set up LVM or EVMS on hda and |
128 |
> then copy it back. I like my Maxtor since it is faster. All this |
129 |
> from the Gentoo CD of course. I'm OK with that Gentoo CD. It only |
130 |
> took me about three times to get my install to boot. O_O I plan to |
131 |
> eventually use all 160GB of space but the mirror sounds neat too. I'm |
132 |
> on dial-up so I can't fill up a hard drive to fast anyway. Sucky |
133 |
> 26K. :-( |
134 |
> |
135 |
> Thanks for the help. Links are welcome. I try to read as much as I |
136 |
> can. |
137 |
> |
138 |
> Dale |
139 |
> |
140 |
> :-) :-) :-) |
141 |
|
142 |
|
143 |
|
144 |
|
145 |
|
146 |
|
147 |
___________________________________________________________________________ |
148 |
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! |
149 |
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses |
150 |
http://fr.answers.yahoo.com |
151 |
-- |
152 |
gentoo-user@g.o mailing list |