Other OS

Trouble with Adavanced Format HDD

2 2114
onnuex  
Edited by onnuex at Feb 18, 2016 10:59

Hey, I'm having trouble with my 5TB hdd. The disc sector format is AF: https://en.wikipedia.org/wiki/Advanced_Format

I'm unable to use or access the disk when I directly connect it with the SATA port of the Banana PI:
  1. $ sudo sfdisk -l /dev/sda
  2. GPT PMBR size mismatch (1220942644 != 1177606575) will be corrected by w(rite).
  3. Disk /dev/sda: 4.6 TiB, 5000981078016 bytes, 9767541168 sectors
  4. Units: sectors of 1 * 512 = 512 bytes
  5. Sector size (logical/physical): 512 bytes / 4096 bytes
  6. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  7. Disklabel type: dos
  8. Disk identifier: 0x00000000

  9. Device     Boot Start        End    Sectors   Size Id Type
  10. /dev/sda1           1 1220942644 1220942644 582.2G ee GPT

  11. Partition 1 does not start on physical sector boundary.
Copy the Code
If I use the USB-adapter on the Banana PI, everything seems to work fine:
  1. $ sudo sfdisk -l /dev/sda
  2. Disk /dev/sda: 4.6 TiB, 5000981073920 bytes, 1220942645 sectors
  3. Units: sectors of 1 * 4096 = 4096 bytes
  4. Sector size (logical/physical): 4096 bytes / 4096 bytes
  5. I/O size (minimum/optimal): 4096 bytes / 268431360 bytes
  6. Disklabel type: gpt
  7. Disk identifier: B8BAB7E5-CA33-4261-96AC-98D5B26A2C49

  8. Device Start End Sectors Size Type
  9. /dev/sda1 256 1220942591 1220942336 4.6T Linux filesystem
Copy the Code

Further some infos about the HDD:
  1. $ sudo hdparm -I /dev/sda

  2. /dev/sda:

  3. ATA device, with non-removable media
  4.         Model Number:       ST5000DM000-1FK178                     
  5.         Serial Number:      W4J0EWLQ
  6.         Firmware Revision:  CC47   
  7.         Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
  8. Standards:
  9.         Used: unknown (minor revision code 0x001f)
  10.         Supported: 9 8 7 6 5
  11.         Likely used: 9
  12. Configuration:
  13.         Logical                max        current
  14.         cylinders        16383        16383
  15.         heads                16        16
  16.         sectors/track        63        63
  17.         --
  18.         CHS current addressable sectors:   16514064
  19.         LBA    user addressable sectors:  268435455
  20.         LBA48  user addressable sectors: 9767541168
  21.         Logical  Sector size:                   512 bytes
  22.         Physical Sector size:                  4096 bytes
  23.         Logical Sector-0 offset:                  0 bytes
  24.         device size with M = 1024*1024:     4769307 MBytes
  25.         device size with M = 1000*1000:     5000981 MBytes (5000 GB)
  26.         cache/buffer size  = 16384 KBytes
  27.         Nominal Media Rotation Rate: 5980
  28. Capabilities:
  29.         LBA, IORDY(can be disabled)
  30.         Queue depth: 32
  31.         Standby timer values: spec'd by Standard, no device specific minimum
  32.         R/W multiple sector transfer: Max = 16        Current = ?
  33.         Advanced power management level: 128
  34.         Recommended acoustic management value: 208, current value: 208
  35.         DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
  36.              Cycle time: min=120ns recommended=120ns
  37.         PIO: pio0 pio1 pio2 pio3 pio4
  38.              Cycle time: no flow control=120ns  IORDY flow control=120ns
  39. Commands/features:
  40.         Enabled        Supported:
  41.            *        SMART feature set
  42.                     Security Mode feature set
  43.            *        Power Management feature set
  44.            *        Write cache
  45.            *        Look-ahead
  46.            *        Host Protected Area feature set
  47.            *        WRITE_BUFFER command
  48.            *        READ_BUFFER command
  49.            *        DOWNLOAD_MICROCODE
  50.            *        Advanced Power Management feature set
  51.                     Power-Up In Standby feature set
  52.            *        SET_FEATURES required to spinup after power up
  53.                     SET_MAX security extension
  54.            *        48-bit Address feature set
  55.            *        Device Configuration Overlay feature set
  56.            *        Mandatory FLUSH_CACHE
  57.            *        FLUSH_CACHE_EXT
  58.            *        SMART error logging
  59.            *        SMART self-test
  60.            *        General Purpose Logging feature set
  61.            *        WRITE_{DMA|MULTIPLE}_FUA_EXT
  62.            *        64-bit World wide name
  63.            *        IDLE_IMMEDIATE with UNLOAD
  64.            *        WRITE_UNCORRECTABLE_EXT command
  65.            *        {READ,WRITE}_DMA_EXT_GPL commands
  66.            *        Segmented DOWNLOAD_MICROCODE
  67.                     unknown 119[6]
  68.            *        Gen1 signaling speed (1.5Gb/s)
  69.            *        Gen2 signaling speed (3.0Gb/s)
  70.            *        Gen3 signaling speed (6.0Gb/s)
  71.            *        Native Command Queueing (NCQ)
  72.            *        Phy event counters
  73.            *        Idle-Unload when NCQ is active
  74.            *        READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
  75.                     DMA Setup Auto-Activate optimization
  76.                     Device-initiated interface power management
  77.            *        Software settings preservation
  78.                     unknown 78[7]
  79.            *        SMART Command Transport (SCT) feature set
  80.            *        SCT Write Same (AC2)
  81.            *        SCT Features Control (AC4)
  82.            *        SCT Data Tables (AC5)
  83.                     unknown 206[12] (vendor specific)
  84.                     unknown 206[13] (vendor specific)
  85. Security:
  86.         Master password revision code = 65534
  87.                 supported
  88.         not        enabled
  89.         not        locked
  90.         not        frozen
  91.         not        expired: security count
  92.                 supported: enhanced erase
  93. Logical Unit WWN Device Identifier: 5000c500822dc309
  94.         NAA                : 5
  95.         IEEE OUI        : 000c50
  96.         Unique ID        : 0822dc309
  97. Checksum: correct
Copy the Code


So I'm a bit confused. Is this a fault on the physical or logical level? My guess is, that the USB adapter handles the sector sizes differently.

Best regards,
Jonas

Tido  
Edited by Tido at Feb 18, 2016 19:24

Your first two lines in the posting:
$ sudo sfdisk -l /dev/sda
GPT PMBR size mismatch (1220942644 != 1177606575) will be corrected by w(rite).

Is SFDISK able to write a GPT partion table?

Why don't you take the bare HDD attach it to your PC and take either program:
  • gparted (GNOME)
  • Partitionsmanager (KDE)
and stay with GPT, but partion the drive to your need.

To get a good overview how your partions are lined up and not to make a major mistake use this command:
  1. lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
Copy the Code

Oh, the nice thing with GUID Partition Table (GPT) - you no longer have primary /logical - you just create partitions as you need

onnuex  
Thank you for your response. I was able to solve the problem by simply repartitioning the drive. So I can confirm that 5tb hdds are compatible with the BananaPI without any further modification.

It looks like, that the problem was caused by the USB-Sata-Adapter I initially used.

You have to log in before you can reply Login | Sign Up

Points Rules