* [linux-lvm] Mirroring my install. Lots of problems !
@ 2007-01-15 9:42 Georges Giralt
2007-01-19 7:12 ` Luca Berra
0 siblings, 1 reply; 3+ messages in thread
From: Georges Giralt @ 2007-01-15 9:42 UTC (permalink / raw)
To: linux-lvm
Hi !
Disclaimer : I've tried this only on a Fedora Core 6 install with the latest
(fedora) kernel 2.6.18-xxx so take my post accordingly.
Here is what I plan to do and have trouble with :
I set up my Fedora system on a 160G IDE disk using LVM this way
hda1 is a 100 Mb plain EXT3 for /boot.
hda2 is a 55 GB LVM PV. (for my vg0 holding 4 LV for /, swap, /usr and /var)
hda3 is another pv for vg-ext (holding 2 lv, /home and /extra for extra stuff)
So far, fine.
I added another 160Gb IDE disk (quite identical, the original one is a
"Maxtor-Seagate" and the new one is a "plain" Seagate with same specs)
So I planned to switch to mirroring to survive a disk failure.
As I'm a unix system engineer working for more than 20 years on HP, Sun, IBM and
Bull AIX boxes, and practising Linux since Kernel 0.8 I was confident to
succeed. I was wrong.
Here is what I planned to do :
1) partition the second disk exactly as the first one.
2) pvcreate hdb2 and hdb3
3) vgextend /lvconvert vg0 and vg-ext to have one mirror copy
4) Enjoy, have a beer.
The conversion was a failure, because the tools asked for a THIRD disk in order
to mirror the VG. Funny. I thought GNU/Linux was clever, I was wrong. How come
HP-UX or Aix can do LVM mirror on 2 disks and not Linux ? (the corelog option
is also an issue, as reconstruction will take place at every reboot which occur
often as this is a home box, not a server)
So I decided to try a more complex approach : Create a mirror using the mdtools
(mdadm) and turn this into a VG. My plan was as follow :
1) create a critical mirror using mdadm with only one copy active on hdb2 repeat
with hdb3.
2) pvcreate md0 and md1
3) add md0 to vg0 and md1 to vg-ext
4) pvmove all vg0 lv to md0 and all vg-ext lv to md1.
5) vgreduce vg0 to remove hda2 and vg-ext to remove hda3
6) add hda2 to md0 and hda3 to md1 and force re-sync
7) have a beer, and enjoy.
Again, a disaster. I CAN'T add an md to a vg and have the vg work. I've tried to
do it using plain md0 to pvcreate, partitionning md0 to create md0p1 and
pvcreate this (it's impossible, as there is no /dev/md0p1 device...)
I've even tried to use system-config-lvm which is the Fedora graphical tool in
order to overcome my lack of knowledge, but this tools does not see the md as
unused devices, so I'm not the only one left without knowledge...
So, thanks for having read up to this point! My question is :
How do you folks do to have LVM and Mirror working at the same time on a Fedora
Core box ? And using ONLY two disks ? (I thing 160 GB is quite large for the
job, isn't it ? )
Thanks for your help and patience ;-)
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Mirroring my install. Lots of problems !
2007-01-15 9:42 [linux-lvm] Mirroring my install. Lots of problems ! Georges Giralt
@ 2007-01-19 7:12 ` Luca Berra
2007-01-20 20:31 ` Georges Giralt
0 siblings, 1 reply; 3+ messages in thread
From: Luca Berra @ 2007-01-19 7:12 UTC (permalink / raw)
To: linux-lvm
On Mon, Jan 15, 2007 at 10:42:26AM +0100, Georges Giralt wrote:
...
>The conversion was a failure, because the tools asked for a THIRD disk in order
>to mirror the VG. Funny. I thought GNU/Linux was clever, I was wrong. How come
>HP-UX or Aix can do LVM mirror on 2 disks and not Linux ? (the corelog option
>is also an issue, as reconstruction will take place at every reboot which occur
>often as this is a home box, not a server)
i am still waiting for the lvm mirror interface to settle before trying
to use it, so i cannot comment...
>So I decided to try a more complex approach : Create a mirror using the mdtools
>(mdadm) and turn this into a VG. My plan was as follow :
>1) create a critical mirror using mdadm with only one copy active on hdb2 repeat
>with hdb3.
>2) pvcreate md0 and md1
>3) add md0 to vg0 and md1 to vg-ext
>4) pvmove all vg0 lv to md0 and all vg-ext lv to md1.
>5) vgreduce vg0 to remove hda2 and vg-ext to remove hda3
>6) add hda2 to md0 and hda3 to md1 and force re-sync
>7) have a beer, and enjoy.
this is the best part of your plan :)
>Again, a disaster. I CAN'T add an md to a vg and have the vg work. I've tried to
>do it using plain md0 to pvcreate, partitionning md0 to create md0p1 and
>pvcreate this (it's impossible, as there is no /dev/md0p1 device...)
can you please be more verbose as to why you can't add an md to a vg
eg showing logs and output of lvm commands with verbose options.
i usually pvcreate md devices without any problem.
regards,
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [linux-lvm] Mirroring my install. Lots of problems !
2007-01-19 7:12 ` Luca Berra
@ 2007-01-20 20:31 ` Georges Giralt
0 siblings, 0 replies; 3+ messages in thread
From: Georges Giralt @ 2007-01-20 20:31 UTC (permalink / raw)
To: LVM general discussion and development
Luca Berra a �crit :
> On Mon, Jan 15, 2007 at 10:42:26AM +0100, Georges Giralt wrote:
> ...
>> The conversion was a failure, because the tools asked for a THIRD disk
>> in order
>> to mirror the VG. Funny. I thought GNU/Linux was clever, I was wrong.
>> How come
>> HP-UX or Aix can do LVM mirror on 2 disks and not Linux ? (the corelog
>> option
>> is also an issue, as reconstruction will take place at every reboot
>> which occur
>> often as this is a home box, not a server)
> i am still waiting for the lvm mirror interface to settle before trying
> to use it, so i cannot comment...
>
>> So I decided to try a more complex approach : Create a mirror using
>> the mdtools
>> (mdadm) and turn this into a VG. My plan was as follow :
>> 1) create a critical mirror using mdadm with only one copy active on
>> hdb2 repeat
>> with hdb3.
>> 2) pvcreate md0 and md1
>> 3) add md0 to vg0 and md1 to vg-ext
>> 4) pvmove all vg0 lv to md0 and all vg-ext lv to md1.
>> 5) vgreduce vg0 to remove hda2 and vg-ext to remove hda3
>> 6) add hda2 to md0 and hda3 to md1 and force re-sync
>> 7) have a beer, and enjoy.
> this is the best part of your plan :)
>> Again, a disaster. I CAN'T add an md to a vg and have the vg work.
>> I've tried to
>> do it using plain md0 to pvcreate, partitionning md0 to create md0p1 and
>> pvcreate this (it's impossible, as there is no /dev/md0p1 device...)
> can you please be more verbose as to why you can't add an md to a vg
> eg showing logs and output of lvm commands with verbose options.
> i usually pvcreate md devices without any problem.
>
> regards,
> L.
>
Hi Luca !
So I've got some beer, and re-tried a lot of things to mirror my install.
First, I've added a third disk in my box hopping it would be easier to
mirror the vg/lv using lvm as I've trouble going the raid way.
here are one message I get when I try to mirror an lv using 3 disks and
system-config-lvm which is a Fedora GUI :
pvmove command failed. Command attempted: "/usr/sbin/pvmove --name
/dev/vgF32/lv1 /dev/hda3:0-2559 /dev/sda3" - System Error Message:
device-mapper: reload ioctl failed: Invalid argument
ABORTING: Temporary mirror activation failed. Run pvmove --abort.
device-mapper: reload ioctl failed: Invalid argument
device-mapper: reload ioctl failed: Invalid argument
I get quite the same message if I try to move one "physical" PV (say
hda3 to a mirrored device say md0.
So I'm left with no mirroring whatever solution I try to use...
Here is my configuration :
hda IDE 160GB disk
hdb same disk as above
sda Sata 160GB disk same make and model as above except for SATA of course.
The VG/LV I try t mirror is a 55GB vg which comprises 4 lv (10G,used as
/; 4G (swap); 10G used as /usr and 10G used as /var ) which hold a 32
bits version of FC6
I'm running kernel 2.6.19-1.2895.fc6 which is the last Fedora 6 one,
lvm is :
lvm> version
LVM version: 2.02.06 (2006-05-12)
Library version: 1.02.07 (2006-05-11)
Driver version: 4.10.0
lvm>
And please don't tell me to use the latest one as I _do_ prefer not to
install a non pre packaged version of software... It makes Fedora behave
quite strangely...
thanks for your help !
--
Ce message est constitu� d'au moins 50 % d'�lectrons recycl�s.
S'il vous pla�t, aidez nous � conserver nos ressources,
recyclez vos �lectrons !
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-01-20 20:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-15 9:42 [linux-lvm] Mirroring my install. Lots of problems ! Georges Giralt
2007-01-19 7:12 ` Luca Berra
2007-01-20 20:31 ` Georges Giralt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.