Centos

RAID/LVM 配置上的外部驅動器

  • December 4, 2015

我有 2 個驅動器損壞,現在用 RAID 0 上的新驅動器替換。安裝新驅動器後,我通過 USB 連接了 2 個損壞的舊驅動器以從中檢索數據。這 2 個驅動器是建構 RAID 0 並使用 LVM,伺服器現在可以辨識這兩個驅動器但 ind

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5527e79b
Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      121470   975698944   8e  Linux LVM

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1f0bbe1f
Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       60802   488383488    7  HPFS/NTFS

我正在嘗試安裝驅動器,但它不工作

mount /dev/sdc1 /mnt/sdc1 -t ntfs
NTFS signature is missing.
Failed to mount '/dev/sdc1': Invalid argument
The device '/dev/sdc1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

mount /dev/sdd1 /mnt/sdd1
mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail  or so

dmesg | tail -l
EXT4-fs (sdd1): bad geometry: block count 157286400 exceeds size of device (122096390 blocks)

有沒有辦法安裝這兩個驅動器而不會失去數據並覆蓋 RAID 或 LVM 配置?

我找到了這個例子:https ://unix.stackexchange.com/questions/115698/fix-ext4-fs-bad-geometry-block-count-exceeds-size-of-device

sfdisk -d /dev/sdx >sdx.txt
cat sdx.txt
sfdisk /dev/sdx <sdx.txt

這會有幫助嗎?

我的輸出是

# partition table of /dev/sdd
unit: sectors
/dev/sdd1 : start=     2048, size=1951397888, Id=8e
/dev/sdd2 : start=        0, size=        0, Id= 0
/dev/sdd3 : start=        0, size=        0, Id= 0
/dev/sdd4 : start=        0, size=        0, Id= 0

RAID0 不是 RAID…(意味著不是冗餘的)RAID0 只是一種使用兩個磁碟來大幅提高性能的方法。但是,它不允許您從故障驅動器中恢復。如果其中一個或兩個都已損壞…在修復損壞之前(如果可能),您可能無法安裝它們。如果您能夠從磁碟讀取…您可以嘗試使用 mdadm 實用程序手動重新組裝 RAID。

引用自:https://serverfault.com/questions/740705