
Creé un volumen LVM usando estoguía Tengo 2 discos duros de 2 TB para un total de 4 TB (o 3,64 TB utilizables). Creé el volumen y reinicié. Todo estaba funcionando bien. Luego copié 1,6 TB de datos en el volumen y, después de reiniciar, el volumen no se puede montar. Aquí está el resultado durante el arranque:
...
[....] 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):
Esto me ha sucedido tres veces y no puedo encontrar el problema. Ya había probado fsck -y la última vez, pero seguía arreglando y arreglando bloques, y al final se perdieron todos los datos.
Este es el contenido de /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
----------------
Los discos duros funcionaron bien entre la copia de datos y el reinicio. Las velocidades de lectura/escritura fueron buenas y todos los archivos que abrí funcionaron sin problemas. No creo que sea un problema de hardware. ¿Hay algo que pueda hacer para restaurar el volumen LVM?
Debo especificar que estoy ejecutando Debian 7.
Salida del comandofdisk -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
PVS
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
vgs
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
Respuesta1
Su /dev/sdb está claramente tostado (tiene toneladas de sectores defectuosos reasignados y pendientes). Necesitas reemplazarlo.