Special formatting tools for SD cards & flash drives???
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Special formatting tools for SD cards & flash drives???
I was looking at the web site of a vendor from whom I have purchased these solid state storage devices in the past. I need to order some more for backup/archive purposes. While there I found a bloc post "Are you formatting your SD Cards?" which recommended a special formatting tool from sdcard.org. Of course it is only available on Windoze and Mac. It is supposed to make the card perform better by optimizing the format.
I searched for info on formatting these devices on Linux and found a lot of pages explaining how to use the normal Linux formatting tools. I generally use gnome disk utility and create an encrypted file system formatted as ext4.
man mkfs.ext4 shows a range of options which can be varied such as cluster size, reserved block percentage, number of inodes etc. However, I do not find any guidance based on the species of the storage device. Years ago one would worry about aligning sectors and cylinders etc. for mechanical drives. I do not believe there are such concerns for solid state devices.
The question is... Are special considerations, options, parameters etc. required to "properly" format SD cards (or flash drives)?
AFAIK there is no special formatting needed for flash drives. Linux does have options to change certain parts of the format, but I have never felt the need to even try anything other than the default ext4 criteria. Also, as purchased, most of the flash drives actually have a vfat format. Although many people change them to match the native format of their systems whether that is ntfs, hfs, ext4, or whatever, many also leave them with the vfat format.
Another consideration is that the makers almost always try to optimize performance in the internal controller of the device and changing the formatting always has a chance of interfering with performance.
Using f2fs on flash drives can be problematic, because that filesystem is not recognized by anything other than Linux. For instance, a drive formatted as f2fs is not recognized by my scanner/printer. It only knows about FAT filesystems. I do have an always-mounted SD card that holds system backups formatted as f2fs, and that seems to work well. A general-purpose flash drive that will be connected to multiple devices isn't a good candidate, however. Horses for courses, and all that. Also, anyone selling something wants customers to believe that their product is better than any others, whether it is or not. Caveat emptor.
Ah ok, makes sense - I don't own nor user flash drives so wasn't sure - just offered that as a suggestion because I have seen one or two threads here suggesting it.
Thanks folks. I have a vague recollection of using some sort of special program MANY years ago. No doubt with some version of Windows. I have never had an issue formatting with Linux except when the device is defective or bogus. I purchased a 64 GB Sandisk microSD card on evilbay a couple of years back. It would not format. Sandisk tech support had me send them a picture of the device and they declared it a knockoff. How I don't know. I did not have a macro lens and there was not much detail in the pic. evilbay gave me a refund and kicked the seller off the site.
I am playing with gnome disk utility and a 16 GB flash drive. Custom Format has an option for "F2FS - Flash Storage Linux Filesystem" but it is greyed out. Perhaps it is not supported on CentOS 7? If I get motivated I may try from the command line
Thanks again,
Ken
p.s. Update - I found a package f2fs-tools and installed it. gnome disk utility now offers to format f2fs. However, it fails to mount the device and tells me "Filesystem type f2fs not configured in the kernel." I do not think I will go any further down this road.
Last edited by taylorkh; 10-01-2020 at 07:04 PM.
Reason: typo
From what little I know, f2fs was designed for use on phones, not USB flash drives. It hasn't been widely adopted even on phones, however, and only a few makes and models use it. I'm using it mostly as a test, out of curiosity.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.