昨日、サーバーからCentOS 8サーバーをアップグレードしました。
Raid 1、2ディスクの設定
に
mdadmを使用したRaid 5および4ディスクの設定
ただし、アップグレードの最後のステップの後、次のことが行われます。
mdadm --grow /dev/md/pv00 -n 4
そして数回の検査を経てから一定時間がかかります。
猫/proc/mdstat
Raid 5設定進行状況(約4/5%)
停電:(
電源を入れ直すと、CentOS 8 は長い時間が経過しても緊急モードに移行しない限り起動しなくなります。
与えられたエラー:
md:レベル5の性格がロードされていません。
無効なRAIDレベルの問題が発生したため、このパニックモードではmdadmでRAIDを組み立てることはできません。
dracut緊急モードを終了しようとすると、次のようになります。
多くのインターネット検索の最後に、ついにUbuntu 21.04ライブブータブルUSBを作成したので、より多くの情報を見ることができます。
その結果、最終的にUbuntu環境で4つのドライブを再びmdadmに組み立てることができ、その後raidシステム自体が回復し、Raid5プロセスを継続し始めました。
最後に数時間後にすべての作業が完了し、Raidシステムに個々のボリュームをマウントし、すべてが正常で完全であることを確認した後、再起動しました。
同じ質問..
FedoraCoreワークステーションのライブブートUSBを使用して同じことを試してみましたが、再度raid5ディスクをマウントすることができました。
その後、CentOS回復モードに入り、Grubでこのモードを選択しましたが、Raid5 4ディスクは通常インターネットにアクセスできました!非常に奇妙な
/ bootをインストールできないというエラーが1つだけ表示されます(回復モードのため見つからないようですが、これは正常ですか?)編集:これは正常ではありません! /boot を手動でマウントしようとすると、次のエラーが発生します。
マウント /dev/sda1 /boot
mount: /boot: unknown filesystem type 'ext4'.
lsmodは、ext4がロードされていないことを示します。
ただし、ボリュームは正常に表示され、cat /proc/mdstatは正常なアクティビティ情報を出力します。
インターネット検索の結果、起動imgをいくつか回復する必要があるかもしれませんが、回復モードで/ bootをマウントする方法がわかりません。
したがって、デフォルトでは、私のOSは通常モードで起動しませんが、Raidディスクは正常に動作しているようです。
私は/etc/mdadm.confファイルを手動で編集しようとしましたが、再起動しても機能せず、オンラインでこれがアセンブリポイントであることがわかりました。
助けてくれてありがとう!
詳細
CentOS Linux バージョン 8.4.2105
カーネルバージョン: 4.18.0-305.7.1
Fedora Workstation Live 34では:
猫/proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid0] [raid1]
md127 : active raid5 sdc[2] sdd[3] sdb1[1] sda2[0]
2926740480 blocks super 1.2 level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
bitmap: 0/8 pages [0KB], 65536KB chunk
unused devices: <none>
無駄なディスク/ボリュームなし:
fdisk -l
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000NM0033-9ZM
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd393f4b7
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2099199 2097152 1G 83 Linux
/dev/sda2 2099200 1953523711 1951424512 930.5G fd Linux raid autodetect
Disk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000NM0033-9ZM
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf0f126b5
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1951426559 1951424512 930.5G fd Linux raid autodetect
Disk /dev/sdc: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000NM0033-9ZM
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdd: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000NM0033-9ZM
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md127: 2.73 TiB, 2996982251520 bytes, 5853480960 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 196608 bytes
confがデバイスレベルと数の変更をキャッチすることを望んでARRAYをコメントアウトしましたが、いいえ、RAIDインストールのルートボリュームは次のとおりです。
catmdadm.conf
# mdadm.conf written out by anaconda
MAILADDR root
AUTO +imsm +1.x -all
#ARRAY /dev/md/pv00 level=raid1 num-devices=2 UUID=5b729889:1b231f26:6806a14c:71abe309
ARRAY /dev/md/pv00 level=raid5 num-devices=4 UUID=5b729889:1b231f26:6806a14c:71abe309
太陽電池ディスプレイ
--- Physical volume ---
PV Name /dev/md127
VG Name cl_nas
PV Size <930.39 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 238178
Free PE 0
Allocated PE 238178
PV UUID RpepyF-BxMl-9BZT-Sebw-otBV-HLCq-7XSGWX
グラフィックディスプレイ
--- Volume group ---
VG Name cl_nas
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 930.38 GiB
PE Size 4.00 MiB
Total PE 238178
Alloc PE / Size 238178 / 930.38 GiB
Free PE / Size 0 / 0
VG UUID NrW8lm-Xi70-hP73-Auis-wLVy-beHq-85TWZM
LVディスプレイ
--- Logical volume ---
LV Path /dev/cl_nas/home
LV Name home
VG Name cl_nas
LV UUID VXGWg5-MnHI-1yg8-5rez-1tIa-Aa2f-s0h2K3
LV Write Access read/write
LV Creation host, time nas.localdomain, 2020-10-28 10:45:39 +0100
LV Status available
# open 1
LV Size <892.51 GiB
Current LE 228482
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 768
Block device 253:2
--- Logical volume ---
LV Path /dev/cl_nas/swap
LV Name swap
VG Name cl_nas
LV UUID 49Aech-0lGd-TbVx-2Hy7-n18b-EG75-4tOBhd
LV Write Access read/write
LV Creation host, time nas.localdomain, 2020-10-28 10:45:46 +0100
LV Status available
# open 0
LV Size <7.88 GiB
Current LE 2016
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 768
Block device 253:3
--- Logical volume ---
LV Path /dev/cl_nas/root
LV Name root
VG Name cl_nas
LV UUID V5WLBp-lvkd-aGT4-isoE-U8UH-ehqG-i37BmE
LV Write Access read/write
LV Creation host, time nas.localdomain, 2020-10-28 10:45:47 +0100
LV Status available
# open 1
LV Size 30.00 GiB
Current LE 7680
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 768
Block device 253:4
(フラッシュドライブなし/dev/sde)
mdadm --/dev/sd 確認*
/dev/sda:
MBR Magic : aa55
Partition[0] : 2097152 sectors at 2048 (type 83)
Partition[1] : 1951424512 sectors at 2099200 (type fd)
mdadm: No md superblock detected on /dev/sda1.
/dev/sda2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : 5b729889:1b231f26:6806a14c:71abe309
Name : nas.localdomain:pv00
Creation Time : Wed Oct 28 10:45:31 2020
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 1951160704 (930.39 GiB 998.99 GB)
Array Size : 2926740480 (2791.16 GiB 2996.98 GB)
Used Dev Size : 1951160320 (930.39 GiB 998.99 GB)
Data Offset : 263808 sectors
Super Offset : 8 sectors
Unused Space : before=263728 sectors, after=384 sectors
State : clean
Device UUID : 33ff95f7:95ae0fb4:bf45c073:0e248f5f
Internal Bitmap : 8 sectors from superblock
Update Time : Fri Jul 9 21:45:11 2021
Bad Block Log : 512 entries available at offset 16 sectors
Checksum : 9c0e4536 - correct
Events : 19835
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 0
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdb:
MBR Magic : aa55
Partition[0] : 1951424512 sectors at 2048 (type fd)
/dev/sdb1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : 5b729889:1b231f26:6806a14c:71abe309
Name : nas.localdomain:pv00
Creation Time : Wed Oct 28 10:45:31 2020
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 1951160704 (930.39 GiB 998.99 GB)
Array Size : 2926740480 (2791.16 GiB 2996.98 GB)
Used Dev Size : 1951160320 (930.39 GiB 998.99 GB)
Data Offset : 263808 sectors
Super Offset : 8 sectors
Unused Space : before=263728 sectors, after=384 sectors
State : clean
Device UUID : 5c027c56:0b6e4a5c:26a56c03:5dfb6c53
Internal Bitmap : 8 sectors from superblock
Update Time : Fri Jul 9 21:45:11 2021
Bad Block Log : 512 entries available at offset 16 sectors
Checksum : 26b93e8b - correct
Events : 19835
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 1
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : 5b729889:1b231f26:6806a14c:71abe309
Name : nas.localdomain:pv00
Creation Time : Wed Oct 28 10:45:31 2020
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 1953261360 (931.39 GiB 1000.07 GB)
Array Size : 2926740480 (2791.16 GiB 2996.98 GB)
Used Dev Size : 1951160320 (930.39 GiB 998.99 GB)
Data Offset : 263808 sectors
Super Offset : 8 sectors
Unused Space : before=263728 sectors, after=2101040 sectors
State : clean
Device UUID : 1e731fa9:febb6375:f9f05cec:8dd1c8e5
Internal Bitmap : 8 sectors from superblock
Update Time : Fri Jul 9 21:45:11 2021
Bad Block Log : 512 entries available at offset 16 sectors
Checksum : de22cf6 - correct
Events : 19835
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 3
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdd:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : 5b729889:1b231f26:6806a14c:71abe309
Name : nas.localdomain:pv00
Creation Time : Wed Oct 28 10:45:31 2020
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 1953261360 (931.39 GiB 1000.07 GB)
Array Size : 2926740480 (2791.16 GiB 2996.98 GB)
Used Dev Size : 1951160320 (930.39 GiB 998.99 GB)
Data Offset : 263808 sectors
Super Offset : 8 sectors
Unused Space : before=263728 sectors, after=2101040 sectors
State : clean
Device UUID : 54ceea17:4b06f020:5a287029:9f7928dd
Internal Bitmap : 8 sectors from superblock
Update Time : Fri Jul 9 21:45:11 2021
Bad Block Log : 512 entries available at offset 16 sectors
Checksum : 5cacb1eb - correct
Events : 19835
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 2
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
ベストアンサー1
最終的に、トリックは次のように動作します。
起動ボリュームと同じカーネルをロードできるように、起動可能なCentOS 8 USBを作成しました。
次に、実行してトラブルシューティング - >構造に移動します。
私はドライブ/ボリュームを自動マウント/検出せずにシェルに入りました。
そこで使用
mdadm --assemble --scan -v
Raidシステムをロードしてから、以下に説明するようにファイルシステムのマウントを開始できました。
https://wiki.centos.org/TipsAndTricks/CreateNewInitrd
まず、Raidから/mnt/sysimageにルートをロードし、ext4ディスクから/mnt/sysimage/bootとして起動し、Webサイトに記載されている他の内容に従い、最後にホームを/mnt/sysimage/homeにインストールします。
その後、上記のようにchrootを再入力しました。
そこから boot/initramfs*.img をバックアップし、次を使用して新しいファイルを作成します。
起動可能なUSBロードカーネルの場合:
デラクール-Hf
特に私が通常実行している最新のカーネル
dracut -H -f /boot/initramfs(カーネル).img(カーネル)
以下からコマンドを受け取ります。 mdadm raidがインストールされていません。
ついに再起動し、2日間のインターネット検索と欲求不満の終わりに魔法のように再び動作しました:)