作業系統:Debian Squeeze 核心:2.6.32-5-amd64 mdadm 版本:3.1.4(2010 年 8 月 31 日)
mdarrays
md1 = raid1 (this is working) (devices: /dev/sd[fg]1)
md0 = raid6 (previously raid5, now failing to start) (devices: /dev/sd[abcde]1)
描述:我有一個4 磁碟raid 5,我決定將其轉換為6 磁碟raid 6。 。磁碟被移除並繼續重塑,我在重塑時發生了三次電源故障,但每次通電後,重塑仍在繼續。重塑完成,但一個磁碟被“刪除”,例如沒有向作業系統報告其版本(顯示為未知型號)。
在這個階段,raid6 有兩個遺失的磁碟,陣列可以運行(我仍在等待替換磁碟,因此我缺少一個磁碟來完成陣列)。
我決定關閉機器電源並再次啟動,看看遺失的磁碟是否再次出現。它做到了,但陣列無法組裝,並出現以下錯誤:
madm --assemble /dev/md0
mdadm: superblock on /dev/sdd1 doesn't match others - assembly aborted
我還嘗試使用 mdadm --assemble --force /dev/md0 但出現完全相同的錯誤。
現在我嘗試了這個:
mdadm --verbose --assemble /dev/md0
mdadm: looking for devices for /dev/md0
mdadm: cannot open device /dev/md/1: Device or resource busy
mdadm: /dev/md/1 has wrong uuid.
mdadm: cannot open device /dev/sdg1: Device or resource busy
mdadm: /dev/sdg1 has wrong uuid.
mdadm: cannot open device /dev/sdg: Device or resource busy
mdadm: /dev/sdg has wrong uuid.
mdadm: cannot open device /dev/sdf2: Device or resource busy
mdadm: /dev/sdf2 has wrong uuid.
mdadm: cannot open device /dev/sdf1: Device or resource busy
mdadm: /dev/sdf1 has wrong uuid.
mdadm: cannot open device /dev/sdf: Device or resource busy
mdadm: /dev/sdf has wrong uuid.
mdadm: no RAID superblock on /dev/sde2
mdadm: /dev/sde2 has wrong uuid.
mdadm: no RAID superblock on /dev/sde
mdadm: /dev/sde has wrong uuid.
mdadm: cannot open device /dev/sdd2: Device or resource busy
mdadm: /dev/sdd2 has wrong uuid.
mdadm: superblock on /dev/sdd1 doesn't match others - assembly aborted
mdadm -Esvvv 的輸出也是:
mdadm -Esvvv
mdadm: No md superblock detected on /dev/md/1.
/dev/sdg1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : b7433980:f3a086eb:7f8f8a15:093b5909
Name : cell01:1 (local to host cell01)
Creation Time : Sun Apr 8 15:30:47 2012
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 1681342464 (801.73 GiB 860.85 GB)
Array Size : 1681342192 (801.73 GiB 860.85 GB)
Used Dev Size : 1681342192 (801.73 GiB 860.85 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 74d30246:840a1947:b4eeecc1:0dd95b2a
Update Time : Fri Aug 24 00:06:16 2012
Checksum : b302004f - correct
Events : 244
Device Role : Active device 1
Array State : AA ('A' == active, '.' == missing)
mdadm: No md superblock detected on /dev/sdg.
/dev/sdf2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : b7433980:f3a086eb:7f8f8a15:093b5909
Name : cell01:1 (local to host cell01)
Creation Time : Sun Apr 8 15:30:47 2012
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 1681342464 (801.73 GiB 860.85 GB)
Array Size : 1681342192 (801.73 GiB 860.85 GB)
Used Dev Size : 1681342192 (801.73 GiB 860.85 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 5847c4e4:319a9c6e:353f67c8:765e4b47
Update Time : Fri Aug 24 00:06:16 2012
Checksum : 9cb0d9ca - correct
Events : 244
Device Role : Active device 0
Array State : AA ('A' == active, '.' == missing)
mdadm: No md superblock detected on /dev/sdf1.
mdadm: No md superblock detected on /dev/sdf.
mdadm: No md superblock detected on /dev/sde2.
/dev/sde1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 5343f9b9:ccb86e50:33ed2a4b:d494c7dc
Name : cell01:0 (local to host cell01)
Creation Time : Sat Jul 2 11:22:04 2011
Raid Level : raid6
Raid Devices : 6
Avail Dev Size : 3904927744 (1862.01 GiB 1999.32 GB)
Array Size : 15619706880 (7448.06 GiB 7997.29 GB)
Used Dev Size : 3904926720 (1862.01 GiB 1999.32 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : d13f32aa:7da122d9:77ba06f0:bc57d063
Update Time : Thu Aug 23 22:15:58 2012
Checksum : 6212fa6e - correct
Events : 134404
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 5
Array State : AA.A.A ('A' == active, '.' == missing)
mdadm: No md superblock detected on /dev/sde.
mdadm: No md superblock detected on /dev/sdd2.
/dev/sdd1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x4
Array UUID : 5343f9b9:ccb86e50:33ed2a4b:d494c7dc
Name : cell01:0 (local to host cell01)
Creation Time : Sat Jul 2 11:22:04 2011
Raid Level : raid6
Raid Devices : 6
Avail Dev Size : 3904927744 (1862.01 GiB 1999.32 GB)
Array Size : 15619706880 (7448.06 GiB 7997.29 GB)
Used Dev Size : 3904926720 (1862.01 GiB 1999.32 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 3d05a6b3:3a05d5bc:fc1d01a6:10c055eb
Reshape pos'n : 7732852736 (7374.62 GiB 7918.44 GB)
Delta Devices : 1 (5->6)
New Layout : left-symmetric
Update Time : Thu Aug 23 09:48:17 2012
Checksum : 83a30996 - correct
Events : 134174
Layout : left-symmetric-6
Chunk Size : 512K
Device Role : Active device 2
Array State : AAAA.A ('A' == active, '.' == missing)
mdadm: No md superblock detected on /dev/sdd.
mdadm: No md superblock detected on /dev/sda2.
/dev/sda1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 5343f9b9:ccb86e50:33ed2a4b:d494c7dc
Name : cell01:0 (local to host cell01)
Creation Time : Sat Jul 2 11:22:04 2011
Raid Level : raid6
Raid Devices : 6
Avail Dev Size : 3904927744 (1862.01 GiB 1999.32 GB)
Array Size : 15619706880 (7448.06 GiB 7997.29 GB)
Used Dev Size : 3904926720 (1862.01 GiB 1999.32 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : c66da6b9:aa010cbc:8e4ab376:7a623f21
Update Time : Thu Aug 23 22:15:58 2012
Checksum : 988b9d9b - correct
Events : 134404
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 3
Array State : AA.A.A ('A' == active, '.' == missing)
mdadm: No md superblock detected on /dev/sda.
mdadm: No md superblock detected on /dev/sdc2.
/dev/sdc1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 5343f9b9:ccb86e50:33ed2a4b:d494c7dc
Name : cell01:0 (local to host cell01)
Creation Time : Sat Jul 2 11:22:04 2011
Raid Level : raid6
Raid Devices : 6
Avail Dev Size : 3904927744 (1862.01 GiB 1999.32 GB)
Array Size : 15619706880 (7448.06 GiB 7997.29 GB)
Used Dev Size : 3904926720 (1862.01 GiB 1999.32 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : e7afc574:abca367c:ebb58fe5:c4961cb7
Update Time : Thu Aug 23 22:15:58 2012
Checksum : 188fd371 - correct
Events : 134404
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 0
Array State : AA.A.A ('A' == active, '.' == missing)
mdadm: No md superblock detected on /dev/sdc.
mdadm: No md superblock detected on /dev/sdb2.
/dev/sdb1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 5343f9b9:ccb86e50:33ed2a4b:d494c7dc
Name : cell01:0 (local to host cell01)
Creation Time : Sat Jul 2 11:22:04 2011
Raid Level : raid6
Raid Devices : 6
Avail Dev Size : 3904927744 (1862.01 GiB 1999.32 GB)
Array Size : 15619706880 (7448.06 GiB 7997.29 GB)
Used Dev Size : 3904926720 (1862.01 GiB 1999.32 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : fb3a88de:834f2bc0:452db777:48ef3b21
Update Time : Thu Aug 23 22:15:58 2012
Checksum : c28d282b - correct
Events : 134404
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 1
Array State : AA.A.A ('A' == active, '.' == missing)
mdadm: No md superblock detected on /dev/sdb.
我能看到的唯一區別是,對於不匹配的磁碟,特徵圖設置為 0x4,其他設置為 0x0。陣列的 UUID 在所有磁碟上都相同。
我非常確定資料仍然存在,我很想嘗試將 /dev/sdd1 的超級區塊歸零並將其重新添加到陣列中,因為我假設該陣列應該在缺少兩個磁碟的情況下工作。然而,由於我沒有備份(是的,我知道這很愚蠢)並且資料對我來說很重要(我選擇 raid6 的原因),我想嘗試絕對最安全的恢復陣列的方法。
我也在考慮升級到 Debian wheezy,因為它有更新的 mdadm,但我更願意保持穩定的 Debian 直到 wheezy 發布。
正如您可以想像的那樣,這非常可怕,我不想丟失我的數據,因此如果有知識和經驗的人可以指導我下一步該怎麼做,我將不勝感激。
答案1
解決方案出奇的簡單
mdadm --assemble /dev/md0 /dev/sd1 /dev/sdb1 /dev/sdc1 /dev/sde1
然後
mdadm --add /dev/md0 /dev/sdd1
襲擊現在正在恢復!