我将一个外置硬盘(全新)连接到我的服务器,并复制了一堆文件夹/文件。现在,重新连接该硬盘(稍后),由于没有分区,驱动器无法安装。
dmesg | tail
结果:
[ 6500.271248] ready
[ 6500.271437] sd 8:0:0:0: [sdi] Very big device. Trying to use READ CAPACITY(16).
[ 6500.271631] sd 8:0:0:0: [sdi] 9767475200 512-byte logical blocks: (5.00 TB/4.55 TiB)
[ 6500.271634] sd 8:0:0:0: [sdi] 4096-byte physical blocks
[ 6500.271910] sd 8:0:0:0: [sdi] Write Protect is off
[ 6500.271913] sd 8:0:0:0: [sdi] Mode Sense: 47 00 10 08
[ 6500.272119] sd 8:0:0:0: [sdi] No Caching mode page found
[ 6500.272206] sd 8:0:0:0: [sdi] Assuming drive cache: write through
[ 6500.452310] sdi:
[ 6500.453478] sd 8:0:0:0: [sdi] Attached SCSI disk
lsblk /dev/sdi
结果:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdi 8:128 0 4.6T 0 disk
dumpe2fs /dev/sdi
结果:
dumpe2fs 1.44.1 (24-Mar-2018)
dumpe2fs: Bad magic number in super-block while trying to open /dev/sdi
Couldn't find valid filesystem superblock.
Found a gpt partition table in /dev/sdi
mke2fs -n /dev/sdi
结果:
mke2fs 1.44.1 (24-Mar-2018)
Found a gpt partition table in /dev/sdi
Proceed anyway? (y,N) y
Creating filesystem with 1220934400 4k blocks and 152616960 inodes
Filesystem UUID: bef1d7b9-cbb5-4172-ada9-c1100b44a180
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544
我没法修复驱动器并恢复分区。还是说我现在已经彻底丢失了所有数据?欢迎提出任何想法...
答案1
输出mke2fs
显示备份超级块存储在位置 32768 以及位置 98304 及以上。
您可以将其作为参数提供给命令e2fsck
来解决错误:
e2fsck -b 32768 /dev/sdi
要重新挂载,如果您不知道目录,请使用:
cat /etc/fstab | grep -i /dev/sdi
现在您可以挂载并测试分区:
mount /folder
df /folder