Eu tenho um servidor dedicado (Hetzner EX4). Um dia, reiniciei o servidor e ele não iniciava. atendimento ao cliente me disse que um dos discos rígidos estava com defeito, e ativou o sistema de recuperação (Linux). Meu servidor tem 2 x 3TB HDD, em um Raid1 (quase certo disso!)
Portanto, presumo que pelo menos uma das unidades possa ser utilizável, mas não tenho a menor idéia sobre como obter os dados do meu servidor. Eu tenho algumas pesquisas, e tentei usar partimage (e partimage server), mas como não entendo como discos e partições funcionam no Linux, não sei como tirar os dados do servidor.
Eu nem sei o que estou vendo são drives, partições ou o quê!
Não tenho certeza, mas acho que isso pode ser útil:
root@rescue /dev # cd dev/
-bash: cd: dev/: No such file or directory
root@rescue /dev # dir
1-1 cpu full loop4 mouse1 ptyp2 ptype ram4 sda3 stderr tty16 tty27 tty38 tty49 tty6 ttyp4 ttyS0 vcs2 vga_arbiter
2-1 cpu_dma_latency fuse loop5 net ptyp3 ptypf ram5 sda4 stdin tty17 tty28 tty39 tty5 tty60 ttyp5 ttyS1 vcs3 vhost-net
2-1.4 disk hpet loop6 network_latency ptyp4 ram0 ram6 sda5 stdout tty18 tty29 tty4 tty50 tty61 ttyp6 ttyS2 vcs4 watchdog
2-1.6 event0 input loop7 network_throughput ptyp5 ram1 ram7 sdb tty tty19 tty3 tty40 tty51 tty62 ttyp7 ttyS3 vcs5 watchdog0
autofs event1 kmem loop-control null ptyp6 ram10 ram8 sdb1 tty0 tty2 tty30 tty41 tty52 tty63 ttyp8 urandom vcs6 xconsole
block event2 kmsg MAKEDEV port ptyp7 ram11 ram9 sdb2 tty1 tty20 tty31 tty42 tty53 tty7 ttyp9 usbmon0 vcsa zero
bsg event3 kvm mapper ppp ptyp8 ram12 random sdb3 tty10 tty21 tty32 tty43 tty54 tty8 ttypa usbmon1 vcsa1
btrfs-control event4 log md psaux ptyp9 ram13 rtc sdb4 tty11 tty22 tty33 tty44 tty55 tty9 ttypb usbmon2 vcsa2
bus event5 loop0 mem ptmx ptypa ram14 rtc0 sdb5 tty12 tty23 tty34 tty45 tty56 ttyp0 ttypc usbmon3 vcsa3
char event6 loop1 mice pts ptypb ram15 sda sg0 tty13 tty24 tty35 tty46 tty57 ttyp1 ttypd usbmon4 vcsa4
console fb0 loop2 microcode ptyp0 ptypc ram2 sda1 sg1 tty14 tty25 tty36 tty47 tty58 ttyp2 ttype vcs vcsa5
core fd loop3 mouse0 ptyp1 ptypd ram3 sda2 shm tty15 tty26 tty37 tty48 tty59 ttyp3 ttypf vcs1 vcsa6
root@rescue /dev # fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
256 heads, 63 sectors/track, 363376 cylinders, total 5860533168 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: 0x8ab49420
Device Boot Start End Blocks Id System
/dev/sdb1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
256 heads, 63 sectors/track, 363376 cylinders, total 5860533168 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: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
root@rescue /dev #
Alguém poderia, por favor, me dar algum conselho, ou me apontar na direção certa para resolver o meu problema?
Talvez eu esteja fazendo tudo errado, e eu deveria estar tomando outra abordagem, ou talvez isso não seja possível de jeito nenhum: /
UPDATE 1
Primeiramente, deixe-me agradecer por todas as suas sugestões.
Eu tentei algumas coisas, mas não sei o que significam os resultados.
Primeiro, você já viu o resultado de fdisk -l
(não tenho certeza do fato de que / dev / sda tem Identificador de Disco: 0x00000000 é uma pista ...
Eu tentei montar /dev/sda1
e funcionou. No entanto, se eu entrar nesse diretório, só consigo ver a pasta EFI. Isso é normal?
Além disso, se eu tentar montar /dev/sdb1
, recebo "mount: você deve especificar o tipo de sistema de arquivos".
Se eu executar cat /proc/mdstat
, obtenho isto:
Personalities : [raid1]
unused devices: <none>
UPDATE 2
Seguindo o conselho de Cristian Ciupitu, executei o smartctl em ambas as unidades, e aqui estão os resultados:
sdb:
root@rescue / # smartctl -l error /dev/sdb
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.10.36] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF READ SMART DATA SECTION ===
SMART Error Log Version: 1
ATA Error Count: 242 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 242 occurred at disk power-on lifetime: 20101 hours (837 days + 13 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 8c fe a2 0b Error: UNC at LBA = 0x0ba2fe8c = 195231372
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 01 8c fe a2 4b 00 7d+19:32:38.593 READ FPDMA QUEUED
ef 10 02 00 00 00 a0 00 7d+19:32:38.559 SET FEATURES [Reserved for Serial ATA]
27 00 00 00 00 00 e0 00 7d+19:32:38.559 READ NATIVE MAX ADDRESS EXT
ec 00 00 00 00 00 a0 00 7d+19:32:38.559 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 00 7d+19:32:38.559 SET FEATURES [Set transfer mode]
Error 241 occurred at disk power-on lifetime: 20101 hours (837 days + 13 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 8b fe a2 0b Error: UNC at LBA = 0x0ba2fe8b = 195231371
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 01 8c fe a2 4b 00 7d+19:32:35.600 READ FPDMA QUEUED
60 00 01 8b fe a2 4b 00 7d+19:32:35.600 READ FPDMA QUEUED
ef 10 02 00 00 00 a0 00 7d+19:32:35.567 SET FEATURES [Reserved for Serial ATA]
27 00 00 00 00 00 e0 00 7d+19:32:35.567 READ NATIVE MAX ADDRESS EXT
ec 00 00 00 00 00 a0 00 7d+19:32:35.566 IDENTIFY DEVICE
Error 240 occurred at disk power-on lifetime: 20101 hours (837 days + 13 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 8d fe a2 0b Error: UNC at LBA = 0x0ba2fe8d = 195231373
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 01 8b fe a2 4b 00 7d+19:32:32.607 READ FPDMA QUEUED
60 00 01 8c fe a2 4b 00 7d+19:32:32.606 READ FPDMA QUEUED
60 00 01 8d fe a2 4b 00 7d+19:32:32.606 READ FPDMA QUEUED
ef 10 02 00 00 00 a0 00 7d+19:32:32.574 SET FEATURES [Reserved for Serial ATA]
27 00 00 00 00 00 e0 00 7d+19:32:32.573 READ NATIVE MAX ADDRESS EXT
Error 239 occurred at disk power-on lifetime: 20101 hours (837 days + 13 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 8a fe a2 0b Error: UNC at LBA = 0x0ba2fe8a = 195231370
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 01 8d fe a2 4b 00 7d+19:32:29.563 READ FPDMA QUEUED
60 00 01 8c fe a2 4b 00 7d+19:32:29.563 READ FPDMA QUEUED
60 00 01 8b fe a2 4b 00 7d+19:32:29.563 READ FPDMA QUEUED
60 00 01 8a fe a2 4b 00 7d+19:32:29.563 READ FPDMA QUEUED
ef 10 02 00 00 00 a0 00 7d+19:32:29.531 SET FEATURES [Reserved for Serial ATA]
Error 238 occurred at disk power-on lifetime: 20101 hours (837 days + 13 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 8e fe a2 0b Error: UNC at LBA = 0x0ba2fe8e = 195231374
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 01 8a fe a2 4b 00 7d+19:32:26.521 READ FPDMA QUEUED
60 00 01 8b fe a2 4b 00 7d+19:32:26.521 READ FPDMA QUEUED
60 00 01 8c fe a2 4b 00 7d+19:32:26.521 READ FPDMA QUEUED
60 00 01 8d fe a2 4b 00 7d+19:32:26.521 READ FPDMA QUEUED
60 00 01 8e fe a2 4b 00 7d+19:32:26.520 READ FPDMA QUEUED
sda:
root@rescue / # smartctl -t short /dev/sda
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.10.36] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
Short INQUIRY response, skip product id
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
ATUALIZAÇÃO 3
Eu fiz um lsblk para descobrir quais partições tinham os dados:
root@rescue / # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 2.7T 0 disk
├─sda1 8:1 0 200M 0 part
├─sda2 8:2 0 1M 0 part
├─sda3 8:3 0 127M 0 part
├─sda4 8:4 0 2.7T 0 part /mnt
└─sda5 8:5 0 455.5K 0 part
sdb 8:16 0 2.7T 0 disk
├─sdb1 8:17 0 1M 0 part
├─sdb2 8:18 0 127M 0 part
├─sdb3 8:19 0 200M 0 part
├─sdb4 8:20 0 2.7T 0 part
└─sdb5 8:21 0 455.5K 0 part
loop0 7:0 0 1.5G 1 loop
Então eu montei sda4. Eu posso ver o sistema de arquivos (unidade C no Windows), mas quando entro em um diretório (digamos "Arquivos de Programas") e tento listar todos os arquivos, recebo um erro de E / S:
dir: reading directory .: Input/output error
Eu tentei enviar de qualquer maneira todo o sistema de arquivos através do ftp usando o ncftpput, e a maioria dos arquivos lançou uma exceção de IO.
Se eu tentar montar o sdb4, recebo este erro:
root@rescue / # mount /dev/sdb4 /mnt
ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read vcn 0x28: Input/output error
Failed to mount '/dev/sdb4': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
UPDATE 4
Eu tentei o ntfsfix sem sorte:
root@rescue / # ntfsfix /dev/sdb4
Mounting volume... ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read vcn 0x28: Input/output error
FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read vcn 0x28: Input/output error
Remount failed: Input/output error