I bought a used SSD, it has RAID on it and it's missing usable space

I bought a used Intel SSDSC2BB240G4 240GB and it only has 176.62 GiB of usable space.


It seems to have RAID on it since I now have new entries named md126 and md127.

According to this site I should have 223.52 GB of usable space.

I have never used RAID but I figured that if I removed RAID on the drive, the missing usable space would return.
Here’s what I did by referencing RAID - ArchWiki

$ cat /proc/mdstat
Personalities : [raid0] 
md126 : active raid0 sdf[0]
      184569856 blocks super external:/md127/0 64k chunks
      
md127 : inactive sdf[0](S)
      630685 blocks super external:ddf
       
unused devices: <none>


$ sudo mdadm --detail /dev/md126
/dev/md126:
         Container : /dev/md/ddf0, member 0
        Raid Level : raid0
        Array Size : 184569856 (176.02 GiB 189.00 GB)
      Raid Devices : 1
     Total Devices : 1

             State : broken 
    Active Devices : 1
   Working Devices : 1
    Failed Devices : 0

        Chunk Size : 64K

Consistency Policy : none

    Container GUID : 4C534920:20202020:10000079:15D90700:4156D936:0033286E
                  (LSI      09/26/14 09:59:02)
               Seq : 00000003
     Virtual Disks : 1

    Number   Major   Minor   RaidDevice State
       0       8       80        0      active sync   /dev/sdf
       

$ sudo mdadm --detail /dev/md127
/dev/md127:
           Version : ddf
        Raid Level : container
     Total Devices : 1

   Working Devices : 1

    Container GUID : 4C534920:20202020:10000079:15D90700:4156D936:0033286E
                  (LSI      09/26/14 09:59:02)
               Seq : 00000003
     Virtual Disks : 1

     Member Arrays : /dev/md126

    Number   Major   Minor   RaidDevice

       -       8       80        -        /dev/sdf
       
$ sudo mdadm --fail /dev/md126 /dev/sdf
mdadm: set device faulty failed for /dev/sdf:  Device or resource busy


$ sudo mdadm --fail /dev/md127 /dev/sdf
mdadm: set device faulty failed for /dev/sdf:  No such device


# mdadm --stop /dev/md126
mdadm: stopped /dev/md126


# mdadm --remove /dev/md126 /dev/sdf
mdadm: error opening /dev/md126: No such file or directory


# mdadm --remove /dev/md127 /dev/sdf
mdadm: hot removed /dev/sdf from /dev/md127

Did I successfully remove RAID from the drive?
This is what the partition manager shows now.


The md126 and md127 entries are not there anymore.

If I successfully removed RAID from the drive does it mean that there’s something wrong with the drive because it still shows 176.62GB of usable space?

re-format the device
Gparted should be able to do that.
Use dd to the first few blocks if nothing else seems to help
then re-partition and re-format
if Gparted will not do the job.

It seems you care too much about what the device has been used for.
It’s not important - simply wipe it/re-format it.

I formatted the drive by removing all partitions and then created a GPT ext4 partition.

Wrote on the first three blocks (I think).

$ sudo dd if=/dev/zero of=/dev/sdf bs=512 count=3
3+0 records in
3+0 records out
1536 bytes (1.5 kB, 1.5 KiB) copied, 0.000309323 s, 5.0 MB/s

After dd:


Re-format:

The drive is still only 176.62GB.

Hrmmm… at this point I would be typing “SSDSC2BB240G4” into “your favourite internet search engine” and looking for some kind of low-level format utility.

I’m not familiar with ssd’s - or solid state drives in general.

It is a used device.

Could it be that part of the capacity has been “used up” - degraded memory cells?
Don’t know.
Don’t even know how to check for that case.

What I do know is that a file system needs space for it’s internal structure.
And, in case of ext2/3/4, by default, 5% of storage are reserved for root (can be easily changed to zero or another value)
but the file system itself also needs some space

Can this account for ~ 40 GB ?
likely not

I just don’t know - and don’t have any more things to suggest.

The straigh forward is the following - replace sdy to match your system

sudo sgdisk --zap-all /dev/sdy

But - SSD us usually overprovisioned to be able to accomodate for bad pages (bad memory cells).

As you have bought it second hand - the seller may have - deliberatly or not - left out the actual usuable size.

You may be able to use f3 - Fight Flash Fraud — f3 8.0 documentation

You can install the utility using

sudo pacman -Syu f3

There is a simple Qt based GUI in AUR AUR (en) - f3-qt

pamac build f3-qt

Back in 2015, I installed a 240G Intel 730 SSD in a Windows machine and, from some sketchy notes I still have, it DID have 223.5G of usable space on it. There was a utility that came with it – Intel SSD Toolbox and it was Windows-based only of course – that, as I seem to recall, would, among other things, detail any unusable space that was blocked off.

