パーティションを破壊せずにRAID 1アレイを再作成できますか?

パーティションを破壊せずにRAID 1アレイを再作成できますか?

以前はmdadmを使用してRAID 1アレイを作成しました。ドライブの1つが故障して取り外されました。交換を待っている間、残りのディスクを使い続けたいです。元の配列を作成するために使用したコマンドはありません。

残りの作業ディスクは次のとおりです。

# fdisk -l /dev/sda
Disk /dev/sda: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000VN004-3CP1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: ABC-123-etc

私が知っている限り、分割はありませんが、わかりません。


次のように配列を再作成しようとしています。

# mdadm --create --assume-clean --level=1 --raid-devices=1 /dev/md0 /dev/sda
mdadm: '1' is an unusual number of drives for an array, so it is probably
     a mistake.  If you really mean it you will need to specify --force before
     setting the number of drives.

言葉になりますね!だから試してみてください--force

# mdadm --create --assume-clean --level=1 --raid-devices=1 /dev/md0 /dev/sda --force
mdadm: partition table exists on /dev/sda
mdadm: partition table exists on /dev/sda 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
Continue creating array? n
mdadm: create aborted.

システムは他の物理デバイスから起動します。このアレイは純粋にストレージ用です。

出力tail /etc/mdadm/mdadm.conf

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays

# This configuration was auto-generated on Fri, 17 Feb 2023 17:23:17 +0000 by mkconf
ARRAY /dev/md0 metadata=1.2 name=nas:0 UUID=d9953244:010850f9:e87c43c8:abc3e1f7

cat /proc/mdstatドライブが1つだけ接続されている場合は出力:

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
unused devices: <none>

mdadm --examine --scanルートとして実行すると、出力は生成されません。


1. この単一の物理ディスクからアレイを作成する方法はありますか?

2. 交換用ドライブを受け取った場合、これを 2 ディスク RAID 1 アレイに復元するにはどうすればよいですか。

ベストアンサー1

おすすめ記事