2

After moving a number of hard drives from an Ubuntu desktop to dedicated Ubuntu server, I'm finding it hard to get Ubuntu server to recognise one of the drives. It's a 4tb WD green which was formatted using a GPT table and as ext4 less than 8 months ago, but now, it seems like it's lost.

sudo blkid and sudo fdisk -l both yield nothing more than a list of existing, working drives - the problematic drive is definitely not listed.

I've tried putting the drive in a SATA connected hot swap trayless drive alongside the others and it doesn't show up whatsoever, under any command.

However, running ls /dev/ | grep sd before attaching the drive in an external USB caddy, gives me all disks, but running it after shows an extra disk /dev/sdg, but with no partition (ie. there is no /dev/sdg1). Trying to mount the disk reports bad superblock, or words to that effect.

So I looked to Tesdisk to help me out, but when I run sudo testdisk, it fails to show the USB attached disk (/dev/sdg), it shows all the other disks available to me. I've used testdisk before and got great results, but it doesn't seem to like this scenario. Am I doing something wrong?

I've searched for days now for a solution and this is my last resort, is there anything I can do or should I reluctantly give up on the drive? I'm relatively new to all this and determined not to lose it if I can help it, any help would be greatly appreciated. Thank you!

  • Welcome to Ask Ubuntu! ;-) Could you please give us a bit more information like: what version of Ubuntu you're running? Please [edit] your question and add this information... – Fabby Apr 21 '15 at 21:49
  • If this drive is sdg then it would show up in both blkid and fdisk -l. What do you have in /proc/partitions? – psusi Apr 21 '15 at 21:54

1 Answers1

1
  1. Do not use the original disk any more!
  2. Make a copy of the drive using ddrescue on an identical (or larger) disk

    sudo apt-get install gddrescue
    sudo ddrescue --binary-prefixes --cluster-size=64 --sparse --timeout=20s /dev/sdg /dev/sdX /path/to/file.log
    

    where /dev/sdg is your disk when you can read the disk, but not its partition table and X is the drive letter for the extra disk...

  3. Try the duplicate!

    If the duplicate doesn't work either, try recovering the secondary copy of the GPT:

    sudo apt-get install gdisk
    sudo gdisk /dev/sdg
    

    You will then get this:

    Command (? for help):
    

    Type rEnter

    You will then get this:

    recovery/transformation command (? for help):
    

    Type bEnter

  4. For the future: back-up before moving drives!

Partly sourced from here...

Fabby
  • 34,259
  • As you're a reputation 1 user: If this answer helped you, don't forget to click the grey at the left of this text, which means "yes, this answer is valid"! ;-) – Fabby Apr 21 '15 at 21:49