* deleting mdadm array? @ 2007-10-25 8:06 Janek Kozicki 2007-10-25 8:17 ` Neil Brown 2007-10-25 9:55 ` David Greaves 0 siblings, 2 replies; 5+ messages in thread From: Janek Kozicki @ 2007-10-25 8:06 UTC (permalink / raw) To: linux-raid 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 | ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: deleting mdadm array? 2007-10-25 8:06 deleting mdadm array? Janek Kozicki @ 2007-10-25 8:17 ` Neil Brown 2007-10-25 9:55 ` David Greaves 1 sibling, 0 replies; 5+ messages in thread From: Neil Brown @ 2007-10-25 8:17 UTC (permalink / raw) To: Janek Kozicki; +Cc: linux-raid On Thursday October 25, janek_listy@wp.pl 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: deleting mdadm array? 2007-10-25 8:06 deleting mdadm array? Janek Kozicki 2007-10-25 8:17 ` Neil Brown @ 2007-10-25 9:55 ` David Greaves 2007-10-25 10:12 ` Neil Brown 2007-10-25 13:36 ` Janek Kozicki 1 sibling, 2 replies; 5+ messages in thread From: David Greaves @ 2007-10-25 9:55 UTC (permalink / raw) To: Janek Kozicki; +Cc: linux-raid 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: deleting mdadm array? 2007-10-25 9:55 ` David Greaves @ 2007-10-25 10:12 ` Neil Brown 2007-10-25 13:36 ` Janek Kozicki 1 sibling, 0 replies; 5+ messages in thread From: Neil Brown @ 2007-10-25 10:12 UTC (permalink / raw) To: David Greaves; +Cc: Janek Kozicki, linux-raid On Thursday October 25, david@dgreaves.com 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: deleting mdadm array? 2007-10-25 9:55 ` David Greaves 2007-10-25 10:12 ` Neil Brown @ 2007-10-25 13:36 ` Janek Kozicki 1 sibling, 0 replies; 5+ messages in thread From: Janek Kozicki @ 2007-10-25 13:36 UTC (permalink / raw) To: linux-raid David Greaves said: (by the date of Thu, 25 Oct 2007 10:55:44 +0100) > How much later? This will, of course, destroy any data on the array (!) and > you'll need to mkfs again... Just after, I didn't even create LVM volume on it (not mentioning formatting it). > Also, if you don't mind me asking: why did you choose version 1.1 for the > metadata/superblock version? In "time to deprecate old RAID formats" Doug Ledford said, that 1.1 is safest when used with LVM. I wish that this info would get into the man page. I just hope that grub will be able to boot from LVM from '/' partition raid1 (version 1.1), I didn't check this yet. Doug Ledford said: (by the date of Fri, 19 Oct 2007 12:15:34 -0400) > 1.0, 1.1, and 1.2 are the same format, just in different positions on > the disk. Of the three, the 1.1 format is the safest to use since it > won't allow you to accidentally have some sort of metadata between the > beginning of the disk and the raid superblock (such as an lvm2 > superblock), and hence whenever the raid array isn't up, you won't be > able to accidentally mount the lvm2 volumes, filesystem, etc. (In worse > case situations, I've seen lvm2 find a superblock on one RAID1 array > member when the RAID1 array was down, the system came up, you used the > system, the two copies of the raid array were made drastically > inconsistent, then at the next reboot, the situation that prevented the > RAID1 from starting was resolved, and it never know it failed to start > last time, and the two inconsistent members we put back into a clean > array). So, deprecating any of these is not really helpful. And you > need to keep the old 0.90 format around for back compatibility with > thousands of existing raid arrays. > -- Janek Kozicki | ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-25 13:36 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-10-25 8:06 deleting mdadm array? Janek Kozicki 2007-10-25 8:17 ` Neil Brown 2007-10-25 9:55 ` David Greaves 2007-10-25 10:12 ` Neil Brown 2007-10-25 13:36 ` Janek Kozicki
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).