[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 07:33:49 Andy Smith wrote:

> Hello,
>
> On Fri, Nov 12, 2021 at 11:42:32AM -0500, Gene Heskett wrote:
> > On Friday 12 November 2021 10:18:07 Dan Ritter wrote:
> > > After you have set them up, mdadm.conf has things like this:
> > >
> > > ARRAY /dev/md/0 metadata=1.2 name=debian:0
> > > UUID=aeac6271:676b1852:04f077d6:fcd285d6 ARRAY /dev/md/1
> > > metadata=1.2 name=debian:1
> > > UUID=d74ff881:2e966c37:ec6ef1ec:75b8cdce ARRAY /dev/md/2
> > > metadata=1.2 name=debian:2
> > > UUID=7c56166b:0d5aed8b:a9d03c45:e9b8080c
> >
> > That doesn't appear to be true. I have run the create which seemed
> > to be ok, then mkfs -text4 /dev/md0, then mounted it at /home2.
> >
> > But /etc/mdadm/mdadm.conf doesn't yet have any of that, only this:
>
> You don't need to list the arrays in /etc/mdadm/mdadm.conf since
> udev assembles arrays based on the metadata that exists on each
> device. It's fine for there to be no ARRAY lines in there. These
> days it's only really useful in recovery situations or for setting
> some special options per array.
>
> You can still do the
>
> # mdadm --detail --scan
>
> to find the lines to put in the mdadm.conf yourself.
>
> > And again, I don't trust UUID's as moving a drive cable to a
> > different socket has invalidated the whole lot of them once before.
> > I would much rather LABEL the array, and mount it in /etc/fstab by
> > that label.
>
> There may be some conceptual error here. The UUIDs you would put in
> /etc/fstab are FILESYSTEM UUIDs, not array UUIDs. Lots of things in
> computing have UUIDs.
>
> After you put a filesystem on each array you can refer to the
> FILESYSTEM label in /etc/fstab. These labels are internal to each
> filesystem and nothing to do with any layer below, such as md.
>
> > LABEL as I recall is a journalctl function? Does it work on
> > raid10's?
Its been quite a while but fdisk didn't do labels, but I see it grew that 
along with GPT tables. But back in the day, ISTR adding a label to a 
drive was done by journalctl and I'd call adding a label to a drive a 
function.
> Filesystem labels have nothing to do with journalctl. And I don't
> know what you mean by them being "a function".
>
> Again, filesystems (can) have labels, these are a filesystem detail,
> RAID doesn't know nor care.

So I see, but the names for md0 and md1 are shown as hostname:0 and 
hostname:1

> > Humm, now:
> > gene@coyote:~/AppImages$ sudo mdadm --detail  --scan
> > [sudo] password for gene:
> > ARRAY /dev/md0 metadata=1.2 name=coyote:0
> > UUID=8ad67ef1:a14d63ab:c684ec2b:42a0c011
> >
> > So I should add that last line to which category in mdadm.conf?
>
> mdamd.conf doesn't have categories. You would just append that line
> at the end, ensuring it is all on one line.

Yup, that was kmails word wrap. I forgot to turn it off when I pasted 
that.
>
> > And for the time being use that UUID in /etc/fstab to mount it to
> > /home2, right?
>
> No, because that is not a filesystem UUID. And you said you wanted
> to mount the filesystem by label anyway. So put whatever label you
> chose when you did mkfs (or when you did it form the installer).
>
> In a later email you did this:
>
> # mkfs -Text4 …
>
> and got an obscure error.
>
> That's because you did "-T" instead of "-t", which means something
> completely different. You may want to get into the habit of doing:
>
> # mkfs.ext4 …
>
> instead as it's clearer and easier to remember.
>
> Cheers,
> Andy

Thanks Andy.

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: