Re: Where do I find the definitive man page for mdadm?
On Friday 12 November 2021 10:18:07 Dan Ritter wrote:
> Gene Heskett wrote:
> > On Friday 12 November 2021 08:49:21 Dan Ritter wrote:
> > > Gene Heskett wrote:
> > > > The man page we have goes on and on for megabytes without ever
> > > > giving an example.
> > > >
> > > > I thought maybe it could scan for devices so that I could build
> > > > an mdadm.conf but it wont do a --scan by itself.
> > >
> > > You are looking for
> > >
> > > mdadm --detail --scan
> >
> > Null return on stretch version of mdadm. Supposedly up to date as of
> > an hour ago.
>
> That would be expected if you don't have any current mdadm
> devices.
Explains that, thanks.
> > Not in the stretch man page. And its sounding as if I should do
> > that during the bullseye install to get the more capable mdadm, but
> > will the devices have the same names? With the reputation for
> > volatility of device names a mistake there could destroy 23 years of
> > data.
>
> 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:
gene@coyote:~$ cat /etc/mdadm/mdadm.conf
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan,
using
# wildcards if desired.
#DEVICE partitions containers
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
# This configuration was auto-generated on Sun, 08 Aug 2021
01:18:22 -0400 by mkconf
Which from your descriptions is not complete. No ARRAY statements at all.
What did I do wrong?
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.
At the instant its mounted as /dev/md0 to /home2 and looks like an empty
nearly 2 T-byte drive to an ls -la:
gene@coyote:~$ ls -la /home2
total 24
drwxr-xr-x 3 root root 4096 Nov 12 11:12 .
drwxr-xr-x 29 root root 4096 Nov 12 11:16 ..
drwx------ 2 root root 16384 Nov 12 11:12 lost+found
LABEL as I recall is a journalctl function? Does it work on raid10's?
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? And for
the time being use that UUID in /etc/fstab to mount it to /home2, right?
> And during boot, the system will look for all drives/partitions that
> fit that UUID for assembly, regardless of whether they are currently
> named /dev/hdc3, /dev/sdq, or /dev/nvme0np1.
>
> -dsr-
Thanks Dan
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: