* Simple Raid-1 setup question
@ 2009-11-13 20:34 Kurt Newman
2009-11-13 21:02 ` Majed B.
2009-11-13 22:24 ` Neil Brown
0 siblings, 2 replies; 4+ messages in thread
From: Kurt Newman @ 2009-11-13 20:34 UTC (permalink / raw)
To: linux-raid
My questions are as follows:
1) If you're creating a completely new array (e.g. raid-1) on new
partitions that aren't formatted, do you still have to sync? I'm having
difficulty finding information on why and when a sync is needed. I was
under the impression a sync is only needed when there's existing
information on one or more of the drives.
2) If there used to be information on each device, but has since been
repartitioned, so that new partitions and a raid device can be
created... is there any way to prevent mdadm from asking if you really
want to create the array? Using `--force' doesn't seem to help.
mdadm: /dev/sda1 appears to contain an ext2fs file system
size=1464840K mtime=Fri Nov 13:04:09 2009
mdadm: /dev/sdb1 appears to contain an ext2fs file system
size=1464840K mtime=Fri Nov 13:04:09 2009
Continue creating array?
As a side note, there really isn't an existing ext3 fs on it, but there
used to be. To re-use the device, I issued the following commands:
> parted -s /dev/sda mklabel msdos
> parted -s /dev/sda mkpart primary ext3 0 1500
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Simple Raid-1 setup question
2009-11-13 20:34 Simple Raid-1 setup question Kurt Newman
@ 2009-11-13 21:02 ` Majed B.
2009-11-13 23:26 ` Kurt Newman
2009-11-13 22:24 ` Neil Brown
1 sibling, 1 reply; 4+ messages in thread
From: Majed B. @ 2009-11-13 21:02 UTC (permalink / raw)
To: Kurt Newman; +Cc: linux-raid
1) No need to sync if both disks are new (or have no data).
That can be accomplished using: --assume-clean
2) It shouldn't be a problem. If you still can't force mdadm, use dd
(be very sure you're writing to the correct disks!!)
dd if=/dev/zero of=/dev/sdx bs=10M count=1
That will write 10MB of zeros to the disk. It should corrupt any
filesystem laying there.
Remember to change the partition type to "FD" for RAID auto-detect.
Create your filesystem on the array after you create it & that's it.
On Fri, Nov 13, 2009 at 11:34 PM, Kurt Newman <kurt@lamer.org> wrote:
> My questions are as follows:
>
> 1) If you're creating a completely new array (e.g. raid-1) on new
> partitions that aren't formatted, do you still have to sync? I'm having
> difficulty finding information on why and when a sync is needed. I was
> under the impression a sync is only needed when there's existing
> information on one or more of the drives.
>
> 2) If there used to be information on each device, but has since been
> repartitioned, so that new partitions and a raid device can be
> created... is there any way to prevent mdadm from asking if you really
> want to create the array? Using `--force' doesn't seem to help.
>
> mdadm: /dev/sda1 appears to contain an ext2fs file system
> size=1464840K mtime=Fri Nov 13:04:09 2009
> mdadm: /dev/sdb1 appears to contain an ext2fs file system
> size=1464840K mtime=Fri Nov 13:04:09 2009
> Continue creating array?
>
> As a side note, there really isn't an existing ext3 fs on it, but there
> used to be. To re-use the device, I issued the following commands:
> > parted -s /dev/sda mklabel msdos
> > parted -s /dev/sda mkpart primary ext3 0 1500
>
> --
> 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
>
--
Majed B.
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Simple Raid-1 setup question
2009-11-13 20:34 Simple Raid-1 setup question Kurt Newman
2009-11-13 21:02 ` Majed B.
@ 2009-11-13 22:24 ` Neil Brown
1 sibling, 0 replies; 4+ messages in thread
From: Neil Brown @ 2009-11-13 22:24 UTC (permalink / raw)
To: Kurt Newman; +Cc: linux-raid
On Friday November 13, kurt@lamer.org wrote:
> My questions are as follows:
>
> 1) If you're creating a completely new array (e.g. raid-1) on new
> partitions that aren't formatted, do you still have to sync? I'm having
> difficulty finding information on why and when a sync is needed. I was
> under the impression a sync is only needed when there's existing
> information on one or more of the drives.
You don't need to for RAID1 - you do for RAID5.
If you don't with RAID1, then the first time you run a 'check' to
'scrub' the array, it might report lots of differences in
mismatch_cnt.
>
> 2) If there used to be information on each device, but has since been
> repartitioned, so that new partitions and a raid device can be
> created... is there any way to prevent mdadm from asking if you really
> want to create the array? Using `--force' doesn't seem to help.
use -R or --run if you are really sure.
NeilBrown
>
> mdadm: /dev/sda1 appears to contain an ext2fs file system
> size=1464840K mtime=Fri Nov 13:04:09 2009
> mdadm: /dev/sdb1 appears to contain an ext2fs file system
> size=1464840K mtime=Fri Nov 13:04:09 2009
> Continue creating array?
>
> As a side note, there really isn't an existing ext3 fs on it, but there
> used to be. To re-use the device, I issued the following commands:
> > parted -s /dev/sda mklabel msdos
> > parted -s /dev/sda mkpart primary ext3 0 1500
>
> --
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Simple Raid-1 setup question
2009-11-13 21:02 ` Majed B.
@ 2009-11-13 23:26 ` Kurt Newman
0 siblings, 0 replies; 4+ messages in thread
From: Kurt Newman @ 2009-11-13 23:26 UTC (permalink / raw)
To: linux-raid
That clears up a lot of my questions. Although, --assume-clean isn't
doing what I'd like, I did some searches using the keyword,
'--assume-clean'. That lead me back to the linux raid wiki.
Apparently I lack the ability to read 'Initial Array Creation' the last
time I was there.
Thank you for the help.
Majed B. wrote:
> 1) No need to sync if both disks are new (or have no data).
> That can be accomplished using: --assume-clean
>
> 2) It shouldn't be a problem. If you still can't force mdadm, use dd
> (be very sure you're writing to the correct disks!!)
> dd if=/dev/zero of=/dev/sdx bs=10M count=1
>
> That will write 10MB of zeros to the disk. It should corrupt any
> filesystem laying there.
>
> Remember to change the partition type to "FD" for RAID auto-detect.
>
> Create your filesystem on the array after you create it & that's it.
>
> On Fri, Nov 13, 2009 at 11:34 PM, Kurt Newman <kurt@lamer.org> wrote:
>> My questions are as follows:
>>
>> 1) If you're creating a completely new array (e.g. raid-1) on new
>> partitions that aren't formatted, do you still have to sync? I'm having
>> difficulty finding information on why and when a sync is needed. I was
>> under the impression a sync is only needed when there's existing
>> information on one or more of the drives.
>>
>> 2) If there used to be information on each device, but has since been
>> repartitioned, so that new partitions and a raid device can be
>> created... is there any way to prevent mdadm from asking if you really
>> want to create the array? Using `--force' doesn't seem to help.
>>
>> mdadm: /dev/sda1 appears to contain an ext2fs file system
>> size=1464840K mtime=Fri Nov 13:04:09 2009
>> mdadm: /dev/sdb1 appears to contain an ext2fs file system
>> size=1464840K mtime=Fri Nov 13:04:09 2009
>> Continue creating array?
>>
>> As a side note, there really isn't an existing ext3 fs on it, but there
>> used to be. To re-use the device, I issued the following commands:
>> > parted -s /dev/sda mklabel msdos
>> > parted -s /dev/sda mkpart primary ext3 0 1500
>>
>> --
>> 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
>>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-13 23:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13 20:34 Simple Raid-1 setup question Kurt Newman
2009-11-13 21:02 ` Majed B.
2009-11-13 23:26 ` Kurt Newman
2009-11-13 22:24 ` Neil Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox