can SD card fail this way?
by lvm_ from LinuxQuestions.org on (#5EFFQ)
Bona fide "32G" SD card which did successfully hold 29G of data suddenly started accepting no more than 4G. It happened when I tried to write partition image to it:
Code:# dd if=car.sd.sandisk.dd of=/dev/sdj1 bs=16384
dd: error writing '/dev/sdj1': No space left on device
248773+0 records in
248772+0 records out
4075892736 bytes (4.1 GB, 3.8 GiB) copied, 20.7289 s, 197 MB/sAlways fails at exactly the same place after 4075892736 bytes. When I tried to re-create filesystem it created a 4G one
Code:# /sbin/mkfs.vfat -v /dev/sdj1
mkfs.fat 4.1 (2017-01-24)
Auto-selecting FAT32 for large filesystem
/dev/sdj1 has 255 heads and 63 sectors per track,
hidden sectors 0x0000;
logical sector size is 512,
using 0xf8 media descriptor, with 7960728 sectors;
drive number 0x80;
filesystem has 2 32-bit FATs and 8 sectors per cluster.
FAT size is 7760 sectors, and provides 993147 clusters.
There are 32 reserved sectors.
Volume ID is cb2429a9, no volume label.even though partition is a 29G one
Code:Command (m for help): p
Disk /dev/sdj: 29 GiB, 31104958464 bytes, 60751872 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
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdj1 8192 60751871 60743680 29G c W95 FAT32 (LBA)
Ok, flash cards do fail - nothing unusual here, but two things make me suspicious: there are no messages in syslog about bad sectors and such - no errors at all, and the writing speed of the image is way too high - it is a Class 10 card good for 10 MB/sec, not 200. I am on ubuntu 18.04, and there is some background automount trickery goes on for usb devices. So... am I missing something?


Code:# dd if=car.sd.sandisk.dd of=/dev/sdj1 bs=16384
dd: error writing '/dev/sdj1': No space left on device
248773+0 records in
248772+0 records out
4075892736 bytes (4.1 GB, 3.8 GiB) copied, 20.7289 s, 197 MB/sAlways fails at exactly the same place after 4075892736 bytes. When I tried to re-create filesystem it created a 4G one
Code:# /sbin/mkfs.vfat -v /dev/sdj1
mkfs.fat 4.1 (2017-01-24)
Auto-selecting FAT32 for large filesystem
/dev/sdj1 has 255 heads and 63 sectors per track,
hidden sectors 0x0000;
logical sector size is 512,
using 0xf8 media descriptor, with 7960728 sectors;
drive number 0x80;
filesystem has 2 32-bit FATs and 8 sectors per cluster.
FAT size is 7760 sectors, and provides 993147 clusters.
There are 32 reserved sectors.
Volume ID is cb2429a9, no volume label.even though partition is a 29G one
Code:Command (m for help): p
Disk /dev/sdj: 29 GiB, 31104958464 bytes, 60751872 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
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdj1 8192 60751871 60743680 29G c W95 FAT32 (LBA)
Ok, flash cards do fail - nothing unusual here, but two things make me suspicious: there are no messages in syslog about bad sectors and such - no errors at all, and the writing speed of the image is way too high - it is a Class 10 card good for 10 MB/sec, not 200. I am on ubuntu 18.04, and there is some background automount trickery goes on for usb devices. So... am I missing something?