linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* raid not creating
@ 2006-01-27 17:35 Wade Pinkston
  2006-01-27 21:10 ` Neil Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Wade Pinkston @ 2006-01-27 17:35 UTC (permalink / raw)
  To: linux-raid

Using /dev/hda
(parted) p
Disk geometry for /dev/hda: 0.000-28629.562 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          0.031    101.975  primary   ext3        boot
2        101.975  20104.782  primary   ext3
3      20104.783  28623.625  primary   ext3

Using /dev/hdc
(parted) p
Disk geometry for /dev/hdc: 0.000-28629.562 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          0.031    101.975  primary   ext2        raid
2        101.975  20104.782  primary   ext2        raid
3      20104.783  28623.625  primary   ext2        raid

Disk geometry for /dev/hde: 0.000-95396.273 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          0.031  60000.578  primary   ext3        raid
2      60000.579  61004.641  primary   linux-swap  raid
3      61004.641  95393.781  primary   ext3        raid

Disk geometry for /dev/hdg: 0.000-95396.273 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          0.031  60000.578  primary   ext2        raid
2      60000.579  61004.641  primary   ext2
3      61004.641  95393.781  primary   ext3        raid


# mdadm --create --verbose /dev/md4 --level=1 --raid-devices=2 /dev/hde3
/dev/hdg3
mdadm: /dev/hde3 appears to contain an ext2fs file system
    size=35214480K  mtime=Thu Jan 26 13:38:20 2006
mdadm: /dev/hdg3 appears to contain an ext2fs file system
    size=35214480K  mtime=Thu Jan 26 13:38:20 2006
mdadm: size set to 35214400K
Continue creating array? y
mdadm: SET_ARRAY_INFO failed for /dev/md4: Device or resource busy

As you can see I have 4 drive.  I am trying to crate raid1 arrays using
these drives.  obviously its not working.  the suggestions I've found to
correct the mdadm error have said to build the array in init 1.  this has
not worked for me either.  all 5 md devices give this error.  I have tried
to force the array as well as building it with missing devices.  none of
witch have worked.  can anyone help with getting these arrays working?

thank for any assistance

--
Ipsa scienta protesta est

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: raid not creating
  2006-01-27 17:35 raid not creating Wade Pinkston
@ 2006-01-27 21:10 ` Neil Brown
       [not found]   ` <43DAD418.9040803@bugs.osu.edu>
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Brown @ 2006-01-27 21:10 UTC (permalink / raw)
  To: Wade Pinkston; +Cc: linux-raid

On Friday January 27, blata@bugs.osu.edu wrote:
> 
> 
> # mdadm --create --verbose /dev/md4 --level=1 --raid-devices=2 /dev/hde3
> /dev/hdg3
> mdadm: /dev/hde3 appears to contain an ext2fs file system
>     size=35214480K  mtime=Thu Jan 26 13:38:20 2006
> mdadm: /dev/hdg3 appears to contain an ext2fs file system
>     size=35214480K  mtime=Thu Jan 26 13:38:20 2006
> mdadm: size set to 35214400K
> Continue creating array? y
> mdadm: SET_ARRAY_INFO failed for /dev/md4: Device or resource busy

Sounds like /dev/md4 already exists.  What does
  cat /proc/mdstat
show?

NeilBrown

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: raid not creating
       [not found]     ` <17373.14913.427109.184586@cse.unsw.edu.au>
