Re: mdctl & adding a new drive to a RAID-1 array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Well actually.....
>
> - Edit  /etc/fstab and /etc/lilo.conf (or whatever) to make it
>   think that /dev/hda2 is your root partitions,
> - reboot,
> - run the mdctl commands, excluding the --add
> - put /etc/fstab and /etc/lilo.conf back
> - reboot
> - run the mdctl --add
>
> You cannot do it without a reboot or two, but it should work
> fine with two reboots.

Unfortunately it didn't seem to like me creating an array with a mounted
partition:

# mdctl --create /dev/md0 --level=1 --raid-disks=2 /dev/hda2 missing
mdctl: /dev/hda2 appears to contain an ext2fs file system
    size=6144768K  mtime=Thu Feb 21 19:12:09 2002
mdctl: /dev/hda2 appear to be part of a raid array:
    level=1 disks=1 ctime=Thu Feb 21 13:24:58 2002
Continue creating array? y
mdctl: ADD_NEW_DISK for /dev/hda2 failed: Invalid argument

and syslog said:

md: can not import hda2, has active inodes!
md: error, md_import_device() returned -16

But, I was able to get it going another way. I just copied all files from
the first drive (hda) over to the second drive (hdc) manually, then created
a new array containing /dev/hdc2 and 'missing'. Then I set lilo to boot off
of /dev/md0 again, rebooted, and added the first drive (hda) to the array.

Thanks for the help.

Jordan Russell

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux