* Force mdadm to not prompt the user
@ 2014-04-14 15:33 Francis Moreau
2014-04-14 22:48 ` NeilBrown
0 siblings, 1 reply; 3+ messages in thread
From: Francis Moreau @ 2014-04-14 15:33 UTC (permalink / raw)
To: linux-raid
Hello,
I'm using mdadm in script which setup a system automtically.
When creating a RAID array, I'd like mdadm to not prompt the user.
Currently I get:
# mdadm --create array1 --force --metadata=1.0 --level=raid1
--raid-devices=3 /dev/vdb1 /dev/vdc1 /dev/vdd1
mdadm: /dev/vdb1 appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970
mdadm: metadata will over-write last partition on /dev/vdb1.
Continue creating array?
I thought that using --force would do the trick, but it didn't.
I'm using mdadm - v3.3 - 3rd September 2013
Is there any other way to achieve that ?
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Force mdadm to not prompt the user
2014-04-14 15:33 Force mdadm to not prompt the user Francis Moreau
@ 2014-04-14 22:48 ` NeilBrown
2014-04-15 6:41 ` Francis Moreau
0 siblings, 1 reply; 3+ messages in thread
From: NeilBrown @ 2014-04-14 22:48 UTC (permalink / raw)
To: Francis Moreau; +Cc: linux-raid
[-- Attachment #1: Type: text/plain, Size: 891 bytes --]
On Mon, 14 Apr 2014 17:33:12 +0200 Francis Moreau <francis.moro@gmail.com>
wrote:
> Hello,
>
> I'm using mdadm in script which setup a system automtically.
>
> When creating a RAID array, I'd like mdadm to not prompt the user.
>
> Currently I get:
>
> # mdadm --create array1 --force --metadata=1.0 --level=raid1
> --raid-devices=3 /dev/vdb1 /dev/vdc1 /dev/vdd1
> mdadm: /dev/vdb1 appears to be part of a raid array:
> level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970
> mdadm: metadata will over-write last partition on /dev/vdb1.
> Continue creating array?
>
> I thought that using --force would do the trick, but it didn't.
>
> I'm using mdadm - v3.3 - 3rd September 2013
>
> Is there any other way to achieve that ?
run
man mdadm
search for "prompt".... doesn't find anything.
search for "ask". Ahh, there is the answer.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Force mdadm to not prompt the user
2014-04-14 22:48 ` NeilBrown
@ 2014-04-15 6:41 ` Francis Moreau
0 siblings, 0 replies; 3+ messages in thread
From: Francis Moreau @ 2014-04-15 6:41 UTC (permalink / raw)
To: NeilBrown; +Cc: linux-raid
On 04/15/2014 12:48 AM, NeilBrown wrote:
> On Mon, 14 Apr 2014 17:33:12 +0200 Francis Moreau <francis.moro@gmail.com>
> wrote:
>
>> Hello,
>>
>> I'm using mdadm in script which setup a system automtically.
>>
>> When creating a RAID array, I'd like mdadm to not prompt the user.
>>
>> Currently I get:
>>
>> # mdadm --create array1 --force --metadata=1.0 --level=raid1
>> --raid-devices=3 /dev/vdb1 /dev/vdc1 /dev/vdd1
>> mdadm: /dev/vdb1 appears to be part of a raid array:
>> level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970
>> mdadm: metadata will over-write last partition on /dev/vdb1.
>> Continue creating array?
>>
>> I thought that using --force would do the trick, but it didn't.
>>
>> I'm using mdadm - v3.3 - 3rd September 2013
>>
>> Is there any other way to achieve that ?
>
> run
> man mdadm
>
> search for "prompt".... doesn't find anything.
> search for "ask". Ahh, there is the answer.
>
ah, sorry I missed it.
In the meantime I tried the --zero-superblock in order to clean the
metadata from /dev/vdb1:
# mdadm --create array1 --force --metadata=1.0 --level=raid1
--raid-devices=3 /dev/vdb1 /dev/vdc1 /dev/vdd1
mdadm: /dev/vdb1 appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970
mdadm: metadata will over-write last partition on /dev/vdb1.
Continue creating array? n
mdadm: create aborted.
# mdadm --zero-superblock /dev/vdb1
mdadm: Unrecognised md component device - /dev/vdb1
# mdadm --zero-superblock --force /dev/vdb1
mdadm: Unrecognised md component device - /dev/vdb1
# mdadm --create array1 --force --metadata=1.0 --level=raid1
--raid-devices=3 /dev/vdb1 /dev/vdc1 /dev/vdd1
mdadm: /dev/vdb1 appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970
mdadm: metadata will over-write last partition on /dev/vdb1.
Continue creating array? n
mdadm doesn't tell me which metadata it sees but I tried the different
ones and got the same result.
What am I missing ?
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-15 6:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14 15:33 Force mdadm to not prompt the user Francis Moreau
2014-04-14 22:48 ` NeilBrown
2014-04-15 6:41 ` Francis Moreau
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).