@ 2006-01-30  2:29       ` Wade Pinkston
  2006-01-30  3:08         ` Neil Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Wade Pinkston @ 2006-01-30  2:29 UTC (permalink / raw)
  To: linux-raid

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neil Brown wrote:
> On Friday January 27, blata@bugs.osu.edu wrote:
> 
> Please don't take a discussion off a mailing list once it has started
> there.  Other people might be listening, and it is useful to have any
> answers in the archives.
> 
> So if you want further help on this, please continue to send your mail
> to linux-raid@vger.kernel.org.
> 
> NeilBrown
> 
> 
> 
> 
> 
> Neil Brown wrote:
> 
>>On Friday January 27, blata@bugs.osu.edu wrote:
> 
> 
>>># mdadm --create --verbose /dev/md4 --level=1 --raid-devices=2 /dev/hde3
>>>/dev/hdg3
>>>mdadm: /dev/hde3 appears to contain an ext2fs file system
>>>   size=35214480K  mtime=Thu Jan 26 13:38:20 2006
>>>mdadm: /dev/hdg3 appears to contain an ext2fs file system
>>>   size=35214480K  mtime=Thu Jan 26 13:38:20 2006
>>>mdadm: size set to 35214400K
>>>Continue creating array? y
>>>mdadm: SET_ARRAY_INFO failed for /dev/md4: Device or resource busy
> 
> 
>>Sounds like /dev/md4 already exists.  What does
>>  cat /proc/mdstat
>>show?
> 
>>NeilBrown
> 
> 
> cat /proc/mdstat
> Personalities :
> md2 : inactive hdc3[0]
>       8723200 blocks
> md3 : inactive hdg1[0]
>       61440448 blocks
> md4 : inactive hdg3[0]
>       35214400 blocks
> md1 : inactive hdc2[0]
>       20482752 blocks
> md0 : inactive hdc1[0]
>       104320 blocks
> unused devices: <none>
> 
> I got this only after doing the following.
> 
> mdadm --manage --add /dev/md2 /dev/hdc3
> 
> for each md device.  If I then go back and try to add /dev/hda1 to the md0
> I get this.
> 
> mdadm --manage --add /dev/md0 /dev/hda1
> mdadm: add new device failed for /dev/hda1: Device or resource busy
> 
> this email includes all new informaiton for me.  but I still am unable to
> add the drives with the actual data on them.
> 
sorry didn't realize just responding took the tread off list.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD3Xonv+6+qSFv3TURAuKiAJ9nIYIcWcRfUycNGLg49H7WIKbIBgCgpKte
R+zZ9W1/KAJH4If+ncNdo5E=
=/n3B
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: raid not creating
  2006-01-30  2:29       ` Wade Pinkston
@ 2006-01-30  3:08         ` Neil Brown
  2006-01-30  5:02           ` Wade Pinkston
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Brown @ 2006-01-30  3:08 UTC (permalink / raw)
  To: Wade Pinkston; +Cc: linux-raid

On Sunday January 29, blata@bugs.osu.edu wrote:
> > Neil Brown wrote:
> > 
> >>On Friday January 27, blata@bugs.osu.edu wrote:
> > 
> > 
> >>># mdadm --create --verbose /dev/md4 --level=1 --raid-devices=2 /dev/hde3
> >>>/dev/hdg3
> >>>mdadm: /dev/hde3 appears to contain an ext2fs file system
> >>>   size=35214480K  mtime=Thu Jan 26 13:38:20 2006
> >>>mdadm: /dev/hdg3 appears to contain an ext2fs file system
> >>>   size=35214480K  mtime=Thu Jan 26 13:38:20 2006
> >>>mdadm: size set to 35214400K
> >>>Continue creating array? y
> >>>mdadm: SET_ARRAY_INFO failed for /dev/md4: Device or resource busy
> > 
> > 
> >>Sounds like /dev/md4 already exists.  What does
> >>  cat /proc/mdstat
> >>show?
> > 
> >>NeilBrown
> > 
> > 
> > cat /proc/mdstat
> > Personalities :
> > md2 : inactive hdc3[0]
> >       8723200 blocks
> > md3 : inactive hdg1[0]
> >       61440448 blocks
> > md4 : inactive hdg3[0]
> >       35214400 blocks
> > md1 : inactive hdc2[0]
> >       20482752 blocks
> > md0 : inactive hdc1[0]
> >       104320 blocks
> > unused devices: <none>

So md4 (and others) is partially created.  If you
  mdadm --stop /dev/md4
  mdadm --create --verbose /dev/md4 --level=1 --raid-devices=2 /dev/hde3 /dev/hdg3

it should work.


> > 
> > I got this only after doing the following.
> > 
> > mdadm --manage --add /dev/md2 /dev/hdc3
> > 

I guess you are trying to add devices to non-existent arrays... Maybe
mdadm should complain about that...

> > for each md device.  If I then go back and try to add /dev/hda1 to the md0
> > I get this.
> > 
> > mdadm --manage --add /dev/md0 /dev/hda1
> > mdadm: add new device failed for /dev/hda1: Device or resource
> > busy

Maybe hda1 is currently in use?  Maybe it is mounted as a filesystem?

What exactly are you trying to achieve?

NeilBrown

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: raid not creating
  2006-01-30  3:08         ` Neil Brown