My gut feeling, for what it’s worth, is that your SSD being a used drive, it’s very likely that the missing space is, as @Nachlese and @linux-aarhus both suggested, bad memory cells that are no longer available. You can try and get a copy of that Intel SSD Toolbox but you’d have to find a way to run Windows 7 (the utility was apparently marked EOL when Microsnot stopped supporting Win7) in order to install and run it.

Well, in this case that’s because of the different measure units used. The makers/sellers of the drives use base 10 units (KiloBytes, MegaBytes, GigaBytes, …) and the rest of us use base 2 units (KibiBytes, MebiBytes, GibiBytes, …).

So 240GB (Gigabytes, in base 10) are 223,5GiB (GibiBytes, in base 2):
240x1000x1000x1000/1024/1024/1024 = 223,5 (aprox.)

See also: Byte - Wikipedia

1 Like

I noticed this earlier, but it does not make up for the difference.

176 Gib = 189 GB

You can also note it here:

Well I misunderstood the user I was replying to. I was actually referring to his/her drive.

In the case of the OP, I think he/she can use smartctl (package smartmontools) to see, between others, information about retired sectors:

sudo smartctl -a /dev/sdf

@linux-aarhus
In this intel.com page, it says that DBAN can also “perform a low-level format or secure erase.”
I ran a quick erase and this was the result.

f3 - Fight Flash Fraud

$ sudo pacman -Syu f3f
[sudo] password for satjwu: 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
error: target not found: f3f

The f2-qt link gives a 404 - Page Not Found Sorry, the page you’ve requested does not exist.

@owburp
It might have been one the ones here.
This page mentioned I could use DBAN, so I used that.

@cfinnberg

