[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where do I find the definitive man page for mdadm?



On Saturday 13 November 2021 06:02:35 Dan Ritter wrote:

> Gene Heskett wrote:
> > On Friday 12 November 2021 08:49:21 Dan Ritter wrote:
> >
> > Ok, zeroed them, nuked mdadm.conf & rebooted.
> > gparted each one, setting 2 partitions in GPT format on each of
> > 900000 MIB (sde1) with label MDV1 and 5000 MIB (sde2) labeled MDV2
> > and applied that to each of the 4 drives. Double check as /dev/sdf
> > somehow swapped positions on the drive, fixed that: Wash rinse and
> > repeat for sdf, sdg, and sdh with labels of MDX1, MDX2, MDY1, MDY2
> > and MDZ1 and MDZ2. And of course gparted makes a file system when
> > Apply is clicked.
> >
> > but:
> > root@coyote:~$
> > mdadm -C /dev/md0 --level=10 --raid-devices=4 /dev/sde1 /dev/sdf1
> > /dev/sdg1 /dev/sdh1 mdadm: /dev/sde1 appears to contain an ext2fs
> > file system
> >        size=921600000K  mtime=Wed Dec 31 19:00:00 1969
> > mdadm: /dev/sdf1 appears to contain an ext2fs file system
> >        size=921600000K  mtime=Wed Dec 31 19:00:00 1969
> > mdadm: /dev/sdg1 appears to contain an ext2fs file system
> >        size=921600000K  mtime=Wed Dec 31 19:00:00 1969
> > mdadm: /dev/sdh1 appears to contain an ext2fs file system
> >        size=921600000K  mtime=Wed Dec 31 19:00:00 1969
> > Continue creating array? yes
>
> You should stop there and run wipefs. I note from later mail in
> this thread that you didn't; and then you had to reboot.
>
> With the array not started, or stopped, run wipefs on each of
> the partitions.

My mdadm manpage does not show the -S command. Scanniing it again to make 
sure, probably for about the 10th time and I finally found it but many 
megabytes of relatively unimportant drivel down from the top, IMO the 
manpage is missleading as such an important option ought to be shown on 
the first screenfull.

So wipefs failed.

dd doesn't care so zeroed the first 1000 blocks of each drive, nuke 
mdadm.conf then rebooted,  gparted was then able to reconfigure the 
drives. But then mdadm wouldn't accept because gparted had formatted 
them, not to mention miss-labeled them, so yet another reboot, and keep 
rebooting unil somebody, Wanderer I believe, told me 
about "mdadm -S /dev/ice" command.

Turns out I had to use fdisk to create a GPT partition table, one at 
+900G and one at +30G on each drive without formatting, then reboot 
again after nukeing mdadm.conf for the 9th or so time, at which point I 
was able to create a raid10 using sde1,sdf1,sfg1,and sdh1 as md0, and an 
md1 as sde2,sdf2,sdg2 and sdh2, and then format them both to ext4.

> Then these -C commands should work well without warnings, and
> creating a filesystem on the /dev/mdX devices will proceed
> without warnings or errors.

Yes, finally, but the mdadm man page and its poor formatting were far 
more hindrance than help. Experienced people here are to be thanked, and 
I do, but not that disastrous man page.

> > There are a few unallocated blocks at the ends of all drives.
> > gparted chose alignment and prespace in MiB. Do I need to add a 3rd
> > partition to use them up? All drives seem to be identical sizewise
> > but the pages recommend identical partition sizes. Theoreticly I
> > could expand the smaller partition to use it up.
>
> I would not bother.
>
> -dsr-

Thanks Dan. And everyone else who came to my rescue in this long thread.
Nearly everyone was Cc: ing me, but I'm subscribed, close to a decade, 
maybe more.  So I have duplicates to clean up. NBD. 

Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


Reply to: