Partition

fdisk 沒有顯示我的硬碟驅動器格式正確(但它是)

  • January 16, 2013

我已經設置了 3 個 1TB 驅動器以使用 LVM。這是輸出pvdisplay

 --- Physical volume ---
 PV Name               /dev/sda1
 VG Name               vgpool
 PV Size               931.51 GiB / not usable 728.00 KiB
 Allocatable           yes (but full)
 PE Size               4.00 MiB
 Total PE              238467
 Free PE               0
 Allocated PE          238467
 PV UUID               22ZgJ3-ep7X-flT6-KD1u-fWr1-Q8u9-2V28Ad

 --- Physical volume ---
 PV Name               /dev/sdc1
 VG Name               vgpool
 PV Size               931.51 GiB / not usable 728.00 KiB
 Allocatable           yes (but full)
 PE Size               4.00 MiB
 Total PE              238467
 Free PE               0
 Allocated PE          238467
 PV UUID               3b7vE1-gXPo-Moxm-5F46-vOPb-UpyF-mjo7ad

 --- Physical volume ---
 PV Name               /dev/sdb1
 VG Name               vgpool
 PV Size               931.51 GiB / not usable 728.00 KiB
 Allocatable           yes 
 PE Size               4.00 MiB
 Total PE              238467
 Free PE               774
 Allocated PE          237693
 PV UUID               dFWNtb-WbyA-HSVz-urls-G0Y9-x2W0-jwsoTq

一切看起來都不錯吧?現在,我執行sudo fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
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 identifier: 0x00000000

Disk /dev/sda doesn't contain a valid partition table

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors
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 identifier: 0x2e962a62

  Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  1953525167   976761560   8e  Linux LVM

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors
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 identifier: 0xe95df8a7

  Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  1953525167   976761560   8e  Linux LVM

Disk /dev/mapper/vgpool-lvstuff: 2997.4 GB, 2997362884608 bytes
255 heads, 63 sectors/track, 364408 cylinders, total 5854224384 sectors
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 identifier: 0x00000000

Disk /dev/mapper/vgpool-lvstuff doesn't contain a valid partition table

我擔心的是,儘管我將每個驅動器正確格式化為fdiskLVM ( ) sda,但仍然沒有有效的分區。8e這是我第一次玩 LVM 所以我做錯了嗎?


lshal:

 block.device = '/dev/sda'  (string)
 block.is_volume = false  (bool)
 block.major = 8  (0x8)  (int)
 block.minor = 0  (0x0)  (int)
 block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_WDC_WD10EARS_00Y5B1_WD_WCAV5C337141'  (string)
 info.capabilities = {'storage', 'block'} (string list)
 info.category = 'storage'  (string)
 info.parent = '/org/freedesktop/Hal/devices/pci_8086_3b22_scsi_host_scsi_device_lun0'  (string)
 info.product = 'WDC WD10EARS-00Y'  (string)
 info.udi = '/org/freedesktop/Hal/devices/storage_serial_WDC_WD10EARS_00Y5B1_WD_WCAV5C337141'  (string)
 info.vendor = 'ATA'  (string)
 linux.hotplug_type = 3  (0x3)  (int)
 linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda'  (string)
 storage.automount_enabled_hint = true  (bool)
 storage.bus = 'pci'  (string)
 storage.drive_type = 'disk'  (string)
 storage.firmware_version = '80.00A08'  (string)
 storage.hotpluggable = false  (bool)
 storage.lun = 0  (0x0)  (int)
 storage.media_check_enabled = false  (bool)
 storage.model = 'WDC WD10EARS-00Y'  (string)
 storage.no_partitions_hint = false  (bool)
 storage.originating_device = '/org/freedesktop/Hal/devices/computer'  (string)
 storage.removable = false  (bool)
 storage.removable.media_available = true  (bool)
 storage.removable.media_size = 1000204886016  (0xe8e0db6000)  (uint64)
 storage.requires_eject = false  (bool)
 storage.serial = 'WDC_WD10EARS-00Y5B1_WD-WCAV5C337141'  (string)
 storage.size = 1000204886016  (0xe8e0db6000)  (uint64)
 storage.vendor = 'ATA'  (string)

看起來分區表/dev/sda被破壞了。你沒有提到你做了什麼來摧毀它,所以很難確切地說你將如何重建它。

  • 您可以嘗試使用fdisk來重新創建sda1分區。

假設三個磁碟的磁碟分區相同,您可以使用與其他兩個驅動器上相同的參數重新創建sda1分區。fdisk /dev/sda1如果正確,這應該使音量再次可見。(之後您可能需要重新啟動。)

  • 如果失敗,您可以嘗試使用 TestDisk 重新創建sda1分區。

這將掃描驅動器並嘗試查找指示磁碟上的內容和位置的元數據,但它可能會給出誤報。你在這裡有點自己。

引用自:https://unix.stackexchange.com/questions/61150