$ sudo smartctl -a /dev/sdf
[sudo] password for satjwu: 
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.1.55-1-MANJARO] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Intel 730 and DC S35x0/3610/3700 Series SSDs
Device Model:     INTEL SSDSC2BB240G4
Serial Number:    BTWL338201TR240NGN
LU WWN Device Id: 5 5cd2e4 04b4ac67f
Firmware Version: D2010355
User Capacity:    189,645,353,472 bytes [189 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database 7.3/5528
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 2.6, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Oct 28 17:44:20 2023 CDT
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:  (0x02) Offline data collection activity
                                        was completed without error.
                                        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:                (    2) seconds.
Offline data collection
capabilities:                    (0x79) SMART execute Offline immediate.
                                        No Auto Offline data collection support.
                                        Suspend Offline collection upon new
                                        command.
                                        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:        (   2) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0032   098   098   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       4454
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       19
170 Available_Reservd_Space 0x0033   100   100   010    Pre-fail  Always       -       0
171 Program_Fail_Count      0x0032   100   100   000    Old_age   Always       -       0
172 Erase_Fail_Count        0x0032   100   100   000    Old_age   Always       -       0
174 Unsafe_Shutdown_Count   0x0032   100   100   000    Old_age   Always       -       14
175 Power_Loss_Cap_Test     0x0033   100   100   010    Pre-fail  Always       -       632 (25 27)
183 SATA_Downshift_Count    0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0033   100   100   090    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
190 Temperature_Case        0x0022   075   075   000    Old_age   Always       -       25 (Min/Max 13/25)
192 Unsafe_Shutdown_Count   0x0032   100   100   000    Old_age   Always       -       14
194 Temperature_Internal    0x0022   100   100   000    Old_age   Always       -       25
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
199 CRC_Error_Count         0x003e   100   100   000    Old_age   Always       -       0
225 Host_Writes_32MiB       0x0032   100   100   000    Old_age   Always       -       244322
226 Workld_Media_Wear_Indic 0x0032   100   100   000    Old_age   Always       -       41
227 Workld_Host_Reads_Perc  0x0032   100   100   000    Old_age   Always       -       49
228 Workload_Minutes        0x0032   100   100   000    Old_age   Always       -       359
232 Available_Reservd_Space 0x0033   100   100   010    Pre-fail  Always       -       0
233 Media_Wearout_Indicator 0x0032   099   099   000    Old_age   Always       -       0
234 Thermal_Throttle        0x0032   100   100   000    Old_age   Always       -       0/0
241 Host_Writes_32MiB       0x0032   100   100   000    Old_age   Always       -       244322
242 Host_Reads_32MiB        0x0032   100   100   000    Old_age   Always       -       305490

SMART Error Log Version: 1
ATA Error Count: 4
        CR = Command Register [HEX]
        FR = Features Register [HEX]
        SC = Sector Count Register [HEX]
        SN = Sector Number Register [HEX]
        CL = Cylinder Low Register [HEX]
        CH = Cylinder High Register [HEX]
        DH = Device/Head Register [HEX]
        DC = Device Command Register [HEX]
        ER = Error register [HEX]
        ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 4 occurred at disk power-on lifetime: 4449 hours (185 days + 9 hours)
  When the command that caused the error occurred, the device was in standby mode.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  c0 01 01 00 00 00 00

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  e0 03 01 00 00 00 00 00      01:24:05.835  STANDBY IMMEDIATE
  e7 03 01 00 00 00 00 00      01:24:04.943  FLUSH CACHE
  e0 03 01 00 00 00 00 00      01:23:14.226  STANDBY IMMEDIATE
  e7 03 01 00 00 00 00 00      01:23:13.111  FLUSH CACHE
  e0 03 01 00 08 00 00 00      01:10:39.704  STANDBY IMMEDIATE

Error 3 occurred at disk power-on lifetime: 4448 hours (185 days + 8 hours)
  When the command that caused the error occurred, the device was in standby mode.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  c0 01 01 00 00 00 00

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  e0 03 01 00 00 00 00 00      01:00:40.416  STANDBY IMMEDIATE
  e7 03 01 00 00 00 00 00      01:00:39.554  FLUSH CACHE
  e0 03 01 00 08 00 00 00      00:57:29.727  STANDBY IMMEDIATE
  e7 03 01 00 08 00 00 00      00:57:28.871  FLUSH CACHE
  ef 03 46 00 00 00 00 00      00:46:19.984  SET FEATURES [Set transfer mode]

Error 2 occurred at disk power-on lifetime: 4448 hours (185 days + 8 hours)
  When the command that caused the error occurred, the device was in standby mode.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  c0 01 01 00 00 00 00

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  e0 03 01 00 00 00 00 00      00:46:18.345  STANDBY IMMEDIATE
  e7 03 01 00 00 00 00 00      00:46:17.339  FLUSH CACHE
  e0 03 22 00 00 00 00 00      00:24:39.868  STANDBY IMMEDIATE
  e7 03 22 00 00 00 00 00      00:24:39.008  FLUSH CACHE
  e0 03 20 00 08 00 00 00      00:10:55.084  STANDBY IMMEDIATE

Error 1 occurred at disk power-on lifetime: 4447 hours (185 days + 7 hours)
  When the command that caused the error occurred, the device was in standby mode.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  c0 01 20 00 08 00 00

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  e0 03 20 00 08 00 00 00      00:00:38.572  STANDBY IMMEDIATE
  e7 03 20 00 08 00 00 00      00:00:37.607  FLUSH CACHE
  ef 03 46 00 00 00 00 00      00:00:01.226  SET FEATURES [Set transfer mode]
  ef 03 0c 00 00 00 00 00      00:00:01.225  SET FEATURES [Set transfer mode]
  ec 00 00 00 00 00 00 00      00:00:01.225  IDENTIFY DEVICE

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%      4444         -

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.

The above only provides legacy SMART information - try 'smartctl -x' for more

According to this page:

Very important parameters to check are, among the others, “Reallocated_Sector_Ct” and “Current_Pending_Sector”. In both cases if the RAW_VALUE is something other than 0, we should be very careful and start to backup data on the hard drive. The Reallocated_Sector_Ct is the count of sectors on the block device which cannot be used correctly.

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0032   098   098   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0

The raw values for both are 0, but they also have Old_age as their TYPE.

I’m thinking about returning the SSD if there’s nothing else I can do to get the missing usable space.

To be fair there is no good reason to buy used storage nowadays, especially that small SSD. It is like the price of a menu and one extra thing at Burger King.

1 Like

It’s been years since I last shopped for SSDs and I was really surprised that this one was being sold for less than $10 w/ free shipping and free returns.
The last time I bought a used SSD it was for a 120GB for $60.
After purchasing this Intel SSD I checked prices on Newegg and Amazon and I was once again surprised at the prices.
I’ll probably wait for Black Friday to buy an SSD.

There is updated firmware for the ASMedia controller: Legacy Storage Products Firmware. Which particular firmware would depend upon when the unit was shipped. The tools and procedures to update the firmware seem mainly Windows-centric, however.

Although this information Fixing Storage Adapters for Raspberry Pi via Firmware Updates isn’t directly relevant to Manjaro, but you might be able to glean something useful from it.

My guess is, however, that the ASM1053E controller is simply flaky; a common problem with cheap USB to SATA drives of the vintage. These units were often heralded as fast, and due to their general affordability, became quite popular. However, spend more than five minutes searching and many issues are soon revealed.

As disk capacities continued to grow, some cheaper vendors chose to simply mod an existing controller, give it another model iteration, and ship it. One of the possible side effects on some systems was incorrect detection of available space. I once had a drive with a jmicron controller that exhibited the same symptoms; there was ultimately no cure.

Whether this also applies to the OP’s drive, I can’t say, however, it seems very likely; given that not even creation of a new partition table seems to fix it.

I’ve plugged the SSD to an old computer directly to its motherboard and the results are the same unfortunately.
BIOS pic:


Live booted into Manjaro and the KDE Partition Manager shows this:

The package name was from memory - it turns out I remembered f3f where it is rightfully f3

As for the gui it was a typo in the link - the pamac build was correct - f3-qt - which in turn will pull f3.

I apologize for not proof reading my scribling

1 Like

I will be returning the SSD.
Thanks to all who offered their help.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.