Thread (2 messages) 2 messages, 2 authors, 2002-04-19

Re: mdadm help and howto for newbies?

From: Stephen Lee <hidden>
Date: 2002-04-19 22:03:23

On Fri, 2002-04-19 at 14:41, Neil Brown wrote:
On  April 19, splee@plexio.com wrote:
quoted
1. Do I need to mark my raid1 partitions with the type fd?
Only if you want to use autodetect.  I don't.
quoted
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.
quoted
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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help