deleting mdadm array?

2007-10-25 Thread Janek Kozicki
Hello,

I just created a new array /dev/md1 like this:

mdadm --create --verbose /dev/md1 --chunk=64 --level=raid5 \
   --metadata=1.1  --bitmap=internal \
   --raid-devices=3 /dev/hdc2 /dev/sda2 missing


But later I changed my mind, and I wanted to use chunk 128. Do I need
to delete this array somehow first, or can I just create an array
again (overwriting the current one)?

-- 
Janek Kozicki |
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: deleting mdadm array?

2007-10-25 Thread Neil Brown
On Thursday October 25, [EMAIL PROTECTED] wrote:
 Hello,
 
 I just created a new array /dev/md1 like this:
 
 mdadm --create --verbose /dev/md1 --chunk=64 --level=raid5 \
--metadata=1.1  --bitmap=internal \
--raid-devices=3 /dev/hdc2 /dev/sda2 missing
 
 
 But later I changed my mind, and I wanted to use chunk 128. Do I need
 to delete this array somehow first, or can I just create an array
 again (overwriting the current one)?

Just recreate with new values, overwriting the current one.

NeilBrown
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: deleting mdadm array?

2007-10-25 Thread David Greaves
Janek Kozicki wrote:
 Hello,
 
 I just created a new array /dev/md1 like this:
 
 mdadm --create --verbose /dev/md1 --chunk=64 --level=raid5 \
--metadata=1.1  --bitmap=internal \
--raid-devices=3 /dev/hdc2 /dev/sda2 missing
 
 
 But later I changed my mind, and I wanted to use chunk 128. Do I need
 to delete this array somehow first, or can I just create an array
 again (overwriting the current one)?

How much later? This will, of course, destroy any data on the array (!) and
you'll need to mkfs again...


To answer the question though: just run mdadm again to create a new array with
new parameters.


I think the only time you need to 'delete' an array before creating a new one is
if you change the superblock version since it quietly writes different
superblocks to different disk locations you may end up with 2 superblocks on the
disk and then you get confusion :)
(I'm not sure if mdadm is clever about this though...)

Also, if you don't mind me asking: why did you choose version 1.1 for the
metadata/superblock version?

David

-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: deleting mdadm array?

2007-10-25 Thread Neil Brown
On Thursday October 25, [EMAIL PROTECTED] wrote:
 I think the only time you need to 'delete' an array before creating a new one 
 is
 if you change the superblock version since it quietly writes different
 superblocks to different disk locations you may end up with 2 superblocks on 
 the
 disk and then you get confusion :)
 (I'm not sure if mdadm is clever about this though...)
 

Mdadm tries to be clever.

When creating an array, it zeros any superblocks that it finds on the
array in any of the expected locations.
And when guessing the metadata format used, if it find two or more, it
chooses the one with the more recent create timestamp.

NeilBrown
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html