LVM卷损坏,重启后无法安装

LVM卷损坏,重启后无法安装

我使用它创建了一个 LVM 卷指导 我有 2x2TB HDD,总共 4TB(或 3.64TB 可用)。我创建了该卷并重新启动。一切都工作正常。然后我在该卷上复制了1.6TB的数据,重新启动后,该卷无法挂载。这是启动时的输出:

...
[....] Checking file system...fsck from util-linux 2.20.1
/dev/mapper/vgpool-lvstuff: One or more block group descriptor checksums are invalid. FIXED.
/dev/mapper/vgpool-lvstuff: Group descriptor 24704 checksum is 0x4357, should be 0x0228.

/dev/mapper/vgpool-lvstuff: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck died with exit status 4
failed (code 4).
[FAIL] File system check failed. A log is being saved in /var/log/fsck/checkfs if that location is writeable. Please repair the file system manually. ... failed!
[warn] A maintenance shell will now be started. CONTROL-D will terminatethis shell and resume system boot. ... (warning).
Give root password for maintenance (or type Control-D to continue):

这种情况我已经发生过三次了,但我找不到问题所在。我上次已经尝试过 fsck -y 但它不断修复和修复块,最后数据全部丢失。

这是/var/log/fsck/checkfs的内容:

    Log of fsck -C -R -A -a
Sun Nov 16 20:18:36 2014

fsck from util-linux 2.20.1
/dev/mapper/vgpool-lvstuff: One or more block group descriptor checksums are in$
/dev/mapper/vgpool-lvstuff: Group descriptor 24704 checksum is 0x4357, should b$

/dev/mapper/vgpool-lvstuff: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)
fsck died with exit status 4

Sun Nov 16 20:18:36 2014
----------------

在复制数据和重新启动之间,硬盘驱动器工作正常。读/写速度很好,我打开的所有文件都没有问题。我不认为这是硬件问题。我可以做些什么来恢复 LVM 卷吗?
我应该指定我正在运行 Debian 7。

命令输出fdisk -l /dev/sd[ab]:

root@nas-debian:~# fdisk -l /dev/sd[ab]

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000deed2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  3907029167  1953513560   8e  Linux LVM

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 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: 0x5dc840bf

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  3907029167  1953513560   8e  Linux LVM

smartctl -A /dev/sda

root@nas-debian:~# smartctl -A /dev/sda
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-4-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   113   099   006    Pre-fail  Always       -       55599712
  3 Spin_Up_Time            0x0003   093   091   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   096   096   020    Old_age   Always       -       4866
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   066   060   030    Pre-fail  Always       -       4984356
  9 Power_On_Hours          0x0032   093   093   000    Old_age   Always       -       6737
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       29
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   063   043   045    Old_age   Always   In_the_past 37 (1 97 37 33)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       11
193 Load_Cycle_Count        0x0032   098   098   000    Old_age   Always       -       4866
194 Temperature_Celsius     0x0022   037   057   000    Old_age   Always       -       37 (0 19 0 0)
195 Hardware_ECC_Recovered  0x001a   021   003   000    Old_age   Always       -       55599712
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       144877836830620
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       2043681280
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       4265209040

smartctl -A /dev/sdb

root@nas-debian:~# smartctl -A /dev/sdb
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-4-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   187   187   051    Pre-fail  Always       -       3744
  3 Spin_Up_Time            0x0027   168   163   021    Pre-fail  Always       -       6591
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       219
  5 Reallocated_Sector_Ct   0x0033   178   178   140    Pre-fail  Always       -       421
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   081   081   000    Old_age   Always       -       13981
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       92
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       63
193 Load_Cycle_Count        0x0032   117   117   000    Old_age   Always       -       250860
194 Temperature_Celsius     0x0022   111   098   000    Old_age   Always       -       39
196 Reallocated_Event_Count 0x0032   001   001   000    Old_age   Always       -       400
197 Current_Pending_Sector  0x0032   196   196   000    Old_age   Always       -       1418
198 Offline_Uncorrectable   0x0030   200   198   000    Old_age   Offline      -       4
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   197   001   000    Old_age   Offline      -       1023

df-h

root@nas-debian:~# df -h
Filesystem                                              Size  Used Avail Use% Mounted on
rootfs                                                   57G   14G   41G  25% /
udev                                                     10M     0   10M   0% /dev
tmpfs                                                   797M  1.8M  795M   1% /run
/dev/disk/by-uuid/df7e64db-f3a7-40da-88ec-1f63dfa8b699   57G   14G   41G  25% /
tmpfs                                                   5.0M     0  5.0M   0% /run/lock
tmpfs                                                   2.1G  236K  2.1G   1% /run/shm

光伏发电

root@nas-debian:~# pvs
  PV         VG     Fmt  Attr PSize PFree
  /dev/sda1  vgpool lvm2 a--  1.82t    0
  /dev/sdb1  vgpool lvm2 a--  1.82t    0

VGG

root@nas-debian:~# vgs
  VG     #PV #LV #SN Attr   VSize VFree
  vgpool   2   1   0 wz--n- 3.64t    0

LVS

root@nas-debian:~# lvs
  LV      VG     Attr     LSize Pool Origin Data%  Move Log Copy%  Convert
  lvstuff vgpool -wi-a--- 3.64t

答案1

您的 /dev/sdb 显然已损坏(有大量重新分配和待处理的坏扇区)。你需要更换它。

相关内容