可能我標題說的不是很清楚。當我嘗試使用 mdadm 組裝 raid1 陣列時:
sudo mdadm --assemble /dev/md0 /dev/sdc /dev/sdd
它告訴我
mdadm: Cannot assemble mbr metadata on /dev/sdc
mdadm: /dev/sdc has no superblock - assembly aborted
如果我在命令中重新排序設備:
sudo mdadm --assemble /dev/md0 /dev/sdd /dev/sdc
它告訴同樣的sdd
:
mdadm: Cannot assemble mbr metadata on /dev/sdd
mdadm: /dev/sdd has no superblock - assembly aborted
以下是有關驅動器的一些資訊:
➜ ~ sudo mdadm --misc -E /dev/sdc
/dev/sdc:
MBR Magic : aa55
Partition[0] : 3907029167 sectors at 1 (type ee)
➜ ~ sudo mdadm --misc -E /dev/sdd
/dev/sdd:
MBR Magic : aa55
Partition[0] : 3907029167 sectors at 1 (type ee)
但!當我重新建立數組時
➜ ~ sudo mdadm --create /dev/md0 -n 2 -l 1 /dev/sdc /dev/sdd
mdadm: /dev/sdc appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan 1 07:00:00 1970
mdadm: partition table exists on /dev/sdc but will be lost or
meaningless after creating array
mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
mdadm: /dev/sdd appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan 1 07:00:00 1970
mdadm: partition table exists on /dev/sdd but will be lost or
meaningless after creating array
Continue creating array? yes
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
它沒有創建新數組,而是啟動我的數組!
➜ ~ ls -l /dev/mapper/MisakaMirror-alldata
lrwxrwxrwx 1 root root 7 май 19 01:48 /dev/mapper/MisakaMirror-alldata -> ../dm-2
但我想實現這個目標
mdadm --assemble
自動執行。謝謝。