Solved No space left on device

… 2TB M.2 SSD in a small case connected by a USB-C cable …

… ensure the device is not faulty …

In my case, with a faulty new SSD:

I recently dealt with a new drive (a new notebook) where Windows installed, repeatedly, without error but failed during use for the end user. Sustained writes with sysutils/stressdisk helped to reveal that the drive was faulty. I might have written about this a few weeks/months ago.

tl;dr for the test I gave the entire device (not a partition) to UFS for the stress test.
 
I hope you don't have a 64GB MMC inside a USB 2.0 enclosure sold to you as 2TB SSD.
What is the brand of the disk?
Can you reformat it and try to fill the disk again to see if it going to fail again at 64GB?
If it fail again can you disassemble it and see what is actually inside ?

You can also try to create a small partition at the end of the disk and try to write some data to it. If it's 64GB flash it will fail to write/read anything above it.

View: https://www.youtube.com/watch?v=CbA1QtkQrFA
 
How do I eliminate the possibility of 'bad disk'.
You can not. Disks can and will fail spontaneously. Sometimes they give explicit warnings (if you have software running that looks at their PFA = predictive fault analysis, which can be done on SCSI, it's harder on SATA). Sometimes smartctl data will give you a hint or clue to that might be failing. But often enough, they fail without prior warning.

Furthermore, a significant fraction of all "disk failures" are in reality failures of the environment the disk is in, most commonly data and power cables. Many of these errors, the disk doesn't even have a record of, so looking at smartctl is not likely to give you information.

In your situation, just stop worrying about "bad disk", and try to make your workflows more reliable, so there are fewer human errors.
 
I hope you don't have a 64GB MMC inside a USB 2.0 enclosure sold to you as 2TB SSD.
What is the brand of the disk?
Can you reformat it and try to fill the disk again to see if it going to fail again at 64GB?
If it fail again can you disassemble it and see what is actually inside ?
When it arrived the packaging said 'Hard Drive Case (M.2)' so I thought I had been cheated but when plugged in gpart identified it as a 2TB device.
It's a noname Chinese device and it appears to be sealed, and I can't see an easy way to open it up.

dmesg does not identify the device but lsusb identifies it as an Integrated Technology Express Chipsbank CBM2199 Flash Drive

dmesg says the secondary GPT table is corrupt or invalid.
You can also try to create a small partition at the end of the disk and try to write some data to it. If it's 64GB flash it will fail to write/read anything above it.

View: https://www.youtube.com/watch?v=CbA1QtkQrFA

Thanks, I'll try this.
 
You can also try to create a small partition at the end of the disk and try to write some data to it. If it's 64GB flash it will fail to write/read anything above it.

View: https://www.youtube.com/watch?v=CbA1QtkQrFA

I've just had a look at the video and mine looks exactly like the one shown, except it doesn't seem easy to pry open.

It could well be a 64GB flash drive since I managed to copy 62GB before it ran out of space.
 
No space left on device means the 2TB device you bought is really a 64GB device, and you have used it all up!
 
… It could well be a 64GB flash drive since I managed to copy 62GB before it ran out of space. …

I should have mentioned, in my case with the truly failing drive there was no sense of it running out of space with use of stressdisk. Instead, the OS behaved as if there had been disconnection of a device that's not designed for disconnection (i.e., an endless hang).
 
No space left on device means the 2TB device you bought is really a 64GB device, and you have used it all up!
Actually, there is a cleaner test to do that. Use camcontrol (or a SCSI "read capacity" command through sgutils) to ask the device itself what its capacity is. If the capacity advertises itself as 64GiB, you are done. If the capacity advertises itself as 2TiB, it is pretty easy to test the actual capacity: Write a small script or program that writes 65 GiB worth of random sectors (each sector with different data) to the device, in random places spread over the whole 2TiB address space. Mark in each sector's data what sector number it was written to. Remember (for example in a relatively small file) where you wrote them. After writing them, read them all back. If all the 65GiB's worth of sectors are readable and correct, then you know that your device has more than 64GiB worth of capacity. And since you wrote random data, any dedup or compression trick won't help the device. You can use this trick to measure the actual capacity of a device, by interleaving reads and writes. I used to have a pretty fancy program that did this (and lots of other performance/functionality tests), but the source code is with an ex-employer.
 
Back
Top