# Dell - Hard Drive Capacity Difference Between Drives

The capacity difference between the two drives is caused by **differing logical block/sector formatting** or **OEM vendor provisioning (HPA / Max LBA limits)**.

Even within the same Western Digital / Ultrastar DC HC520 12TB family, SAS drives are deployed with different low-level format structures:

### 1. Different Sector Formats (512e vs. 4Kn vs. Enterprise 520/528 Bytes)

- **Standard 12TB:** Typically reports around **11,175.5 GB** (<span class="math-inline" data-index-in-node="53" data-math="11.17\text{ TiB}">$11.17\\text{ TiB}$</span>) when formatted with standard 512-byte emulation (`512e`) or 4096-byte native (`4Kn`) sectors.
- **Enterprise SAN/EMC Formats:** <span class="citation-2">Drives pulled from proprietary SAN enclosures (EMC, NetApp, Huawei) often use </span>**<span class="citation-2">520-byte or 528-byte sectors</span>**<span class="citation-2 citation-end-2"> (or Type 1/2 Data Integrity Field protection).<sup class="superscript" data-turn-source-index="1"></sup></span> When translated or truncated by a Dell PERC/HBA, the usable LBA count drops, showing up around **10,948.5 GB**.

### 2. OEM Firmware &amp; Provisioning (HPA / Max LBA)

If one drive came from an OEM vendor (e.g., NetApp, EMC, Cisco, HPE) and the other is a generic Dell/retail drive, the OEM firmware may restrict the drive's total accessible Logical Block Addressing (LBA) count via Host Protected Area (HPA) or factory provisioning.

### How to Fix / Match Them

To get disk `0:1:3` to match `0:1:4` at full capacity:

