chuleta_raid_mdadm
Crear raid
mdadm --create --verbose /dev/md/md-bandeja-sas \ /dev/sdi /dev/sdj /dev/sdk /dev/sdl /dev/sdm \ /dev/sdn /dev/sdo /dev/sdp /dev/sdq /dev/sdr \ /dev/sds /dev/sdt /dev/sdu /dev/sdv /dev/sdw \ --level=6 \ --raid-devices=14 \ --spare-devices=1 \
Información raid
# mdadm --detail /dev/md/md-bandeja-sas
/dev/md/md-bandeja-sas:
Version : 1.2
Creation Time : Thu Aug 20 12:28:32 2020
Raid Level : raid6
Array Size : 23440588800 (22354.69 GiB 24003.16 GB)
Used Dev Size : 1953382400 (1862.89 GiB 2000.26 GB)
Raid Devices : 14
Total Devices : 15
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Thu Aug 20 12:38:19 2020
State : clean, resyncing
Active Devices : 14
Working Devices : 15
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 512K
Consistency Policy : bitmap
Resync Status : 0% complete
Name : md-bandeja-sas
UUID : 596f04dd:cc136fda:907e686f:aca85f28
Events : 97
Number Major Minor RaidDevice State
0 8 128 0 active sync /dev/sdi
1 8 144 1 active sync /dev/sdj
2 8 160 2 active sync /dev/sdk
3 8 176 3 active sync /dev/sdl
4 8 192 4 active sync /dev/sdm
5 8 208 5 active sync /dev/sdn
6 8 224 6 active sync /dev/sdo
7 8 240 7 active sync /dev/sdp
8 65 0 8 active sync /dev/sdq
9 65 16 9 active sync /dev/sdr
10 65 32 10 active sync /dev/sds
11 65 48 11 active sync /dev/sdt
12 65 64 12 active sync /dev/sdu
13 65 80 13 active sync /dev/sdv
14 65 96 - spare /dev/sdw
Detectado error de disco
root@cephosd01 cephadm]# mdadm --detail /dev/md/md-bandeja-sas
/dev/md/md-bandeja-sas:
Version : 1.2
Creation Time : Thu Aug 20 12:28:32 2020
Raid Level : raid6
Array Size : 23440588800 (22354.69 GiB 24003.16 GB)
Used Dev Size : 1953382400 (1862.89 GiB 2000.26 GB)
Raid Devices : 14
Total Devices : 15
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Thu Aug 20 12:59:20 2020
State : clean, degraded, recovering
Active Devices : 13
Working Devices : 14
Failed Devices : 1
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 512K
Consistency Policy : bitmap
Rebuild Status : 0% complete
Name : md-bandeja-sas
UUID : 596f04dd:cc136fda:907e686f:aca85f28
Events : 272
Number Major Minor RaidDevice State
0 8 128 0 active sync /dev/sdi
1 8 144 1 active sync /dev/sdj
2 8 160 2 active sync /dev/sdk
3 8 176 3 active sync /dev/sdl
4 8 192 4 active sync /dev/sdm
5 8 208 5 active sync /dev/sdn
6 8 224 6 active sync /dev/sdo
7 8 240 7 active sync /dev/sdp
8 65 0 8 active sync /dev/sdq
14 65 96 9 spare rebuilding /dev/sdw
10 65 32 10 active sync /dev/sds
11 65 48 11 active sync /dev/sdt
12 65 64 12 active sync /dev/sdu
13 65 80 13 active sync /dev/sdv
9 65 16 - faulty /dev/sdr
Retirar disco dañado
# mdadm /dev/md/md-bandeja-sas --remove /dev/sdr
mdadm: hot removed /dev/sdr from /dev/md/md-bandeja-sas
# mdadm --detail /dev/md/md-bandeja-sas
/dev/md/md-bandeja-sas:
Version : 1.2
Creation Time : Thu Aug 20 12:28:32 2020
Raid Level : raid6
Array Size : 23440588800 (22354.69 GiB 24003.16 GB)
Used Dev Size : 1953382400 (1862.89 GiB 2000.26 GB)
Raid Devices : 14
Total Devices : 14
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Thu Aug 20 13:02:25 2020
State : clean, degraded, recovering
Active Devices : 13
Working Devices : 14
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 512K
Consistency Policy : bitmap
Rebuild Status : 0% complete
Name : md-bandeja-sas
UUID : 596f04dd:cc136fda:907e686f:aca85f28
Events : 310
Number Major Minor RaidDevice State
0 8 128 0 active sync /dev/sdi
1 8 144 1 active sync /dev/sdj
2 8 160 2 active sync /dev/sdk
3 8 176 3 active sync /dev/sdl
4 8 192 4 active sync /dev/sdm
5 8 208 5 active sync /dev/sdn
6 8 224 6 active sync /dev/sdo
7 8 240 7 active sync /dev/sdp
8 65 0 8 active sync /dev/sdq
14 65 96 9 spare rebuilding /dev/sdw
10 65 32 10 active sync /dev/sds
11 65 48 11 active sync /dev/sdt
12 65 64 12 active sync /dev/sdu
13 65 80 13 active sync /dev/sdv
Añadir nuevo spare
# mdadm /dev/md/md-bandeja-sas --add-spare /dev/sdr
mdadm --detail /dev/md/md-bandeja-sas
/dev/md/md-bandeja-sas:
Version : 1.2
Creation Time : Thu Aug 20 12:28:32 2020
Raid Level : raid6
Array Size : 23440588800 (22354.69 GiB 24003.16 GB)
Used Dev Size : 1953382400 (1862.89 GiB 2000.26 GB)
Raid Devices : 14
Total Devices : 15
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Wed Sep 2 14:58:09 2020
State : clean
Active Devices : 14
Working Devices : 15
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 512K
Consistency Policy : bitmap
Name : md-bandeja-sas
UUID : 596f04dd:cc136fda:907e686f:aca85f28
Events : 31628
Number Major Minor RaidDevice State
0 8 128 0 active sync /dev/sdi
1 8 144 1 active sync /dev/sdj
2 8 160 2 active sync /dev/sdk
3 8 176 3 active sync /dev/sdl
4 8 192 4 active sync /dev/sdm
5 8 208 5 active sync /dev/sdn
6 8 224 6 active sync /dev/sdo
7 8 240 7 active sync /dev/sdp
8 65 0 8 active sync /dev/sdq
14 65 96 9 active sync /dev/sdw
10 65 32 10 active sync /dev/sds
11 65 48 11 active sync /dev/sdt
12 65 64 12 active sync /dev/sdu
13 65 80 13 active sync /dev/sdv
15 65 16 - spare /dev/sdr
chuleta_raid_mdadm.txt · Last modified: by etfiat
