Re: zeroing out part of an SDcard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PNY SDHC card, 16GB - pretty generic. In this case fstrim did work (pfft yeah whatever it didn't the last time I tried it), and so did mkfs.btrfs but they work differently according to strace.

fstrim issues:
ioctl(3, FITRIM, 0x7fffbf6b87e0)        = 0

The result is
write(1, "/mnt/: 13.9 MiB (14598144 bytes)"…, 41/mnt/: 13.9 MiB (14598144 bytes) trimmed

And this is roughly the amount of data deleted during the current mount. It's a 13GB partition, so fstrim is definitely not going to assure you of erasing previously unerased blocks. Just what the fs is aware of having been recently deleted. LBA's with known data in them still had data in them after fstrim, even though they were long ago deleted files from a completely different fs volume.

mkfs.btrfs issues:
write(2, "Performing full device TRIM (13."..., 43Performing full device TRIM (13.72GiB) ...
) = 43
ioctl(3, BLKDISCARD, {0, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {40000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {80000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {c0000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {100000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {140000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {180000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {1c0000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {200000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {240000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {280000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {2c0000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {300000000, 7fff920ee4a0}) = 0
ioctl(3, BLKDISCARD, {340000000, 7fff920ee4a0}) = 0

And this obliterated everything on that partition. A dd read came up with 99.99% zeros, the rest of it was just the btrfs superblocks.

I wasn't successful using scsi kernel tracing to find out what commands are actually sent to the sdcard for either of these. The trace_pipe file only showed the ssd events, not for /dev/mmcblk0 and I'm not sure how to trace it. 

But based on available info I'm pretty sure it's not actually getting issued TRIM in the ATA sense, but it's probably getting the SD Card equivalent which seems to be the ERASE_* set of commands.


Chris Murphy
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux