* mdadm help and howto for newbies?
@ 2002-04-19 20:35 Stephen Lee
2002-04-19 21:41 ` Neil Brown
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Lee @ 2002-04-19 20:35 UTC (permalink / raw)
To: Raid
Hi,
Is there a Howto for mdadm newbies? The Software raid Howto is too old
to reference mdadm. I have some questions on how to proceed:
1. Do I need to mark my raid1 partitions with the type fd?
2. I tried:
mdadm -C /dev/md0 --level raid1 --raid-disks 2 /dev/hda1 missing
and got the message:
md: can not import hda1, has active inodes!
md: error, md_import_device() returned -16
Does this mean that the partitions to be added to /dev/md0 must be
unmounted?
3. If #2 is yes then how do I convert my partitions to raid1? In using
raidtools, I simply copied the live drive contents to a spare drive
with "fd" type partitions and followed the instructions in the
Boot+Root+Raid+LILO Howto.
4. Is it possible to boot root raid1 with mdadm and no autodetect?
I am running kernel 2.4.18 with raid1 compiled in.
Thanks for your help,
Stephen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mdadm help and howto for newbies?
2002-04-19 20:35 mdadm help and howto for newbies? Stephen Lee
@ 2002-04-19 21:41 ` Neil Brown
2002-04-19 22:03 ` Stephen Lee
0 siblings, 1 reply; 3+ messages in thread
From: Neil Brown @ 2002-04-19 21:41 UTC (permalink / raw)
To: Stephen Lee; +Cc: Raid
On April 19, splee@plexio.com wrote:
> Hi,
>
> Is there a Howto for mdadm newbies? The Software raid Howto is too old
I don't know of any.
> to reference mdadm. I have some questions on how to proceed:
>
> 1. Do I need to mark my raid1 partitions with the type fd?
Only if you want to use autodetect. I don't.
> 2. I tried:
> mdadm -C /dev/md0 --level raid1 --raid-disks 2 /dev/hda1 missing
> and got the message:
> md: can not import hda1, has active inodes!
> md: error, md_import_device() returned -16
> Does this mean that the partitions to be added to /dev/md0 must be
> unmounted?
Yes, definately. Once a partition has beein included into an md
array, md *must* be the only thing accessing that partition, otherwise
confusion can result.
> 3. If #2 is yes then how do I convert my partitions to raid1? In using
> raidtools, I simply copied the live drive contents to a spare drive
> with "fd" type partitions and followed the instructions in the
> Boot+Root+Raid+LILO Howto.
Support /dev/hda1 was your live boot drive, and /dev/hdc1 was second
partition that you eventually wanted to raid1 together with /dev/hda1.
Then
1/ create a degraded raid1 using /dev/hdc1 only:
mdadm -C /dev/md0 --level raid1 --raid-disks 2 missing /dev/hdc1
2/ create a filesystem on /dev/md0 and mount it:
mkfs /dev/md0
mount /dev/md0 /mnt
3/ copy everything from / to /mnt
cp -ax / /mnt
could do it.
4/ modify /mnt/etc/fstab to think that / is on /dev/md0
5/ reboot with a kernel-parameter of:
md=0,/dev/hdc1 root=/dev/md0
6/ If this all seems to work properly, then add /dev/hda1 to the
raid1 array:
mdadm /dev/md0 -a /dev/hda1
and change the kernel-paramter line to
md=0,/dev/hda1,/dev/hdc1 root=/dev/md0
> 4. Is it possible to boot root raid1 with mdadm and no autodetect?
See above.
NeilBrown
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: mdadm help and howto for newbies?
2002-04-19 21:41 ` Neil Brown
@ 2002-04-19 22:03 ` Stephen Lee
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Lee @ 2002-04-19 22:03 UTC (permalink / raw)
To: Neil Brown; +Cc: Raid
On Fri, 2002-04-19 at 14:41, Neil Brown wrote:
> On April 19, splee@plexio.com wrote:
> >
> > 1. Do I need to mark my raid1 partitions with the type fd?
>
> Only if you want to use autodetect. I don't.
>
> > 2. I tried:
> > mdadm -C /dev/md0 --level raid1 --raid-disks 2 /dev/hda1 missing
> > and got the message:
> > md: can not import hda1, has active inodes!
> > md: error, md_import_device() returned -16
> > Does this mean that the partitions to be added to /dev/md0 must be
> > unmounted?
>
> Yes, definately. Once a partition has beein included into an md
> array, md *must* be the only thing accessing that partition, otherwise
> confusion can result.
>
> > 3. If #2 is yes then how do I convert my partitions to raid1? In using
> > raidtools, I simply copied the live drive contents to a spare drive
> > with "fd" type partitions and followed the instructions in the
> > Boot+Root+Raid+LILO Howto.
>
> Support /dev/hda1 was your live boot drive, and /dev/hdc1 was second
> partition that you eventually wanted to raid1 together with /dev/hda1.
> Then
> 1/ create a degraded raid1 using /dev/hdc1 only:
> mdadm -C /dev/md0 --level raid1 --raid-disks 2 missing /dev/hdc1
> 2/ create a filesystem on /dev/md0 and mount it:
> mkfs /dev/md0
> mount /dev/md0 /mnt
> 3/ copy everything from / to /mnt
> cp -ax / /mnt
> could do it.
> 4/ modify /mnt/etc/fstab to think that / is on /dev/md0
> 5/ reboot with a kernel-parameter of:
> md=0,/dev/hdc1 root=/dev/md0
> 6/ If this all seems to work properly, then add /dev/hda1 to the
> raid1 array:
> mdadm /dev/md0 -a /dev/hda1
> and change the kernel-paramter line to
> md=0,/dev/hda1,/dev/hdc1 root=/dev/md0
>
Thank you Neil!
May I suggest you include the above as an example of how to convert to
raid1 in your package documentation? To keep your job simple, you could
simply cut and paste list messages into a faq sheet.
Stephen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-04-19 22:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-19 20:35 mdadm help and howto for newbies? Stephen Lee
2002-04-19 21:41 ` Neil Brown
2002-04-19 22:03 ` Stephen Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox