* Adding a mirror to a RAID1 Device [not found] <S262074AbTKYGHX/20031125060723Z+10693@vger.kernel.org> @ 2003-11-25 6:19 ` Caleb Crome 2003-11-25 7:21 ` Neil Brown 0 siblings, 1 reply; 11+ messages in thread From: Caleb Crome @ 2003-11-25 6:19 UTC (permalink / raw) To: linux-raid Hello all, I've got a peculiar problem. I added some new disk space to my system (Linux 2.4.19, Mandrake), and created a RAID1 drive /dev/md0 with only 1 active mirror because I didn't have enough space (yet) to put everything on my new raid drive. I had the intention of then addeding another disk to the raid setup later so that it would just auto-reconsctruct and be ready to go. However, when I do raidhotadd, I doesn't seem to reconsctruct. So, my /proc/mdstat looks like this: Personalities : [raid1] read_ahead 1024 sectors md0 : active raid1 ide/host0/bus1/target0/lun0/part3[0] 81920064 blocks [1/1] [U] When I raidhotadd /dev/md0 /dev/ide/host0/bus0/target0/lun0/part3 I get the following /proc/mdstat: Personalities : [raid1] read_ahead 1024 sectors md0 : active raid1 ide/host0/bus1/target0/lun0/part3[0] \ <contd.> ide/host0/bus0/target0/lun0/part3[0] 81920064 blocks [1/1] [U] unused devices: <none> It doesn't reconsctruct the drive from bus0 as I expected it to. What do I do to convince the kernel to do the reconstruction? Thanks, -Caleb ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Adding a mirror to a RAID1 Device 2003-11-25 6:19 ` Adding a mirror to a RAID1 Device Caleb Crome @ 2003-11-25 7:21 ` Neil Brown 2003-11-25 21:03 ` jlewis 2003-12-21 8:23 ` H. Peter Anvin 0 siblings, 2 replies; 11+ messages in thread From: Neil Brown @ 2003-11-25 7:21 UTC (permalink / raw) To: Caleb Crome; +Cc: linux-raid On Monday November 24, linux-raid@crome.org wrote: > Hello all, I've got a peculiar problem. I added some new disk space to my > system (Linux 2.4.19, Mandrake), and created a RAID1 drive /dev/md0 with > only 1 active mirror because I didn't have enough space (yet) to put > everything on my new raid drive. I had the intention of then addeding > another disk to the raid setup later so that it would just > auto-reconsctruct and be ready to go. Sorry, but that was the wrong thing to do. A raid1 with only one drive is pretty pointless, but you asked for it and you got it :-) What you should have done is make a raid1 with 2 drives, one of which was missing/failed. With mdadm, the command would be: mdadm -C /dev/md0 --level=raid1 --disks=2 /dev/hda3 missing then you can hot-add the extra drive when it arrives. What you have to do now is recreate the raid1 with two drives. You will have to have the filesystem unmounted and the raid stopped, but you will not lose any data. NeilBrown ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Adding a mirror to a RAID1 Device 2003-11-25 7:21 ` Neil Brown @ 2003-11-25 21:03 ` jlewis 2003-11-25 22:01 ` Neil Brown 2003-12-21 8:23 ` H. Peter Anvin 1 sibling, 1 reply; 11+ messages in thread From: jlewis @ 2003-11-25 21:03 UTC (permalink / raw) To: linux-raid On Tue, 25 Nov 2003, Neil Brown wrote: > What you should have done is make a raid1 with 2 drives, one of which > was missing/failed. With mdadm, the command would be: > > mdadm -C /dev/md0 --level=raid1 --disks=2 /dev/hda3 missing > > then you can hot-add the extra drive when it arrives. > > What you have to do now is recreate the raid1 with two drives. You > will have to have the filesystem unmounted and the raid stopped, but > you will not lose any data. I have a somewhat related question. Suppose I have a system with RAID1 (several md devices) using identical partitions on hda and hdc. When a card that works arrives, I want to move these two disks to the faster ATA interfaces, which will likely make then hde and hdg. To do this, can I fail hdc, move it to hde, edit the raidtab on hde to say that the md devices are hde and hdg, start up that "new" RAID1 degraded, then pull hda, and hot add it to the new md devices and resync? Is there a better way to get these 2 disks moved from the ATA33 motherboard interfaces to an ATA100 controller card? Perhaps just boot in rescue mode from a CD (system told me a bootfloppy could not be made due to kernel/modules sizes) edit raidtab and then just reboot? ---------------------------------------------------------------------- Jon Lewis *jlewis@lewis.org*| I route Senior Network Engineer | therefore you are Atlantic Net | _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Adding a mirror to a RAID1 Device 2003-11-25 21:03 ` jlewis @ 2003-11-25 22:01 ` Neil Brown 2003-11-25 22:06 ` Dan Egli 2003-11-26 23:09 ` jlewis 0 siblings, 2 replies; 11+ messages in thread From: Neil Brown @ 2003-11-25 22:01 UTC (permalink / raw) To: jlewis; +Cc: linux-raid On Tuesday November 25, jlewis@lewis.org wrote: > On Tue, 25 Nov 2003, Neil Brown wrote: > > > What you should have done is make a raid1 with 2 drives, one of which > > was missing/failed. With mdadm, the command would be: > > > > mdadm -C /dev/md0 --level=raid1 --disks=2 /dev/hda3 missing > > > > then you can hot-add the extra drive when it arrives. > > > > What you have to do now is recreate the raid1 with two drives. You > > will have to have the filesystem unmounted and the raid stopped, but > > you will not lose any data. > > I have a somewhat related question. Suppose I have a system with RAID1 > (several md devices) using identical partitions on hda and hdc. When a > card that works arrives, I want to move these two disks to the faster ATA > interfaces, which will likely make then hde and hdg. > > To do this, can I fail hdc, move it to hde, edit the raidtab on hde to say > that the md devices are hde and hdg, start up that "new" RAID1 degraded, > then pull hda, and hot add it to the new md devices and resync? > > Is there a better way to get these 2 disks moved from the ATA33 > motherboard interfaces to an ATA100 controller card? Perhaps just boot in > rescue mode from a CD (system told me a bootfloppy could not be made due > to kernel/modules sizes) edit raidtab and then just reboot? Just power down the machine move the drives power up again all is done.... unless you are using raidstart, but that is universally a mistake. If you are using "Linux RAID" partition types, the kernel will find the partitions in their new location and assemble them for you just as it is now. If you are using mdadm to assemble you arrays (which I suspect you aren't as you talk about 'raidtab') then it will find them just as easily in the new location, providing you have include the new devices in the "DEVICES" line of mdadm.conf. If you are using raidstart to start your arrays, then stop doing that straight away and us a reliable method. You do not need to edit raidtab to reflect any changes you make. raidtab is primarily use for *creating* raid arrays, not for managaing them. NeilBrown ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Adding a mirror to a RAID1 Device 2003-11-25 22:01 ` Neil Brown @ 2003-11-25 22:06 ` Dan Egli 2003-11-25 22:45 ` Luca Berra 2003-11-25 22:58 ` jlewis 2003-11-26 23:09 ` jlewis 1 sibling, 2 replies; 11+ messages in thread From: Dan Egli @ 2003-11-25 22:06 UTC (permalink / raw) To: Neil Brown; +Cc: jlewis, linux-raid -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Neil Brown wrote: | | all is done.... unless you are using raidstart, but that is | universally a mistake. But all linux distributions I've used, save perhaps gentoo, DO use raidstart with /etc/raidtab. How do you configure it so the kernel assembles the array for you? /etc/fstab? - --- Dan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/w9J6twT22Jak4/4RAqLBAJ9hLOyuskoibjYPWQpl6pDK+WcL6ACgqht+ 5CjjV3CpL9mazeZqsHnjbKY= =Udzb -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Adding a mirror to a RAID1 Device 2003-11-25 22:06 ` Dan Egli @ 2003-11-25 22:45 ` Luca Berra 2003-11-25 22:56 ` Dan Egli 2003-11-25 22:58 ` jlewis 1 sibling, 1 reply; 11+ messages in thread From: Luca Berra @ 2003-11-25 22:45 UTC (permalink / raw) To: linux-raid On Tue, Nov 25, 2003 at 03:06:50PM -0700, Dan Egli wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >Neil Brown wrote: > >| >| all is done.... unless you are using raidstart, but that is >| universally a mistake. > >But all linux distributions I've used, save perhaps gentoo, DO use >raidstart with /etc/raidtab. How do you configure it so the kernel >assembles the array for you? /etc/fstab? > for mandrake linux you can use my packages: http://www.comedia.it/~bluca/cooker/lvm2/ (you only need initscripts, you might need the mdadm there and mkinitrd, if you have root raid) L. -- Luca Berra -- bluca@comedia.it Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Adding a mirror to a RAID1 Device 2003-11-25 22:45 ` Luca Berra @ 2003-11-25 22:56 ` Dan Egli 2003-11-25 23:27 ` Luca Berra 0 siblings, 1 reply; 11+ messages in thread From: Dan Egli @ 2003-11-25 22:56 UTC (permalink / raw) To: Luca Berra; +Cc: linux-raid -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Luca Berra wrote: | On Tue, Nov 25, 2003 at 03:06:50PM -0700, Dan Egli wrote: | |> -----BEGIN PGP SIGNED MESSAGE----- |> Hash: SHA1 |> |> Neil Brown wrote: |> |> | |> | all is done.... unless you are using raidstart, but that is |> | universally a mistake. |> |> But all linux distributions I've used, save perhaps gentoo, DO use |> raidstart with /etc/raidtab. How do you configure it so the kernel |> assembles the array for you? /etc/fstab? |> | for mandrake linux you can use my packages: | http://www.comedia.it/~bluca/cooker/lvm2/ | (you only need initscripts, you might need the mdadm there and mkinitrd, | if you have root raid) Sorry, but I do not now, nor will I ever use Mandrake. I despise any linux distribution that tries as hard as Mandrake does to isolate the user from the config files. As far as I'm conserned, Mandrake is not even a real linux distribution. There's two Distributions I'd be interested in hearing about: RedHat/Fedora Gentoo If you know how to accomplish that with either of these, I'm all ears. - --- Dan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/w94ZtwT22Jak4/4RAoCxAKCQHZ5UwdIa+tdrs26GVpMvQHP8GwCgiYoG jsE4fjrIL6WNoQa8jsmz/QE= =FXeo -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Adding a mirror to a RAID1 Device 2003-11-25 22:56 ` Dan Egli @ 2003-11-25 23:27 ` Luca Berra 0 siblings, 0 replies; 11+ messages in thread From: Luca Berra @ 2003-11-25 23:27 UTC (permalink / raw) To: linux-raid On Tue, Nov 25, 2003 at 03:56:25PM -0700, Dan Egli wrote: >Sorry, but I do not now, nor will I ever use Mandrake. I despise any >linux distribution that tries as hard as Mandrake does to isolate the >user from the config files. As far as I'm conserned, Mandrake is not >even a real linux distribution. I am not sure we are talking about the same distribution. But i do not care to start a distro war here nor anywhere else. >There's two Distributions I'd be interested in hearing about: >RedHat/Fedora Mandrake initscripts/mkinitrd are derived from Redhat's, so it should be possible to merge changes in Fedora >Gentoo never used Gentoo, so i don't have the faintest idea of what they have in place. L. -- Luca Berra -- bluca@comedia.it Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Adding a mirror to a RAID1 Device 2003-11-25 22:06 ` Dan Egli 2003-11-25 22:45 ` Luca Berra @ 2003-11-25 22:58 ` jlewis 1 sibling, 0 replies; 11+ messages in thread From: jlewis @ 2003-11-25 22:58 UTC (permalink / raw) To: linux-raid On Tue, 25 Nov 2003, Dan Egli wrote: > | all is done.... unless you are using raidstart, but that is > | universally a mistake. > > But all linux distributions I've used, save perhaps gentoo, DO use > raidstart with /etc/raidtab. How do you configure it so the kernel > assembles the array for you? /etc/fstab? I'll have to add some debug echos to be sure, but it looks like Fedora Core 1 uses raidstart (from /etc/rc.d/rc.sysinit) only if the kernel didn't auto-start the devices. ---------------------------------------------------------------------- Jon Lewis *jlewis@lewis.org*| I route Senior Network Engineer | therefore you are Atlantic Net | _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Adding a mirror to a RAID1 Device 2003-11-25 22:01 ` Neil Brown 2003-11-25 22:06 ` Dan Egli @ 2003-11-26 23:09 ` jlewis 1 sibling, 0 replies; 11+ messages in thread From: jlewis @ 2003-11-26 23:09 UTC (permalink / raw) To: Neil Brown; +Cc: linux-raid On Wed, 26 Nov 2003, Neil Brown wrote: > Just > power down the machine > move the drives > power up again > > all is done.... unless you are using raidstart, but that is > universally a mistake. That was amazing. My Promise (Ultra100TX2) card arrived today. I did a shutdown, put the card in, moved hda and hdc onto it, powered up, and it booted right up. The kernel did notice that the md device members' device names had changed, but it found them and "just worked". Again, this was Red Hat's Fedora Core 1, with all partitions being RAID1 and a pair of WD ATA100 160gb drives. ---------------------------------------------------------------------- Jon Lewis *jlewis@lewis.org*| I route Senior Network Engineer | therefore you are Atlantic Net | _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Adding a mirror to a RAID1 Device 2003-11-25 7:21 ` Neil Brown 2003-11-25 21:03 ` jlewis @ 2003-12-21 8:23 ` H. Peter Anvin 1 sibling, 0 replies; 11+ messages in thread From: H. Peter Anvin @ 2003-12-21 8:23 UTC (permalink / raw) To: linux-raid Followup to: <16323.732.390200.935640@notabene.cse.unsw.edu.au> By author: Neil Brown <neilb@cse.unsw.edu.au> In newsgroup: linux.dev.raid > > What you should have done is make a raid1 with 2 drives, one of which > was missing/failed. With mdadm, the command would be: > > mdadm -C /dev/md0 --level=raid1 --disks=2 /dev/hda3 missing > > then you can hot-add the extra drive when it arrives. > > What you have to do now is recreate the raid1 with two drives. You > will have to have the filesystem unmounted and the raid stopped, but > you will not lose any data. > For the case of RAID-1 in particular, it would be nice to be able to hotadd drives "ad infinitum"... after all they're all the same. -hpa -- <hpa@transmeta.com> at work, <hpa@zytor.com> in private! If you send me mail in HTML format I will assume it's spam. "Unix gives you enough rope to shoot yourself in the foot." Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64 ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2003-12-21 8:23 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <S262074AbTKYGHX/20031125060723Z+10693@vger.kernel.org>
2003-11-25 6:19 ` Adding a mirror to a RAID1 Device Caleb Crome
2003-11-25 7:21 ` Neil Brown
2003-11-25 21:03 ` jlewis
2003-11-25 22:01 ` Neil Brown
2003-11-25 22:06 ` Dan Egli
2003-11-25 22:45 ` Luca Berra
2003-11-25 22:56 ` Dan Egli
2003-11-25 23:27 ` Luca Berra
2003-11-25 22:58 ` jlewis
2003-11-26 23:09 ` jlewis
2003-12-21 8:23 ` H. Peter Anvin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).