1. **Check the Sector Size:**
    
    Boot into a Linux live environment (or pass the drive through via HBA/IT-mode) and run:
    
    <div _ngcontent-ng-c3183803001="" class="code-block ng-tns-c3183803001-28 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="31" jslog="223238;track:impression,attention;BardVeMetadataKey:[["r_5ecad10f5341abc6","c_4a4c7a6489319c2c",null,"rc_958598cce5520ab4",null,null,"en",null,1,null,null,1,0]]"><div _ngcontent-ng-c3183803001="" class="formatted-code-block-internal-container ng-tns-c3183803001-28"><div _ngcontent-ng-c3183803001="" class="animated-opacity ng-tns-c3183803001-28"><div _ngcontent-ng-c3183803001="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3183803001-28 ng-star-inserted"><span class="ng-tns-c3183803001-28">Bash</span><div _ngcontent-ng-c3183803001="" class="buttons ng-tns-c3183803001-28 ng-star-inserted"><button aria-label="Download code" class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted"></button><button aria-label="Copy code" class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted"></button></div></div></div></div></div>```
    smartctl -i /dev/sdX
    # or
    sg_scan -i
    ```
    
    <div _ngcontent-ng-c3183803001="" class="code-block ng-tns-c3183803001-28 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="31" jslog="223238;track:impression,attention;BardVeMetadataKey:[["r_5ecad10f5341abc6","c_4a4c7a6489319c2c",null,"rc_958598cce5520ab4",null,null,"en",null,1,null,null,1,0]]"><div _ngcontent-ng-c3183803001="" class="formatted-code-block-internal-container ng-tns-c3183803001-28"><div _ngcontent-ng-c3183803001="" class="animated-opacity ng-tns-c3183803001-28"></div></div></div>Check the `Logical block size` and `Formatted with type 1/2/3 protection` values.
2. **Low-Level Format to Standard 512e / 4Kn:**
    
    Using the `sg3_utils` package in Linux, reformat the drive to standard 512-byte or 4096-byte sectors:
    
    <div _ngcontent-ng-c3183803001="" class="code-block ng-tns-c3183803001-29 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="34" jslog="223238;track:impression,attention;BardVeMetadataKey:[["r_5ecad10f5341abc6","c_4a4c7a6489319c2c",null,"rc_958598cce5520ab4",null,null,"en",null,1,null,null,1,0]]"><div _ngcontent-ng-c3183803001="" class="formatted-code-block-internal-container ng-tns-c3183803001-29"><div _ngcontent-ng-c3183803001="" class="animated-opacity ng-tns-c3183803001-29"><div _ngcontent-ng-c3183803001="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3183803001-29 ng-star-inserted"><span class="ng-tns-c3183803001-29">Bash</span><div _ngcontent-ng-c3183803001="" class="buttons ng-tns-c3183803001-29 ng-star-inserted"><button aria-label="Download code" class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted"></button><button aria-label="Copy code" class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted"></button></div></div></div></div></div>```
    # Reformat to standard 512-byte sectors:
    sg_format --format --size=512 /dev/sdX
    ```
    
    <div _ngcontent-ng-c3183803001="" class="code-block ng-tns-c3183803001-29 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="34" jslog="223238;track:impression,attention;BardVeMetadataKey:[["r_5ecad10f5341abc6","c_4a4c7a6489319c2c",null,"rc_958598cce5520ab4",null,null,"en",null,1,null,null,1,0]]"><div _ngcontent-ng-c3183803001="" class="formatted-code-block-internal-container ng-tns-c3183803001-29"><div _ngcontent-ng-c3183803001="" class="animated-opacity ng-tns-c3183803001-29"></div></div></div>*(Note: This is a low-level format that will erase all data on that specific disk and takes several hours for a 12TB drive.)*
3. **Reset Max LBA (if sector size is already 512):**
    
    <p class="callout warning">**ATA/SATA drives only.** `hdparm -N` sends ATA commands, so on a SAS drive (like the HC520 SAS) it fails with 'SG\_IO: bad/missing sense data, sb\[\]: 72 05 20 ...' (Illegal Request, invalid command) and prints bogus output like 'max sectors = 0/513, HPA is enabled'. Ignore that; SAS drives have no HPA. Use step 4 instead.</p>
    
    If the drive was already 512 bytes, reset any HPA/LBA clamp:
    
    <div _ngcontent-ng-c3183803001="" class="code-block ng-tns-c3183803001-30 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="37" jslog="223238;track:impression,attention;BardVeMetadataKey:[["r_5ecad10f5341abc6","c_4a4c7a6489319c2c",null,"rc_958598cce5520ab4",null,null,"en",null,1,null,null,1,0]]"><div _ngcontent-ng-c3183803001="" class="formatted-code-block-internal-container ng-tns-c3183803001-30"><div _ngcontent-ng-c3183803001="" class="animated-opacity ng-tns-c3183803001-30"><div _ngcontent-ng-c3183803001="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3183803001-30 ng-star-inserted"><span class="ng-tns-c3183803001-30">Bash</span><div _ngcontent-ng-c3183803001="" class="buttons ng-tns-c3183803001-30 ng-star-inserted"><button aria-label="Download code" class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted"></button><button aria-label="Copy code" class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted"></button></div></div></div></div></div>```
    hdparm -N /dev/sdX
    # To restore full native capacity:
    hdparm -N p[max_lba_value] /dev/sdX
    ```
    
    <div _ngcontent-ng-c3183803001="" class="code-block ng-tns-c3183803001-30 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="37" jslog="223238;track:impression,attention;BardVeMetadataKey:[["r_5ecad10f5341abc6","c_4a4c7a6489319c2c",null,"rc_958598cce5520ab4",null,null,"en",null,1,null,null,1,0]]"><div _ngcontent-ng-c3183803001="" class="formatted-code-block-internal-container ng-tns-c3183803001-30"><div _ngcontent-ng-c3183803001="" class="animated-opacity ng-tns-c3183803001-30"></div></div></div>
4. **SAS drives: verify and fix capacity with sg3\_utils**
    
    Find the right device first (sg numbers can change after a reboot):
    
    ```bash
    lsscsi -g
    # or
    sg_scan -i
    ```
    
    Check capacity and protection:
    
    ```bash
    sg_readcap --long /dev/sgX
    ```
    
    A full 12TB HC520 at 512-byte sectors shows: Number of logical blocks=23437770752, Logical block length=512 bytes, prot\_en=0, Device size 12.00 TB (about 11175.5 GB in the PERC).
    
    If the block count is short (sg\_format keeps the existing block count when the sector size doesn't change), resize to the maximum. This takes seconds, not hours:
    
    ```bash
    sg_format --resize --count=-1 /dev/sgX
    ```
    
    If prot\_en=1 (Type 1/2 protection still on, which PERC controllers often reject), do a full format that clears protection and sets max size:
    
    ```bash
    sg_format --format --size=512 --fmtpinfo=0 --count=-1 /dev/sgX
    ```
5. **Get the PERC to pick up the new size**
    
    Power-cycle the server (or rescan), then in the PERC config utility or iDRAC storage page clear any foreign config on the drive and confirm it shows 11175.5 GB before adding it to a virtual disk.
6. **Optional: format to 4096-byte native sectors (4Kn)**
    
    Before you start, check that everything using the drive supports 4Kn. Don't mix 4Kn and 512e drives in the same PERC virtual disk; to boot from a 4Kn disk the server must use UEFI, not BIOS mode; and some older OS and hypervisor versions don't support 4Kn disks.
    
    SAS drives (sg3\_utils). This erases the whole drive and takes several hours on a 12TB disk:
    
    ```bash
    lsscsi -g        # confirm the right /dev/sgX first
    sg_format --format --size=4096 --fmtpinfo=0 /dev/sgX
    ```
    
    When the sector size changes, sg\_format sets the block count to the drive's maximum on its own, so --count isn't needed.
    
    Verify:
    
    ```bash
    sg_readcap --long /dev/sgX
    ```
    
    A full 12TB HC520 at 4Kn shows: Logical block length=4096 bytes, Number of logical blocks=2929721344, prot\_en=0, Device size 12.00 TB (the same total size as 512e, just one-eighth the number of blocks).
    
    SATA drives: sg\_format doesn't apply. If the drive's firmware supports changing the sector size, use:
    
    ```bash
    hdparm -I /dev/sdX | grep -i 'sector size'
    hdparm --set-sector-size 4096 --please-destroy-my-drive /dev/sdX
    ```
    
    If hdparm says it isn't supported, the drive's sector size can't be changed this way.
    
    Then do step 5 again (power-cycle, clear foreign config, confirm the size in the PERC).
7. **Check for and handle bad sectors (SAS)**
    
    A full sg\_format already certifies every sector and remaps bad ones to spare sectors (reallocation). Remapped sectors go on the drive's grown defect list. They can't be recovered, but they stop causing errors.
    
    Keep certification on during the format (it's the default, so don't add --ffmt or --dcrt):
    
    ```bash
    sg_format --format --size=4096 --fmtpinfo=0 /dev/sgX
    ```
    
    After the format, check the grown defect list and error counters:
    
    ```bash
    sg_reassign --grown /dev/sgX
    smartctl -a /dev/sgX
    ```
    
    In the smartctl output, check 'Elements in grown defect list' and the read/write 'Total uncorrected errors' values.
    
    Optional full read test (more than 20 hours on a 12TB drive):
    
    ```bash
    smartctl -t long /dev/sgX
    smartctl -l selftest /dev/sgX   # check the result after it finishes
    ```
    
    To remap one specific bad LBA by hand (this erases the data in that block):
    
    ```bash
    sg_reassign --address=<LBA> /dev/sgX
    ```
    
    Rule of thumb: a few dozen grown defects that stay the same over time is fine. If the count keeps going up, or there are any uncorrected errors, the drive is failing and should be replaced instead of reused.

Once reformatted, the Dell PERC controller will detect `0:1:3` at the full **11175.5 GB** size.