środa, 20 listopada 2013

mdadm "lost" discs

A few days ago I had to stop my systems. One of them had different kind of storage like: luns, nfs and software raids. After turned on system I realized that I had had no software raid. I checked if everything was connected and checked if discs exists.
mdadm --examine /dev/sd[b-t] /dev/sdc: Magic : a92b4efc Version : 1.2 Feature Map : 0x0 Array UUID : 2632f0c3:b113d4e9:056228c1:d30a6ab0 Name : synat2:0 (local to host synat2) Creation Time : Tue Dec 11 13:59:58 2012 Raid Level : raid0 Raid Devices : 10 Avail Dev Size : 47997696 (22.89 GiB 24.57 GB) Data Offset : 2048 sectors Super Offset : 8 sectors State : clean Device UUID : da8f3a5d:10f75bee:f074ba7e:f0494c09 Update Time : Tue Dec 11 13:59:58 2012 Checksum : d24bdccc - correct Events : 0 Chunk Size : 512K Device Role : Active device 7 Array State : AAAAAAAAAA ('A' == active, '.' == missing) /dev/sdd: Magic : a92b4efc Version : 1.2 Feature Map : 0x0 Array UUID : 2632f0c3:b113d4e9:056228c1:d30a6ab0 Name : synat2:0 (local to host synat2) Creation Time : Tue Dec 11 13:59:58 2012 Raid Level : raid0 Raid Devices : 10 Avail Dev Size : 47997696 (22.89 GiB 24.57 GB) Data Offset : 2048 sectors Super Offset : 8 sectors State : clean Device UUID : c4d19ddc:f5dc1884:c6ef0844:3abe1c66 Update Time : Tue Dec 11 13:59:58 2012 Checksum : 98af3bd - correct Events : 0 Chunk Size : 512K Device Role : Active device 8 Array State : AAAAAAAAAA ('A' == active, '.' == missing) /dev/sde: Magic : a92b4efc Version : 1.2 Feature Map : 0x0 Array UUID : 2632f0c3:b113d4e9:056228c1:d30a6ab0 Name : synat2:0 (local to host synat2) Creation Time : Tue Dec 11 13:59:58 2012 Raid Level : raid0 Raid Devices : 10 Avail Dev Size : 47997696 (22.89 GiB 24.57 GB) Data Offset : 2048 sectors Super Offset : 8 sectors State : clean Device UUID : 51e205a2:40aa348f:3f2041a9:872d3e1f Update Time : Tue Dec 11 13:59:58 2012 Checksum : f868715b - correct Events : 0 Chunk Size : 512K Device Role : Active device 9 Array State : AAAAAAAAAA ('A' == active, '.' == missing) /dev/sdf: Magic : a92b4efc Version : 1.2 Feature Map : 0x0 Array UUID : 2632f0c3:b113d4e9:056228c1:d30a6ab0 Name : synat2:0 (local to host synat2) Creation Time : Tue Dec 11 13:59:58 2012 Raid Level : raid0 Raid Devices : 10 Avail Dev Size : 47997696 (22.89 GiB 24.57 GB) Data Offset : 2048 sectors Super Offset : 8 sectors State : clean Device UUID : 1832c689:2cb35bfc:d2c97cf5:d84c985d Update Time : Tue Dec 11 13:59:58 2012 Checksum : d7e592ea - correct Events : 0 Chunk Size : 512K Device Role : Active device 0 Array State : AAAAAAAAAA ('A' == active, '.' == missing) /dev/sdg: Magic : a92b4efc Version : 1.2 Feature Map : 0x0 Array UUID : 2632f0c3:b113d4e9:056228c1:d30a6ab0 Name : synat2:0 (local to host synat2) Creation Time : Tue Dec 11 13:59:58 2012 Raid Level : raid0 Raid Devices : 10 Avail Dev Size : 47997696 (22.89 GiB 24.57 GB) Data Offset : 2048 sectors Super Offset : 8 sectors State : clean Device UUID : 5a9a6781:53904dfc:0f5789c9:e0df60e8 Update Time : Tue Dec 11 13:59:58 2012 Checksum : 2e4df89a - correct Events : 0 Chunk Size : 512K Device Role : Active device 1 Array State : AAAAAAAAAA ('A' == active, '.' == missing) /dev/sdh: Magic : a92b4efc Version : 1.2 Feature Map : 0x0 Array UUID : 2632f0c3:b113d4e9:056228c1:d30a6ab0 Name : synat2:0 (local to host synat2) Creation Time : Tue Dec 11 13:59:58 2012 Raid Level : raid0 Raid Devices : 10 Avail Dev Size : 47997696 (22.89 GiB 24.57 GB) Data Offset : 2048 sectors Super Offset : 8 sectors State : clean Device UUID : afa5008b:efc248ab:5ab3bce0:2def6ad1 Update Time : Tue Dec 11 13:59:58 2012 Checksum : e71fa223 - correct Events : 0 Chunk Size : 512K Device Role : Active device 2 Array State : AAAAAAAAAA ('A' == active, '.' == missing) /dev/sdi: Magic : a92b4efc Version : 1.2 Feature Map : 0x0 Array UUID : 2632f0c3:b113d4e9:056228c1:d30a6ab0 Name : synat2:0 (local to host synat2) Creation Time : Tue Dec 11 13:59:58 2012 Raid Level : raid0 Raid Devices : 10 Avail Dev Size : 47997696 (22.89 GiB 24.57 GB) Data Offset : 2048 sectors Super Offset : 8 sectors State : clean Device UUID : c8e16d74:a1940d4c:5a802c6a:5173a94c Update Time : Tue Dec 11 13:59:58 2012 Checksum : 76000112 - correct Events : 0 Chunk Size : 512K Device Role : Active device 3 Array State : AAAAAAAAAA ('A' == active, '.' == missing) /dev/sdj: Magic : a92b4efc Version : 1.2 Feature Map : 0x0 Array UUID : 2632f0c3:b113d4e9:056228c1:d30a6ab0 Name : synat2:0 (local to host synat2) Creation Time : Tue Dec 11 13:59:58 2012 Raid Level : raid0 Raid Devices : 10 Avail Dev Size : 47997696 (22.89 GiB 24.57 GB) Data Offset : 2048 sectors Super Offset : 8 sectors State : clean Device UUID : 53051171:604d9634:a7f5c2b6:14c2bddd Update Time : Tue Dec 11 13:59:58 2012 Checksum : 38d6a16e - correct Events : 0 Chunk Size : 512K Device Role : Active device 4 Array State : AAAAAAAAAA ('A' == active, '.' == missing) /dev/sdk: Magic : a92b4efc Version : 1.2 Feature Map : 0x0 Array UUID : 2632f0c3:b113d4e9:056228c1:d30a6ab0 Name : synat2:0 (local to host synat2) Creation Time : Tue Dec 11 13:59:58 2012 Raid Level : raid0 Raid Devices : 10 Avail Dev Size : 47997696 (22.89 GiB 24.57 GB) Data Offset : 2048 sectors Super Offset : 8 sectors State : clean Device UUID : fc3706df:d1f2df92:f50a37a7:55fd1845 Update Time : Tue Dec 11 13:59:58 2012 Checksum : 5ce4ca18 - correct Events : 0 Chunk Size : 512K Device Role : Active device 5 Array State : AAAAAAAAAA ('A' == active, '.' == missing) /dev/sdl: Magic : a92b4efc Version : 1.2 Feature Map : 0x0 Array UUID : 2632f0c3:b113d4e9:056228c1:d30a6ab0 Name : synat2:0 (local to host synat2) Creation Time : Tue Dec 11 13:59:58 2012 Raid Level : raid0 Raid Devices : 10 Avail Dev Size : 47997696 (22.89 GiB 24.57 GB) Data Offset : 2048 sectors Super Offset : 8 sectors State : clean Device UUID : 6ae2fd1e:30297e6c:4a26a015:2edcfe2c Update Time : Tue Dec 11 13:59:58 2012 Checksum : ccc9a512 - correct Events : 0 Chunk Size : 512K Device Role : Active device 6 Array State : AAAAAAAAAA ('A' == active, '.' == missing)
Than I realized that in my mdadm.conf were entries with /dev/dm-*. It means that something was wrong because in /dev I had only 4 entries contained dm*. It turned out that my multipath configuration blocked other dm-* devices to be discovered. I switched dm to disk/by-id.
root@testing:~# cat /etc/mdadm/mdadm.conf | grep -v ^# CREATE owner=root group=disk mode=0660 auto=yes HOMEHOST MAILADDR root DEVICE /dev/disk/by-id/scsi-SATA_MARVELL_*
Did:
root@testing:~# mdadm --assemble --scan
and
root@testing:~# mount -a
Now everything works as it should.