How to tell if disk is (truly) empty (and/or repair it)?

  • I have a drive in my server that shows up in Disks but not in File Systems. Output of fdisk -l...

    Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimal/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x4b85ddd6

    There are no partitions listed. That could be because it's a completely empty disk. I'm not sure. How can I tell? If the disk does have files on it, they're probably pretty valuable to me. What are my options for reading and/or repairing the disk WITHOUT opening up the server and pulling the drive? (which I really don't want to do!)

  • Boot from other media. For instance a thumb drive with Linux.

    Then you can use the tools there to examine the drive. There are even Linux images with data recovery tools you can use to scan the media for deleted files.

    When a drive is (re-) formatted it is possible to do a quick format. That means that data remains on the media, the area is just flagged as empty. With the right tools you can recover files. But the connection between filename and data is lost. The software scan the media for "signatures" of known types of files. Images and text documents and so on. And the software can recreate the files for you. I have used this to recover images from a reformatted flash memory for a friend.

    Typically you don't want to work on the drive directly to recover data. Instead you make a disk image using dd and recover data from that image. This is to avoid erasing more data from the drive, if it is damaged.

    If the drive was wiped or the media initialized during the format, then everything is lost unless you have very special skills and equipment.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

    Edited once, last by Adoby ().

  • That’s what I was looking for. The problem with booting a live distro is that the machine is headless and, while connecting a monitor and keyboard is easier than pulling it out of the rack, getting to the back side of my rack is still a bit of a job.

    In the end, there was a third drive that was totally missing in action. Wasn’t even showing upon Disks. So I ended up pulling the box out of the rack and opening it up anyway.

    Thanks for the help, guys!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!