@ 2006-01-30  5:02           ` Wade Pinkston
  2006-01-30  5:17             ` Neil Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Wade Pinkston @ 2006-01-30  5:02 UTC (permalink / raw)
  To: linux-raid

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Neil Brown wrote:
> On Sunday January 29, blata@bugs.osu.edu wrote:
> 
>>>Neil Brown wrote:
>>>
>>>
>>>>On Friday January 27, blata@bugs.osu.edu wrote:
>>>
>>>
>>>>># mdadm --create --verbose /dev/md4 --level=1 --raid-devices=2 /dev/hde3
>>>>>/dev/hdg3
>>>>>mdadm: /dev/hde3 appears to contain an ext2fs file system
>>>>>  size=35214480K  mtime=Thu Jan 26 13:38:20 2006
>>>>>mdadm: /dev/hdg3 appears to contain an ext2fs file system
>>>>>  size=35214480K  mtime=Thu Jan 26 13:38:20 2006
>>>>>mdadm: size set to 35214400K
>>>>>Continue creating array? y
>>>>>mdadm: SET_ARRAY_INFO failed for /dev/md4: Device or resource busy
>>>
>>>
>>>>Sounds like /dev/md4 already exists.  What does
>>>> cat /proc/mdstat
>>>>show?
>>>
>>>>NeilBrown
>>>
>>>
>>>cat /proc/mdstat
>>>Personalities :
>>>md2 : inactive hdc3[0]
>>>      8723200 blocks
>>>md3 : inactive hdg1[0]
>>>      61440448 blocks
>>>md4 : inactive hdg3[0]
>>>      35214400 blocks
>>>md1 : inactive hdc2[0]
>>>      20482752 blocks
>>>md0 : inactive hdc1[0]
>>>      104320 blocks
>>>unused devices: <none>
> 
> 
> So md4 (and others) is partially created.  If you
>   mdadm --stop /dev/md4
>   mdadm --create --verbose /dev/md4 --level=1 --raid-devices=2 /dev/hde3 /dev/hdg3
> 
> it should work.
> 
> 
> 
>>>I got this only after doing the following.
>>>
>>>mdadm --manage --add /dev/md2 /dev/hdc3
>>>
> 
> 
> I guess you are trying to add devices to non-existent arrays... Maybe
> mdadm should complain about that...
> 
> 
>>>for each md device.  If I then go back and try to add /dev/hda1 to the md0
>>>I get this.
>>>
>>>mdadm --manage --add /dev/md0 /dev/hda1
>>>mdadm: add new device failed for /dev/hda1: Device or resource
>>>busy
> 
> 
> Maybe hda1 is currently in use?  Maybe it is mounted as a filesystem?
> 
> What exactly are you trying to achieve?
> 
> NeilBrown
> 
I live in California and this server is in Ohio  ~3000 mi away.  Any way I
am rebuilding it remotely do some problems from a few months ago.  Anyway I
had someone in Ohio format the four drives.  I was then left with a system
on drives a and e.  Now after the fact I'm trying to get the software raid
working on a-c e-g.  but I am unable to do so using mdadm.  I'm trying to
coordinate this with my Ohio counterpart when he is available.

At this point I am thinking that I need to have him boot the box into
rescue mode issue the mdadm commands, edit the fstab file and then reboot.
 Does this sound like a feasible approach?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD3Z3rv+6+qSFv3TURAkJ1AJ92JGA3HD3fozi0W+h5OsICi90cGQCgt0Ia
WMOBvFOINP+HA0fUV85O0Ug=
=P9vG
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: raid not creating
  2006-01-30  5:02           ` Wade Pinkston
@ 2006-01-30  5:17             ` Neil Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Brown @ 2006-01-30  5:17 UTC (permalink / raw)
  To: Wade Pinkston; +Cc: linux-raid

On Sunday January 29, blata@bugs.osu.edu wrote:
> > 
> > What exactly are you trying to achieve?
> > 
> > NeilBrown
> > 
> I live in California and this server is in Ohio  ~3000 mi away.  Any way I
> am rebuilding it remotely do some problems from a few months ago.  Anyway I
> had someone in Ohio format the four drives.  I was then left with a system
> on drives a and e.  Now after the fact I'm trying to get the software raid
> working on a-c e-g.  but I am unable to do so using mdadm.  I'm trying to
> coordinate this with my Ohio counterpart when he is available.
> 
> At this point I am thinking that I need to have him boot the box into
> rescue mode issue the mdadm commands, edit the fstab file and then reboot.
>  Does this sound like a feasible approach?

Feasible, but maybe not ideal.

If you have an active root filesystem on 'a' and want to have it on a
mirrored pair 'a' and 'c', the normal approach, which I'm sure is
documented in some HowTo somewhere - look for "linux root raid" or
similar - is to:

 1/ create the mirrored pair with only one active device:

    mdadm --create /dev/md0 -l1 -n2 missing /dev/hdc1

 2/ create a filesystem there and copy the data over

    mkfs -j /dev/md0
    mount /dev/md0 /mnt
    cp -ax / /mnt
 
 3/ Arrange that you will boot of md0 at next boot.
   e.g. in lilo.conf
  
       append = "md=0,/dev/hdc1 root=/dev/md0"

   
 4/ reboot, and hopefully find yourself with /dev/md0 as root.

 5/ add the old root partition into the array

     mdadm /dev/md0 --add /dev/hda1

 6/ make sure hda1 gets included in future. e.g.
   change the lilo.conf line to

      append = "md=0/dev/hda1,/dev/hdc1 root=/dev/md0"

Good luck.

NeilBrown


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-01-30  5:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-27 17:35 raid not creating Wade Pinkston
2006-01-27 21:10 ` Neil Brown
     [not found]   ` <43DAD418.9040803@bugs.osu.edu>
     [not found]     ` <17373.14913.427109.184586@cse.unsw.edu.au>
2006-01-30  2:29       ` Wade Pinkston
2006-01-30  3:08         ` Neil Brown
2006-01-30  5:02           ` Wade Pinkston
2006-01-30  5:17             ` Neil Brown

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).