{"id":3653,"date":"2024-06-11T01:17:06","date_gmt":"2024-06-11T01:17:06","guid":{"rendered":"https:\/\/voodoo.business\/?p=3653"},"modified":"2024-06-11T01:19:09","modified_gmt":"2024-06-11T01:19:09","slug":"sd-cards-trim-command","status":"publish","type":"post","link":"https:\/\/www.voodoo.business\/blog\/2024\/06\/11\/sd-cards-trim-command\/","title":{"rendered":"SD cards trim command"},"content":{"rendered":"\n<p>Many modern SD cards support the trim command () in Linux, the problem is that not many SD card readers (Mostly USB) do<\/p>\n\n\n\n<p>So running () on a mounted card will usually return an error such as<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">fstrim -v \/hds\/usb<br>fstrim: \/hds\/usb: the discard operation is not supported<\/pre>\n\n\n\n<p>The command &#8220;lsblk &#8211;discard \/dev\/sdf&#8221; should tell you whether your SD card\/adapter combination support trim right now, so the failure of the fstrim  command above can be predicted in advance with this command<\/p>\n\n\n\n<p>Now, assuming your SD card is not mounted, and you need to format it, Will formatting restore the speed ? unfortunately not, to restore the speed, before formatting your SD card, you might want to run the <code>blkdiscard<\/code> function, mind you, this command will delete all your data !<\/p>\n\n\n\n<p>blkdiscard -f \/dev\/sdf<\/p>\n\n\n\n<p>but even that might not work<\/p>\n\n\n\n<p>blkdiscard: Operation forced, data will be lost!<br>blkdiscard: \/dev\/sdf: BLKDISCARD ioctl failed: Operation not supported<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many modern SD cards support the trim command () in Linux, the problem is that not many SD card readers (Mostly USB) do So running () on a mounted card will usually return an error such as fstrim -v \/hds\/usbfstrim: \/hds\/usb: the discard operation is not supported The command &#8220;lsblk &#8211;discard \/dev\/sdf&#8221; should tell you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3653","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/3653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/comments?post=3653"}],"version-history":[{"count":2,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/3653\/revisions"}],"predecessor-version":[{"id":3655,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/3653\/revisions\/3655"}],"wp:attachment":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/media?parent=3653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/categories?post=3653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/tags?post=3653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}