From: "Jim Buttafuoco" <jim@contactbda.com>
To: Ian Brown <ianbrn@gmail.com>, Gordon Henderson <gordon@drogon.net>
Cc: linux-raid@vger.kernel.org
Subject: Re: Stopping and starting a RAID1 :Invalid argument
Date: Sun, 8 Oct 2006 09:27:31 -0400 [thread overview]
Message-ID: <20061008132537.M34804@contactbda.com> (raw)
In-Reply-To: <d0383f90610080608x77fbfb80qb1e89fa8840f9d0a@mail.gmail.com>
try to assemble the array instead, --run is trying to start a partially built array, --stop deactivated the array and
released all resources, so --run will NOT work, use --assemble (-A) instead.
Good luck
Jim
---------- Original Message -----------
From: "Ian Brown" <ianbrn@gmail.com>
To: "Gordon Henderson" <gordon@drogon.net>
Cc: linux-raid@vger.kernel.org
Sent: Sun, 8 Oct 2006 15:08:56 +0200
Subject: Re: Stopping and starting a RAID1 :Invalid argument
> Hello,
>
> >There is a case under RAID-1 where you can mount the >underlying devices,
> >but that's only in an emergency,
>
> Ok , thnks, this point is clear now.
>
> So I made another test. This time without mkfs.
>
> Now , I deleted the partitions and created them anew and did
> evertyhing else the same ,only
> this time without mkfs.
>
> Still:
>
> stop succeeds :
>
> mdadm --stop /dev/md0
>
> cat /proc/mdstat
>
> Personalities : [raid1]
> unused devices: <none>
>
> but mdadm --run : give an error:
>
> mdadm --run /dev/md0
>
> mdadm: failed to run array /dev/md0: Invalid argument
>
> Any idea why is it so ? can't I start an array after it was stopped ?
>
> Regards,
> Ian
>
> On 10/8/06, Gordon Henderson <gordon@drogon.net> wrote:
> > On Sun, 8 Oct 2006, Ian Brown wrote:
> >
> >
> > > Then I created a RAID1 by running:
> > >
> > > mdadm --create /dev/md0 --level=raid1 --raid-devices=2 /dev/sdb1 /dev/sdb2
> > >
> > > I got : mdadm: array /dev/md0 started
> > >
> > > cat /proc/mdstat shows:
> > >
> > > Personalities : [raid1]
> > > md0 : active raid1 sdb2[1] sdb1[0]
> > > 16000 blocks [2/2] [UU]
> > > [==>..................] resync = 12.5% (2112/16000)
> > > finish=0.7min speed=301K/sec
> > > unused devices: <none>
> >
> > So far so good. Nothing out of the ordinary here for your testing
> > environment.
> >
> > > I created ext3 fs on /dev/md0 and /dev/sdb1 and /dev/sdb2.
> >
> > Eeek!
> >
> > You have created a filesystem on md0, which uses /dev/sdb1 and /dev/sdb2,
> > THEN you fiddled with the underlying devices, /dev/sdb1 and /dev/sdb2...
> >
> > What you have done is effectively corrup the filesystem on /dev/md0, and
> > possibly even wiped out the superblock on the /dev/md0 device. (which may
> > be why you can't start it again)
> >
> > Once you have created a RAID array, you only ever deal with the mdX
> > device. Leave the underlying devices well alone. They are now owned by the
> > md device driver.
> >
> > Start again, and don't fiddle with the underlying /dev/sdbX devices. Do
> > not mkfs them, and do not mount them.
> >
> > All you need to do is this:
> >
> > mdadm --create /dev/md0 -l1 -n2 /dev/sdb{1,2}
> > mkfs -t ext3 /dev/md0
> > mount /dev/md0 /mnt
> >
> > and there you have it.
> >
> > Use
> > df -h /mnt
> > to let you see the size of your new mounted volume - it'll be 30MB or so.
> >
> >
> > There is a case under RAID-1 where you can mount the underlying devices,
> > but thats only in an emergency, with the mdX drivers stopped, and you need
> > to make absulutely sure you know what you are doing if you do this, and if
> > you mount then read-write, the you must not re-enable and mount the
> > overlying mdX device as it won't know which of the 2 mirrors is the
> > current one and you might get old data. ie. it's a one-way process in an
> > emergency, mount the underlying device, get the data off and re-create
> > from scratch, and you can only do this with RAID-1 devices.
> >
> > Gordon
> >
> -
> 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
------- End of Original Message -------
next prev parent reply other threads:[~2006-10-08 13:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-08 10:05 Stopping and starting a RAID1 :Invalid argument Ian Brown
2006-10-08 10:46 ` Gordon Henderson
2006-10-08 13:08 ` Ian Brown
2006-10-08 13:27 ` Jim Buttafuoco [this message]
2006-10-09 7:40 ` Ian Brown
2006-10-10 2:01 ` Neil Brown
2006-10-11 13:00 ` Ian Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061008132537.M34804@contactbda.com \
--to=jim@contactbda.com \
--cc=gordon@drogon.net \
--cc=ianbrn@gmail.com \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).