* how to create a degraded raid1 with only 1 of 2 drives ??
@ 2008-01-20 19:28 Mitchell Laks
2008-01-20 19:34 ` michael
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Mitchell Laks @ 2008-01-20 19:28 UTC (permalink / raw)
To: linux-raid
Hi mdadm raid gurus,
I wanted to make a raid1 array, but at the moment I have only 1 drive available. The other disk is
in the mail. I wanted to make a raid1 that i will use as a backup.
But I need to do the backup now, before the second drive comes.
So I did this.
formated /dev/sda creating /dev/sda1 with type fd.
then I tried to run
mdadm -C /dev/md0 --level=1 --raid-devices=1 /dev/sda1
but I got an error message
mdadm: 1 is an unusual numner of drives for an array so it is probably a mistake. If you really
mean it you will need to specify --force before setting the number of drives
so then i tried
mdadm -C /dev/md0 --level=1 --force --raid-devices=1 /dev/sda1
mdadm: /dev/sda1 is too small:0K
mdadm: create aborted
now what does that mean?
fdisk -l /dev/sda shows
device boot start end blocks Id System
/dev/sda1 1 60801 488384001 fd linux raid autodetect
so what do I do?
I need to back up my data.
If I simply format /dev/sda1 as an ext3 file system then I can't "add" the second drive later on.
How can I set it up as a `degraded` raid1 array so I can later on add in the second drive and sync?
Thanks for your help!
Mitchell
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to create a degraded raid1 with only 1 of 2 drives ??
2008-01-20 19:28 how to create a degraded raid1 with only 1 of 2 drives ?? Mitchell Laks
@ 2008-01-20 19:34 ` michael
2008-01-20 19:52 ` Mitchell Laks
2008-01-20 22:12 ` Bill Davidsen
2 siblings, 0 replies; 5+ messages in thread
From: michael @ 2008-01-20 19:34 UTC (permalink / raw)
To: linux-raid
Quoting Mitchell Laks <mlaks@post.harvard.edu>:
> Hi mdadm raid gurus,
>
> I wanted to make a raid1 array, but at the moment I have only 1
> drive available. The other disk is
> in the mail. I wanted to make a raid1 that i will use as a backup.
>
> But I need to do the backup now, before the second drive comes.
>
> So I did this.
>
> formated /dev/sda creating /dev/sda1 with type fd.
>
> then I tried to run
> mdadm -C /dev/md0 --level=1 --raid-devices=1 /dev/sda1
Perhaps give this a try:
# mdadm -C /dev/md0 --level=1 --raid-devices=2 /dev/sda1 missing
Cheers,
Mike
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to create a degraded raid1 with only 1 of 2 drives ??
2008-01-20 19:28 how to create a degraded raid1 with only 1 of 2 drives ?? Mitchell Laks
2008-01-20 19:34 ` michael
@ 2008-01-20 19:52 ` Mitchell Laks
2008-01-20 21:38 ` David Greaves
2008-01-20 22:12 ` Bill Davidsen
2 siblings, 1 reply; 5+ messages in thread
From: Mitchell Laks @ 2008-01-20 19:52 UTC (permalink / raw)
To: linux-raid
I think my error was that maybe I did not
do write the fdisk changes to the drive with
fdisk w
so I did
fdisk /dev/sda
p
then
w
and then when I did
mdadm -C /dev/md0 --level=2 -n2 /dev/sda1 missing
it worked and set up the array.
Thanks for being there!
Mitchell
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to create a degraded raid1 with only 1 of 2 drives ??
2008-01-20 19:52 ` Mitchell Laks
@ 2008-01-20 21:38 ` David Greaves
0 siblings, 0 replies; 5+ messages in thread
From: David Greaves @ 2008-01-20 21:38 UTC (permalink / raw)
To: linux-raid, mlaks
Mitchell Laks wrote:
> I think my error was that maybe I did not
> do write the fdisk changes to the drive with
> fdisk w
No - your problem was that you needed to use the literal word "missing"
like you did this time:
> mdadm -C /dev/md0 --level=2 -n2 /dev/sda1 missing
[however, this time you also asked for a RAID2 (--level=2) which I doubt would work]
David
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to create a degraded raid1 with only 1 of 2 drives ??
2008-01-20 19:28 how to create a degraded raid1 with only 1 of 2 drives ?? Mitchell Laks
2008-01-20 19:34 ` michael
2008-01-20 19:52 ` Mitchell Laks
@ 2008-01-20 22:12 ` Bill Davidsen
2 siblings, 0 replies; 5+ messages in thread
From: Bill Davidsen @ 2008-01-20 22:12 UTC (permalink / raw)
To: linux-raid
Mitchell Laks wrote:
> Hi mdadm raid gurus,
>
> I wanted to make a raid1 array, but at the moment I have only 1 drive available. The other disk is
> in the mail. I wanted to make a raid1 that i will use as a backup.
>
> But I need to do the backup now, before the second drive comes.
>
> So I did this.
>
> formated /dev/sda creating /dev/sda1 with type fd.
>
> then I tried to run
> mdadm -C /dev/md0 --level=1 --raid-devices=1 /dev/sda1
>
> but I got an error message
> mdadm: 1 is an unusual numner of drives for an array so it is probably a mistake. If you really
> mean it you will need to specify --force before setting the number of drives
>
> so then i tried
>
> mdadm -C /dev/md0 --level=1 --force --raid-devices=1 /dev/sda1
> mdadm: /dev/sda1 is too small:0K
> mdadm: create aborted
>
> now what does that mean?
>
> fdisk -l /dev/sda shows
>
> device boot start end blocks Id System
> /dev/sda1 1 60801 488384001 fd linux raid autodetect
>
> so what do I do?
>
>
> I need to back up my data.
> If I simply format /dev/sda1 as an ext3 file system then I can't "add" the second drive later on.
>
> How can I set it up as a `degraded` raid1 array so I can later on add in the second drive and sync?
>
Specify two drives and one as missing.
--
Bill Davidsen <davidsen@tmr.com>
"Woe unto the statesman who makes war without a reason that will still
be valid when the war is over..." Otto von Bismark
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-01-20 22:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-20 19:28 how to create a degraded raid1 with only 1 of 2 drives ?? Mitchell Laks
2008-01-20 19:34 ` michael
2008-01-20 19:52 ` Mitchell Laks
2008-01-20 21:38 ` David Greaves
2008-01-20 22:12 ` Bill Davidsen
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).