/dev/mapper/vg_myserver-lv_home: 予期しない不一致が発生しました。 fsckを手動で実行してください。 (つまり、-aまたは-pオプションなし)ほとんどすべてを試しました。

/dev/mapper/vg_myserver-lv_home: 予期しない不一致が発生しました。 fsckを手動で実行してください。 (つまり、-aまたは-pオプションなし)ほとんどすべてを試しました。

論理ボリュームに問題があります。lv_home中央オペレーティングシステムシステム。このLVのサイズを変更しようとした後50GB、問題が発生したようです。これでファイルシステムの問題が発生しました。

これまでに私が経験して試したことは次のとおりです。 https://askubuntu.com/questions/697190/fsck-error-on-boot-dev-sda6-unexpected-inconsistency-run-fsck-manually

シングルユーザーモードで論理ボリュームにアクセスしようとしましたが、問題は解決されませんでした。

ランdfファイルシステムを確認すると、次の結果が表示されます。

bash
Copy code
Filesystem            1K-blocks       Used Available Use% Mounted on
/dev/mapper/vg_myserver-lv_root 51475068   40286004   8567624  83% /
/dev/sda1                487652      35193    426859   8% /boot
tmpfs                   3940748          0   3940748   0% /dev/shm
Tried using e2fsck with an alternate superblock:

csharp
Copy code
[root@myserver ~]# e2fsck -b 32768 -y /dev/mapper/vg_myserver-lv_home
e2fsck 1.41.12 (17-May-2010)
The filesystem size (according to the superblock) is 43364352 blocks
The physical size of the device is 28311552 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? yes
Also tried with another superblock backup at 98304, but got the same error regarding the inconsistent filesystem size and physical block size.

使用されるmke2fs-n潜在的なバックアップスーパーブロックをリストしましたが、進行していません。e2fsck状況が悪化するのを防ぐためだ。

これらのエラーと失敗したサイズ変更操作があると、スーパーブロック情報が破損したり、サイズ変更操作によってファイルシステムのレコードサイズがディスクの実際のサイズと一致しないように見えます。

似たような問題を抱えた人がいますか、この不一致を解決し、論理ボリュームのファイルシステムを回復する方法についてのヒントを提供できる人はいますか?ありがとうございます。

前のメッセージ:こんにちは。 ym lv_homeは50GBです。誰かがサイズ変更しましたが、うまくいきませんでした。

シングルユーザーモードのすべてに疲れました...役に立たない

どのようなヒントがありますか?見て、また見つけましたが…ありがとうございます…

df
Filesystem            1K-blocks       Used Available Use% Mounted on
/dev/mapper/vg_myserver-lv_root
                       51475068   40286004   8567624  83% /
/dev/sda1                487652      35193    426859   8% /boot
tmpfs                   3940748          0   3940748   0% /dev/shm

**


[root@myserver ~]# e2fsck -b alternate_superblock -y /dev/mapper/vg_myserver-lv_home

Invalid non-numeric argument to -b ("alternate_superblock")

[root@myserver ~]# mke2fs -n /dev/mapper/vg_myserver-lv_home
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
7077888 inodes, 28311552 blocks
1415577 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
864 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

[root@myserver ~]# e2fsck -b 32768 -y /dev/mapper/vg_myserver-lv_home
e2fsck 1.41.12 (17-May-2010)
The filesystem size (according to the superblock) is 43364352 blocks
The physical size of the device is 28311552 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? yes

[root@myserver ~]# e2fsck -b 98304 -y /dev/mapper/vg_myserver-lv_home
e2fsck 1.41.12 (17-May-2010)
The filesystem size (according to the superblock) is 43364352 blocks
The physical size of the device is 28311552 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? yes
**

xxx45は問題のドライブです

ベストアンサー1

CentOSが非常に古いものではない場合は、デフォルトでext2/3/4の代わりにXFSファイルシステムを使用します。すべての使用推奨事項は、ext2/3/4 ファイルシステムタイプにのみe2fsck適用されます。mke2fs -n

論理ボリュームを50 GBから〜28 GBに縮小しようとしましたが、--resizefs使用されていないようですlvreduce。これは、LVを縮小する前にファイルシステムをまったく変更しないため、ファイルシステムの尾がひどく発生したことを意味します。壊す。

現在、XFSファイルシステムを非破壊的に縮小するための本番クラスのツールはありません。 XFSファイルシステムのサイズ変更ツールは次のとおりですxfs_growfs。名前が示すように育つ代わりにファイルシステム収縮それ。

良いバックアップがある場合は、mkfs論理ボリューム(例mkfs.xfs /dev/mapper/vg_myserver-lv_home:)を再作成し、それをマウント(現在空白)してからバックアップからその内容を復元します。

それ以外の場合は、vgcfgrestore縮小操作の前に保存されたVG設定コピーを使用して縮小を元に戻します。/etc/lvm/archive次に、LVをマウントし、バックアップを作成して折りたたみ、mkfs.xfsLVで実行し、それをマウントしてバックアップを復元します。

おすすめ記事