次のコマンドを使用して、SSHを介して外部システムからダンプされたRAWパーティションをダンプしました。
ssh [email protected] 'dd if=/dev/xvda2 bs=1M | gzip' | gunzip | dd of=xvda2.raw
ご覧のとおり、パーティションのみがダンプされます/dev/xvda2
(例えば、意図的なものです)。これは、システムの起動に重要なすべてのデータを含む/パーティションであり、サーバー全体が他のパーティションと一緒にあるため、パーティションのみが必要なためです。約1TBのストレージパーティションなので、まずルートパーティションを移動してサーバーを起動し、残りのデータを再同期する必要があります。
次に、パーティションを回復しようとしています。
- xvda2.raw ダンプよりわずかに大きい新しいディスクが一時システムに作成されます。私の場合は50GBなので、私が作成したディスクは52GBです。
- 元のパーティションと同じディスクにext4でフォーマットされた新しいパーティションを作成します。
- コンテンツをもう一度追加してください。
dd if=xvda2.raw of=/dev/sde1 bs=1M conv=notrunc,noerror,sync
確認するためにインストールしようとすると、次のエラーが発生します。
# mount /dev/sde1 /mnt/temp/
mount: /dev/sde1: can't read superblock
私が犯すことができる間違いについて提案してもらえますか?
後ろの話
通常、ディスク全体を複製します。ただし、この場合はソースシステムが非常に大きいため、ルートドライブを複製し、そのように新しいシステムを起動し、別のストレージパーティションの内容を再同期する方法が使用されます。私の場合、/パーティションにサーバーに関するすべてが含まれているので、これがうまくいくと思います。
編集:アドバイスありがとうございます。パーティションのマウント後に失敗し、以下にありますdmesg
。
[ 3530.757481] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587756: comm mount: lblock 30700 mapped to illegal pblock (length 1)
[ 3530.768332] jbd2_journal_bmap: journal block not found at offset 30700 on sde1-8
[ 3530.768334] JBD2: bad block at offset 30700
[ 3530.768336] JBD2: IO error -5 recovering block 30700 in log
[ 3530.768339] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587757: comm mount: lblock 30701 mapped to illegal pblock (length 1)
[ 3530.776409] jbd2_journal_bmap: journal block not found at offset 30701 on sde1-8
[ 3530.776411] JBD2: bad block at offset 30701
[ 3530.776412] JBD2: IO error -5 recovering block 30701 in log
[ 3530.776415] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587758: comm mount: lblock 30702 mapped to illegal pblock (length 1)
[ 3530.790785] jbd2_journal_bmap: journal block not found at offset 30702 on sde1-8
[ 3530.790788] JBD2: bad block at offset 30702
[ 3530.790789] JBD2: IO error -5 recovering block 30702 in log
[ 3530.790793] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587759: comm mount: lblock 30703 mapped to illegal pblock (length 1)
[ 3530.802422] jbd2_journal_bmap: journal block not found at offset 30703 on sde1-8
[ 3530.802425] JBD2: bad block at offset 30703
[ 3530.802426] JBD2: IO error -5 recovering block 30703 in log
[ 3530.802430] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587760: comm mount: lblock 30704 mapped to illegal pblock (length 1)
[ 3530.804867] jbd2_journal_bmap: journal block not found at offset 30704 on sde1-8
[ 3530.804869] JBD2: bad block at offset 30704
[ 3530.804870] JBD2: IO error -5 recovering block 30704 in log
[ 3530.804873] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587761: comm mount: lblock 30705 mapped to illegal pblock (length 1)
[ 3530.805166] jbd2_journal_bmap: journal block not found at offset 30705 on sde1-8
[ 3530.805167] JBD2: bad block at offset 30705
[ 3530.805168] JBD2: IO error -5 recovering block 30705 in log
[ 3530.805170] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587762: comm mount: lblock 30706 mapped to illegal pblock (length 1)
[ 3530.805467] jbd2_journal_bmap: journal block not found at offset 30706 on sde1-8
[ 3530.805468] JBD2: bad block at offset 30706
[ 3530.805469] JBD2: IO error -5 recovering block 30706 in log
[ 3530.805471] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587763: comm mount: lblock 30707 mapped to illegal pblock (length 1)
[ 3530.805980] jbd2_journal_bmap: journal block not found at offset 30707 on sde1-8
[ 3530.805981] JBD2: bad block at offset 30707
[ 3530.805982] JBD2: IO error -5 recovering block 30707 in log
[ 3530.805984] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587764: comm mount: lblock 30708 mapped to illegal pblock (length 1)
[ 3530.806322] jbd2_journal_bmap: journal block not found at offset 30708 on sde1-8
[ 3530.806324] JBD2: bad block at offset 30708
[ 3530.806325] JBD2: IO error -5 recovering block 30708 in log
[ 3530.806327] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587765: comm mount: lblock 30709 mapped to illegal pblock (length 1)
[ 3530.806644] jbd2_journal_bmap: journal block not found at offset 30709 on sde1-8
[ 3530.806645] JBD2: bad block at offset 30709
[ 3530.820916] JBD2: recovery failed
[ 3530.820919] EXT4-fs (sde1): error loading journal
[ 4016.957490] EXT4-fs (sde1): mounted filesystem with ordered data mode. Opts: (null)
[ 8947.062786] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587756: comm mount: lblock 30700 mapped to illegal pblock (length 1)
[ 8947.063597] jbd2_journal_bmap: journal block not found at offset 30700 on sde1-8
[ 8947.063599] JBD2: bad block at offset 30700
[ 8947.063600] JBD2: IO error -5 recovering block 30700 in log
[ 8947.063602] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587757: comm mount: lblock 30701 mapped to illegal pblock (length 1)
[ 8947.064111] jbd2_journal_bmap: journal block not found at offset 30701 on sde1-8
[ 8947.064113] JBD2: bad block at offset 30701
[ 8947.064114] JBD2: IO error -5 recovering block 30701 in log
[ 8947.064116] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587758: comm mount: lblock 30702 mapped to illegal pblock (length 1)
[ 8947.064540] jbd2_journal_bmap: journal block not found at offset 30702 on sde1-8
[ 8947.064541] JBD2: bad block at offset 30702
[ 8947.064542] JBD2: IO error -5 recovering block 30702 in log
[ 8947.064544] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587759: comm mount: lblock 30703 mapped to illegal pblock (length 1)
[ 8947.064960] jbd2_journal_bmap: journal block not found at offset 30703 on sde1-8
[ 8947.064961] JBD2: bad block at offset 30703
[ 8947.064962] JBD2: IO error -5 recovering block 30703 in log
[ 8947.064964] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587760: comm mount: lblock 30704 mapped to illegal pblock (length 1)
[ 8947.065338] jbd2_journal_bmap: journal block not found at offset 30704 on sde1-8
[ 8947.065340] JBD2: bad block at offset 30704
[ 8947.065340] JBD2: IO error -5 recovering block 30704 in log
[ 8947.065342] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587761: comm mount: lblock 30705 mapped to illegal pblock (length 1)
[ 8947.066019] jbd2_journal_bmap: journal block not found at offset 30705 on sde1-8
[ 8947.066020] JBD2: bad block at offset 30705
[ 8947.066021] JBD2: IO error -5 recovering block 30705 in log
[ 8947.066023] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587762: comm mount: lblock 30706 mapped to illegal pblock (length 1)
[ 8947.080135] jbd2_journal_bmap: journal block not found at offset 30706 on sde1-8
[ 8947.080138] JBD2: bad block at offset 30706
[ 8947.080139] JBD2: IO error -5 recovering block 30706 in log
[ 8947.080142] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587763: comm mount: lblock 30707 mapped to illegal pblock (length 1)
[ 8947.088046] jbd2_journal_bmap: journal block not found at offset 30707 on sde1-8
[ 8947.088049] JBD2: bad block at offset 30707
[ 8947.088051] JBD2: IO error -5 recovering block 30707 in log
[ 8947.088054] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587764: comm mount: lblock 30708 mapped to illegal pblock (length 1)
[ 8947.088677] jbd2_journal_bmap: journal block not found at offset 30708 on sde1-8
[ 8947.088679] JBD2: bad block at offset 30708
[ 8947.088680] JBD2: IO error -5 recovering block 30708 in log
[ 8947.088683] EXT4-fs error (device sde1): ext4_map_blocks:581: inode #8: block 587765: comm mount: lblock 30709 mapped to illegal pblock (length 1)
[ 8947.089133] jbd2_journal_bmap: journal block not found at offset 30709 on sde1-8
[ 8947.089134] JBD2: bad block at offset 30709
[ 8947.104770] JBD2: recovery failed
[ 8947.104773] EXT4-fs (sde1): error loading journal