Buffalo Forums

Products => Storage => : rcorbet October 06, 2020, 05:31:26 AM

: hard Drive inaccessible
: rcorbet October 06, 2020, 05:31:26 AM
Hi
I have a single disk in a Linkstation LS210D.  I am not able to get a DHCP address on the unit when I connected it to my LAN.  I urgently need to retrieve data from it. So I removed the disk and connected it to a PC and booted it up from a Ubuntu Live USB.  In Ubuntu, the drive is not showing in the file explorer but in DISKS, I can see the disk and its size. It shows that the disk is OK but has 2003 bad sectors.  The disk is not appearing when I run a "sudo -fdisk -l" in terminal shell.  So how can I correct/repair the bad sectors ?

See image attached https://drive.google.com/file/d/1NzE658eLCEWbf6Mfuurw2dMvEkXpWV5u/view?usp=sharing

Any assistance would be very appreciated.
: Re: hard Drive inaccessible
: 1000001101000 October 06, 2020, 09:28:41 AM
It looks like your screenshot isn't set up for others to view.

another way to view disks and partitions is:
lsblk
it might give you easier output to interpret.

You can't really repair the bad sectors. The drive has internal mechanisms to "replace" bad sectors but it typically only does this when it fails to write to a sector. You can see how many times this has happened by looking at the re-allocated sector count in the SMART data.

If you're able to see a bad sector count the drive must be visible to the system, hopefully you'll be able to find it via lsblk. Assuming the ubuntu kernel supports xfs you should be able to mount the data partition with something similar to:
:
sudo su
mkdir /mnt/recover
mount /dev/sdx6 /mnt/recover

: Re: hard Drive inaccessible
: orenames October 20, 2020, 03:22:37 AM
Thanks for all your replies, will follow them up shortly.
: Re: hard Drive inaccessible
: 1000001101000 October 20, 2020, 08:52:26 AM
That screenshot appears to show a drive with no partitions. Ideally you should see several partitions with the last one taking up most of the drive. The data is typically stored in an XFS filesystem contained in that large partition at the end.

You may want to seek professional help if the data is important enough to warrant that. Most things you can try have the potential to make things worse.

If you have another drive of the same size you could try cloning it first before doing anything. That would allow you to focus on getting the bits off the drive before it fails completely before worrying about restoring actual files. ddrescue is designed for doing that type of operation.

You could then use testdisk to try to recover the partition table. If that works you could then try to mount the XFS volume and copy the data off of it.

If that fails testdisk does have an option to try to recover files from the raw disk, but it does not work very well for XFS. There are commercial programs available that supposedly do a better job.