LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-27-2016, 05:18 PM   #1
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Rep: Reputation: 156Reputation: 156
dead disk on Centos 6


Hi,

this morning my server (Centos 6) was spewing out messages about a disk problem. Mistake #1 - I thought a reboot would fix it so I did not write down the error. In fact I could not boot the system as the boot loader is on this disk. So I fell back to a linux mint rescue CD I use. This revealed that the "other" disk - the backup disk - is intact, while the disk with the operating system is not. I swapped over cables to see whether this was the problem but no joy. Similarly, I tried different ports on the motherboard to no avail.

The problem is that while the "important" stuff is backed up...There are a lot of "doodles" on the dead disk which have mounted up over the years and I would really like to recover these. A simple command from the rescue CD
Quote:
sudo mount /dev/sdb1 /mnt/aaa/ -t ext4
mount: special device /dev/sdb1 does not exist
[32]mint@mint ~ $ sudo mount /dev/sda1 /mnt/aaa/ -t ext4
mint@mint ~ $ ls /mnt/aaa/
backup lost+found tim
and a suggestion I picked up from the net
Quote:
[1]mint@mint ~ $ sudo sfdisk -R /dev/sdb
BLKRRPART: Input/output error
I also ran gparted and this reported an error reading this disk and it's display just shows the content of the disk as "unallocated".

So I can simply stick in a new disk and recover all my backups but I would like to look at the contents of the dead disk. Any suggestions or troubleshooting hints?

Cheers
 
Old 12-27-2016, 05:26 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Doesn't sound promising.
dmesg should tell you the extent of the errors and whether a device node was created for it at boot (Mint liveCD). What does "lsblk -f" return ?.
 
Old 12-27-2016, 05:27 PM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,598

Rep: Reputation: 2691Reputation: 2691Reputation: 2691Reputation: 2691Reputation: 2691Reputation: 2691Reputation: 2691Reputation: 2691Reputation: 2691Reputation: 2691Reputation: 2691
Quote:
Originally Posted by timl View Post
Hi,

this morning my server (Centos 6) was spewing out messages about a disk problem. Mistake #1 - I thought a reboot would fix it so I did not write down the error. In fact I could not boot the system as the boot loader is on this disk. So I fell back to a linux mint rescue CD I use. This revealed that the "other" disk - the backup disk - is intact, while the disk with the operating system is not. I swapped over cables to see whether this was the problem but no joy. Similarly, I tried different ports on the motherboard to no avail.

The problem is that while the "important" stuff is backed up...There are a lot of "doodles" on the dead disk which have mounted up over the years and I would really like to recover these. A simple command from the rescue CD


and a suggestion I picked up from the net

I also ran gparted and this reported an error reading this disk and it's display just shows the content of the disk as "unallocated".

So I can simply stick in a new disk and recover all my backups but I would like to look at the contents of the dead disk. Any suggestions or troubleshooting hints?

Cheers
If sections of that disk are truly dead, there is a good reason. Depending upon the reason, you might be able to get access to some files, or you may get nothing at all.
Going forward, you need to back up EVERYTHING (but only about as often as it changes), and get that backup OFF SITE. Another disk on the same server, or in the next room, is not really good enough if your data matters.

Now to the present: I would load up a live-cd image with photorec and give it a couple of days (more or less) to work on that disk. If you can get anything at all, it will tell you.

If you have the option, I would try to image the disk first as a special backup. As it works, the problem may get much worse and prevent access to the things that are currently working, so preserve what you can.

Last edited by wpeckham; 12-27-2016 at 05:31 PM.
 
1 members found this post helpful.
Old 12-27-2016, 05:39 PM   #4
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Original Poster
Rep: Reputation: 156Reputation: 156
The first snippet is this:
Quote:
NAME FSTYPE LABEL MOUNTPOINT
sda
└─sda1
sdb
sr0 iso9660 LXFDVD184 /lib/live/mount/fromiso
loop0 /lib/live/mount/medium
loop1 /lib/live/mount/rootfs/filesystem.squashfs
I got this from dmesg (more further) down
Quote:
[Tue Dec 27 23:07:23 2016] sdb: unable to read partition table
Which says it all. I'll have a dig around for restoreing partition tables

