1

I dug up an old harddrive and I want to see what's on it. I don't remember if it was ever partitioned, or if it runs windows, or if it's just a backup disk.

Here is what I've done:

  • Plug in disk, Ubuntu does not recognize disk and does not automount.

  • Open up gparted. See this error:

    Invalid argument during seek for read on /dev/sdd

    and then shows up as unallocated 2.73 TB on /dev/sdd

  • sudo fdisk -l

    Disk /dev/sdd: 3000.6 GB, 3000591900160 bytes
    255 heads, 63 sectors/track, 364801 cylinders, total 5860531055 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
       /dev/sdd1            1  4294967295  2147483647+  ee  GPT
    
  • sudo smartctl --all /dev/sdd

    === START OF INFORMATION SECTION ===
    Model Family:     Seagate Barracuda 7200.14 (AF)
    Device Model:     ST3000DM001-1CH166
    Serial Number:    Z1F3ZH6B
    LU WWN Device Id: 5 000c50 0652247c5
    Firmware Version: CC27
    User Capacity:    3,000,591,900,160 bytes [3.00 TB]
    Sector Sizes:     512 bytes logical, 4096 bytes physical
    Rotation Rate:    7200 rpm
    Device is:        In smartctl database [for details use: -P show]
    ATA Version is:   ACS-2, ACS-3 T13/2161-D revision 3b
    SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 1.5 Gb/s)
    Local Time is:    Sat May 21 18:05:13 2016 EDT
    
    ==> WARNING: A firmware update for this drive may be available,
    see the following Seagate web pages:
    http://knowledge.seagate.com/articles/en_US/FAQ/207931en
    http://knowledge.seagate.com/articles/en_US/FAQ/223651en
    
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    
    General SMART Values:
    Offline data collection status:  (0x00) Offline data collection activity
                        was never started.
                        Auto Offline Data Collection: Disabled.
    Self-test execution status:      (   0) The previous self-test routine completed
                        without error or no self-test has ever 
                        been run.
    Total time to complete Offline 
    data collection:        (  584) seconds.
    Offline data collection
    capabilities:            (0x73) SMART execute Offline immediate.
                        Auto Offline data collection on/off support.
                        Suspend Offline collection upon new
                        command.
                        No Offline surface scan supported.
                        Self-test supported.
                        Conveyance Self-test supported.
                        Selective Self-test supported.
    SMART capabilities:            (0x0003) Saves SMART data before entering
                        power-saving mode.
                        Supports SMART auto save timer.
    Error logging capability:        (0x01) Error logging supported.
                        General Purpose Logging supported.
    Short self-test routine 
    recommended polling time:    (   1) minutes.
    Extended self-test routine
    recommended polling time:    ( 321) minutes.
    Conveyance self-test routine
    recommended polling time:    (   2) minutes.
    SCT capabilities:          (0x3085) SCT Status supported.
    
    SMART Attributes Data Structure revision number: 10
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
      1 Raw_Read_Error_Rate     0x000f   100   100   006    Pre-fail  Always       -       1452432
      3 Spin_Up_Time            0x0003   099   099   000    Pre-fail  Always       -       0
      4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       2
      5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
      7 Seek_Error_Rate         0x000f   100   253   030    Pre-fail  Always       -       146028888090
      9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       5
     10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
     12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       20
    183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
    184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
    187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
    188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0 0 0
    189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
    190 Airflow_Temperature_Cel 0x0022   069   065   045    Old_age   Always       -       31 (Min/Max 29/31)
    191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
    192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       10
    193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       38
    194 Temperature_Celsius     0x0022   031   040   000    Old_age   Always       -       31 (0 27 0 0 0)
    197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
    198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
    199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
    240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       6h+00m+31.860s
    241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       89828161
    242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       234961
    
    SMART Error Log Version: 1
    No Errors Logged
    
    SMART Self-test log structure revision number 1
    No self-tests have been logged.  [To run self-tests, use: smartctl -t]
    
    
    SMART Selective self-test log data structure revision number 1
     SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
        1        0        0  Not_testing
        2        0        0  Not_testing
        3        0        0  Not_testing
        4        0        0  Not_testing
        5        0        0  Not_testing
    Selective self-test flags (0x0):
      After scanning selected spans, do NOT read-scan remainder of disk.
    If Selective self-test is pending on power-up, resume after 0 minute delay.
    

    `

This is one of those crappy Seagate 3TB drives with high failure rates (and a class-action lawsuit to follow). Is this drive just an unpartitioned empty hdd? Is it still in good working condition?

I'm about to reformat this disk, but I want to make sure I'm not overwriting anything. Am I safe?

2
  • It is partitioned - there is an sdd1 - Note the 1 - and FDISK shows it as having a very large GPT partition. That looks really suspect to me. (I'm not posting as an answer though as I'm not sure FDISK reporting correctly - I believe that FDISK does not handle GPT partitions - and this needs to be a GPT partition because its > 2TB.
    – davidgo
    May 21, 2016 at 22:43
  • @davidgo How can I check what's in the disk? When I do ls /dev/sdd* it only prints /dev/sdd
    – warchest
    May 21, 2016 at 23:08

1 Answer 1

0

It looks like you are probably using an USB enclosure.

How can you tell? S.M.A.R.T. reports that the disk is Advanced Format (4096-byte physical sectors), but fdisk saw 512-byte physical sectors. The USB enclosure is revealing 512-byte physical sectors even though this is not correct. More details here.

I see that fdisk could only see 4294967295 blocks, or 2TiB. The USB enclosure may not be able to use more than 2TiB of Advanced Format disks at all. I suggest:

  • getting a new enclosure that supports Advanced Format or
  • plugging the disk directly to your computer via a SATA cable.

Some USB enclosures can address Advanced Format but still report 512-byte physical sectors. If you have such an enclosure, in order to mount this disk, you should get Linux to disregard the incorrect sector size. Here's one way to do it using a loopback device:

LODEVICE="$(losetup -f)"
sudo losetup "$LODEVICE" /dev/sdd
sudo partprobe "$LODEVICE"

After losetup runs, you should have a device called /dev/loop#, where /dev/loop# is the string stored in $LODEVICE.

After partprobe runs, you should have a device called /dev/loop#p1.

There may be other partitions, which you can find with the lsblk command. The output should look somewhat like this:

NAME                        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
⋮
loop#                         7:0    0  22.4G  0 loop  
├─loop#p1                   259:0    0   512M  0 loop  
├─loop#p2                   259:1    0   244M  0 loop  
└─loop#p3                   259:2    0  21.6G  0 loop

If you wanted to mount the first partition on /mnt, you could do this:

sudo mount "${LODEVICE}p1" /mnt

You can then run ls /mnt to see what's inside.

When you're finished unmounting, you can disconnect the loopback device like so:

sudo losetup -d "$LODEVICE"
4
  • When I try sudo partprobe "$LODEVICE", I get Error: Invalid argument during seek for read on /dev/loop0
    – warchest
    May 22, 2016 at 0:22
  • @warchest: Upon checking your fdisk output again, I see that fdisk could only see 4294967295 blocks, or 2TiB. The USB enclosure may not be able to use more than 2TiB of Advanced Format disks at all. I suggest getting a new enclosure that supports Advanced Format or perhaps plugging the disk in via a SATA cable directly to your computer.
    – Deltik
    May 22, 2016 at 0:30
  • I've hooked hdd directly to my ubuntu desktop (using sata cable) and ran the same commands (except it's on /dev/sdb now). I get the same error: Error: Invalid argument during seek for read on /dev/loop0. I also ran fdisk, and this time it printed out Sector Size (logical/physical): 512 bytes / 4096 bytes; total 5860531055 sectors). /dev/sdb1 Start 1 End 4294967295 Blocks 2147483647+ Id ee System GPT
    – warchest
    May 22, 2016 at 0:50
  • @warchest: If the hard drive is plugged directly into a computer (and not through an enclosure), it is possible that a clone/image of a different-sized hard drive was written to the one you're trying to read. Alternatively, the partition table could be corrupt. You can use testdisk (apt install testdisk) to see if you can rebuild a partition table from discovered partitions. If you don't find anything of value, you may wipe the disk and repurpose it as the disk itself says it's healthy.
    – Deltik
    May 22, 2016 at 1:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .