Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #235880
| From | Dan Ritter <dsr@randomstring.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Add /dev/disk/by-id path to mdadm error emails? |
| Date | 2021-06-04 15:20 +0200 |
| Message-ID | <CmhTX-73G-3@gated-at.bofh.it> (permalink) |
| References | <CmhqV-6Fg-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Reiner Buehl wrote:
> Hello all,
>
> I have setup mdadm to email me when disks in one of my RAID arrays fail.
> Unfortunately the email messages only contain the device as /dev/sdb1 which
> does not give any hint which of the four identical disks in the array is
> the affected one.
> As /dev/sdb1 is only a symbolic link to a device in /dev/disk/by-id and
> that device contains the serial number of the disk, I was wondering if
> there is a way to add the /dev/disk/by-id information - or just a ls -l
> /dev/disk/by-id - to that email that would allow me to see which disk
> really is the failed one?
--prefer=
When mdadm needs to print the name for a device it
normally finds the name in /dev which refers to the device
and is shortest. When a path component is given with
--prefer mdadm will prefer a longer name if it contains
that component. For example --prefer=by-uuid will
prefer a name in a subdirectory of /dev called by-uuid.
This functionality is currently only provided by --detail
and --monitor.
If you have a cron job to run mdadm -F, this can be added. If
you have a system service to run mdadm -F in daemon mode, that
can be edited to include --prefer=by-id
-dsr-
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Add /dev/disk/by-id path to mdadm error emails? Reiner Buehl <reiner.buehl@gmail.com> - 2021-06-04 14:50 +0200
Re: Add /dev/disk/by-id path to mdadm error emails? Dan Ritter <dsr@randomstring.org> - 2021-06-04 15:20 +0200
Re: Add /dev/disk/by-id path to mdadm error emails? Reiner Buehl <reiner.buehl@gmail.com> - 2021-06-04 22:40 +0200
csiph-web