dmesg is quite long so I have pasted in the first reference to sdb
Quote:
[Tue Dec 27 23:07:23 2016] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[Tue Dec 27 23:07:23 2016] ata5.00: irq_stat 0x40000001
[Tue Dec 27 23:07:23 2016] ata5.00: failed command: READ DMA
[Tue Dec 27 23:07:23 2016] ata5.00: cmd c8/00:02:02:00:00/00:00:00:00:00/e0 tag 0 dma 1024 in
[Tue Dec 27 23:07:23 2016] res 51/04:02:02:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
[Tue Dec 27 23:07:23 2016] ata5.00: status: { DRDY ERR }
[Tue Dec 27 23:07:23 2016] ata5.00: error: { ABRT }
[Tue Dec 27 23:07:23 2016] ata5.00: configured for UDMA/133
[Tue Dec 27 23:07:23 2016] ata5: EH complete
[Tue Dec 27 23:07:23 2016] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[Tue Dec 27 23:07:23 2016] ata5.00: irq_stat 0x40000001
[Tue Dec 27 23:07:23 2016] ata5.00: failed command: READ DMA
[Tue Dec 27 23:07:23 2016] ata5.00: cmd c8/00:02:02:00:00/00:00:00:00:00/e0 tag 0 dma 1024 in
[Tue Dec 27 23:07:23 2016] res 51/04:02:02:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
[Tue Dec 27 23:07:23 2016] ata5.00: status: { DRDY ERR }
[Tue Dec 27 23:07:23 2016] ata5.00: error: { ABRT }
[Tue Dec 27 23:07:23 2016] ata5.00: configured for UDMA/133
[Tue Dec 27 23:07:23 2016] ata5.00: failed command: READ DMA
[Tue Dec 27 23:07:23 2016] ata5.00: cmd c8/00:04:04:00:00/00:00:00:00:00/e0 tag 0 dma 2048 in
[Tue Dec 27 23:07:23 2016] res 51/04:04:04:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
[Tue Dec 27 23:07:23 2016] ata5.00: status: { DRDY ERR }
[Tue Dec 27 23:07:23 2016] ata5.00: error: { ABRT }
[Tue Dec 27 23:07:23 2016] ata5.00: configured for UDMA/133
[Tue Dec 27 23:07:23 2016] sd 4:0:0:0: [sdb]
[Tue Dec 27 23:07:23 2016] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[Tue Dec 27 23:07:23 2016] sd 4:0:0:0: [sdb]
[Tue Dec 27 23:07:23 2016] Sense Key : Aborted Command [current] [descriptor]
[Tue Dec 27 23:07:23 2016] Descriptor sense data with sense descriptors (in hex):
[Tue Dec 27 23:07:23 2016] 72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
[Tue Dec 27 23:07:23 2016] 00 00 00 04
[Tue Dec 27 23:07:23 2016] sd 4:0:0:0: [sdb]
[Tue Dec 27 23:07:23 2016] Add. Sense: No additional sense information
[Tue Dec 27 23:07:23 2016] sd 4:0:0:0: [sdb] CDB:
[Tue Dec 27 23:07:23 2016] Read(10): 28 00 00 00 00 04 00 00 04 00
[Tue Dec 27 23:07:23 2016] ata5: EH complete
[Tue Dec 27 23:07:23 2016] sdb: unable to read partition table
[Tue Dec 27 23:07:23 2016] sd 4:0:0:0: [sdb] CDB:
[Tue Dec 27 23:07:23 2016] Read(10): 28 00 00 00 00 02 00 00 02 00
[Tue Dec 27 23:07:23 2016] end_request: I/O error, dev sdb, sector 2
[Tue Dec 27 23:07:23 2016] Buffer I/O error on device sdb, logical block 1
[Tue Dec 27 23:07:23 2016] ata5: EH complete
[Tue Dec 27 23:07:23 2016] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[Tue Dec 27 23:07:23 2016] ata5.00: irq_stat 0x40000001
[Tue Dec 27 23:07:23 2016] ata5.00: failed command: READ DMA
[Tue Dec 27 23:07:23 2016] ata5.00: cmd c8/00:04:04:00:00/00:00:00:00:00/e0 tag 0 dma 2048 in
[Tue Dec 27 23:07:23 2016] res 51/04:04:04:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
[Tue Dec 27 23:07:23 2016] ata5.00: status: { DRDY ERR }
[Tue Dec 27 23:07:23 2016] ata5.00: error: { ABRT }
[Tue Dec 27 23:07:23 2016] ata5.00: configured for UDMA/133
[Tue Dec 27 23:07:23 2016] ata5: EH complete
[Tue Dec 27 23:07:23 2016] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[Tue Dec 27 23:07:23 2016] ata5.00: irq_stat 0x40000001
[Tue Dec 27 23:07:23 2016] ata5.00: failed command: READ DMA
[Tue Dec 27 23:07:23 2016] ata5.00: cmd c8/00:04:04:00:00/00:00:00:00:00/e0 tag 0 dma 2048 in
 
Old 12-27-2016, 05:59 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
It's bad that the report is "device error" and not "medium error". That suggests that the problem is in the drive's controller, not the disk surface, and that you won't be able to read anything at all from that disk. Professional data recovery would stand a good chance of recovering everything from that disk, but that's going to be expensive. How much are your "doodles" worth to you?
 
Old 12-27-2016, 06:03 PM   #6
stanvan
Member
 
Registered: May 2007
Posts: 123

Rep: Reputation: 50
I used ddrescue a long while back to recover data from a dead USB stick. So long ago, in fact, that I can't offer any better advice than just the name of this tool. Sorry. But wishing you luck to recover your data.
 
Old 12-27-2016, 08:47 PM   #7
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Original Poster
Rep: Reputation: 156Reputation: 156
thanks for all the feedback. I was really testing the water to see whether the disk was recoverable and it sounds like it isn't easily so I'll ponder my next move. I have a spare drive available so I might set the system back up again and plug in that disk later.

The content is mostly home directories from other computers I used to back up to that server. Also fstab and smb.conf would have been good as reference points but it is not the end of the world.

Cheers
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] centos 5: is the epel repo dead? tonj Linux - Software 3 11-28-2014 02:57 PM
sendmail dead but subsys locked in centos sonaansujacob Linux - Software 4 08-27-2013 08:00 AM
RAID1 software - 1 disk DEAD cferron Linux - Software 1 05-12-2008 02:14 PM
One dead disk from a RAID-0 chibione Linux - Hardware 1 12-21-2005 10:01 PM
Mandrake 9.2 - dead hard disk michael_mead Linux - Software 6 01-18-2004 03:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration