Server: Dell T20 with additional SATA PCI-E controller, 5 SATA drives plugged in at the moment. All GPT partitioned.
System: GNU/Linux Debian 9 Stretch.
Situation: I often change HDD configuration in order to run data extractions from customer formatted drives and such.
Problem: If I unplug some drive(s), and plug in new one(s), I need to edit the file systems file:
If I don't do that, the system would hang on boot.
Personal suspicion: If I unplug, say:
Which is part of one software RAID1 using
mdadm, and plug in some other drive, the system, I think, is searching for the original drive, but finds other drive.
mdadm.conf file follows:
cat /etc/mdadm/mdadm.conf | grep ARRAY -A 1
ARRAY /dev/md1 level=raid1 num-devices=2 metadata=1.2 name=backup-server:1 UUID=319334f9:76d6fccf:d61307bd:2427b6ba devices=/dev/sdd1,/dev/sde1
/dev/md1 detail follows:
/dev/md1: Version : 1.2 Creation Time : Sun Mar 26 17:25:30 2017 Raid Level : raid1 Array Size : 976630464 (931.39 GiB 1000.07 GB) Used Dev Size : 976630464 (931.39 GiB 1000.07 GB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Fri Aug 18 13:44:37 2017 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Name : backup-server:1 (local to host backup-server) UUID : 319334f9:76d6fccf:d61307bd:2427b6ba Events : 2562 Number Major Minor RaidDevice State 0 8 49 0 active sync /dev/sdd1 1 8 65 1 active sync /dev/sde1
Question #1: Is the
devices line mandatory and if so, may I address the drives by UUID?
Question #2: Say I re-plug-in the original
sde drive to another cable, how to make it still recognized? I think this whole thing should be addressing drives and array by UUID and it would be solved, no? If I am correct, where do I have to change stuff?