Simon Matter
2019-Feb-26 05:54 UTC
[CentOS] Problem with mdadm, raid1 and automatically adds any disk to raid
> On 2/24/19 9:01 PM, Jobst Schmalenbach wrote: >> I tried to delete the MDX, I removed the disks by failing them, then >> removing each array md0, md1 and md2. >> I also did >> >> dd if=/dev/zero of=/dev/sdX bs=512 seek=$(($(blockdev --getsz >> /dev/sdX)-1024)) count=1024 > > > Clearing the initial sectors doesn't do anything to clear the data in > the partitions.? They don't become blank just because you remove them. > > Partition your drives, and then use "wipefs -a /dev/sd{b,c}{1,2,3}" > > >> I do NOT WANT this to happen, it creates the same "SHIT" (the incorrect >> array) over and over again (systemd frustration). > > > What makes you think this has *anything* to do with systemd? Bitching > about systemd every time you hit a problem isn't helpful.? Don't.If it's not systemd, who else does it? Can you elaborate, please? Regards, Simon
Christofer C. Bell
2019-Feb-26 14:10 UTC
[CentOS] Problem with mdadm, raid1 and automatically adds any disk to raid
On Mon, Feb 25, 2019 at 11:54 PM Simon Matter via CentOS <centos at centos.org> wrote:> > > > What makes you think this has *anything* to do with systemd? Bitching > > about systemd every time you hit a problem isn't helpful. Don't. > > If it's not systemd, who else does it? Can you elaborate, please? >I'll wager it's the mdadm.service unit. You're seeing systemd in the log because systemd has a unit loaded that's managing your md devices. The package mdadm installs these files: /usr/lib/systemd/system/mdadm.service /usr/lib/systemd/system/mdmonitor-takeover.service /usr/lib/systemd/system/mdmonitor.service Perhaps if you turn off these services, you'll be able to manage your disks without interference. I do not use mdadm on my system, I'm just looking at the content of the rpm file on rpmfind.net. That said, systemd isn't the culprit here. It's doing what it's supposed to (starting a managed service on demand). I do concede the logs are confusing. For example, this appears in my logs: Feb 26 05:10:03 demeter systemd: Starting This service automatically renews any certbot certificates found... While there is no indication in the log, this is being started by: [cbell at demeter log]$ systemctl status certbot-renew.timer ? certbot-renew.timer - This is the timer to set the schedule for automated renewals Loaded: loaded (/usr/lib/systemd/system/certbot-renew.timer; enabled; vendor preset: disabled) Active: active (waiting) since Thu 2019-02-21 17:54:43 CST; 4 days ago Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable. [cbell at demeter log]$ And you can see the log message through the service unit using journalctl: [cbell at demeter log]$ journalctl -u certbot-renew.service | grep "This service" | tail -1 Feb 26 05:10:07 demeter.home systemd[1]: Started This service automatically renews any certbot certificates found. [cbell at demeter log]$ You can see there's no indication in /var/log/messages that it's the certbot-renewal service (timer) that's logging this. So it's easy to misinterpret where the messages are coming from, like your mdadm messages. Perhaps having the journal indicate which service or timer is logging a message is a feature request for Lennart! Hope this helps! -- Chris "If you wish to make an apple pie from scratch, you must first invent the Universe." -- Carl Sagan
Simon Matter
2019-Feb-26 14:37 UTC
[CentOS] Problem with mdadm, raid1 and automatically adds any disk to raid
> On Mon, Feb 25, 2019 at 11:54 PM Simon Matter via CentOS > <centos at centos.org> > wrote: > >> > >> > What makes you think this has *anything* to do with systemd? Bitching >> > about systemd every time you hit a problem isn't helpful. Don't. >> >> If it's not systemd, who else does it? Can you elaborate, please? >> > > I'll wager it's the mdadm.service unit. You're seeing systemd in the log > because systemd has a unit loaded that's managing your md devices. The > package mdadm installs these files: > > /usr/lib/systemd/system/mdadm.service > /usr/lib/systemd/system/mdmonitor-takeover.service > /usr/lib/systemd/system/mdmonitor.serviceI'm not sure what your box runs but it's at least not CentOS 7. CentOS 7 contains these md related units: /usr/lib/systemd/system/mdadm-grow-continue at .service /usr/lib/systemd/system/mdadm-last-resort at .service /usr/lib/systemd/system/mdadm-last-resort at .timer /usr/lib/systemd/system/mdmonitor.service /usr/lib/systemd/system/mdmon at .service The only md related daemon running besides systemd is mdadm. I've never seen such behavior with EL6 and the mdadm there so I don't think it will ever do such things. The message produced comes from mdadm-last-resort at .timer. Whatever triggers it it's either systemd or something like systemd-udevd. How is it not systemd doing it? Such things didn't happen with pre systemd distributions. Regards, Simon
Maybe Matching Threads
- Problem with mdadm, raid1 and automatically adds any disk to raid
- Problem with mdadm, raid1 and automatically adds any disk to raid
- Problem with mdadm, raid1 and automatically adds any disk to raid
- Problem with mdadm, raid1 and automatically adds any disk to raid
- Problem with mdadm, raid1 and automatically adds any disk to raid