Other With hat filesystem can I put more data?

I want to use a USB stick after all for reading. Perhaps also for booting from it, but not necessarily.

With what filesystem I can put more data in it? MsDOS? UFS2? ZFS?

And with what FS is it faster?
 
I use F2FS on my sticks, not sure if FreeBSD can handle it, though. That said, nowadays with some sort of internet access practically everywhere my USB sticks are retired. I can SSH into my computers and get what I want any time.
 
Linux seems to be able to deal with UFS2, an advantage over FFS and UFS1.

ZFS is realy not an alternative, I have only 250 MB Ram and 800 MHZ geode
processor.

With 2 FS I have not always the best experience, but is perhaps the most portable.

There is a lot of file systems, but it is still difficult to decide what to use.
 
If you don’t plan to use the disk with other operating systems besides FreeBSD, then it’s probably best to use UFS. If you need to optimize for space, then you should use a sensible value for newfs(8)-i option when creating the file system, in order not to waste space for unused inode data. However, keep in mind that the number of inodes places a hard limit on the number of files that you can store in the file system.

If you want to use the USB stick for exchanging data with other operating systems, then it depends. The common file system that is most widely supported is probably FAT32 (a.k.a. MSDOSFS). However, it has some limitations, e.g. files cannot exceed 4 GB. The next candidate would be NTFS which is also widely supported, including FreeBSD (I recommend to use the NTFS FUSE module from the ports collection). If you only need to exchange data with Linux, then EXT2FS would be another option.

Regarding your question about speed: The file system is probably meaningless, because the limiting factor will be the flash cells of your USB memory sticks. This is especially true for USB2 sticks that max out at about 25 MB/s, no matter what file system you use. (I assume that your 800 MHz Geode machine does not support USB3. I had a Geode machine myself in the previous century.)
 
Linux seems to be able to deal with UFS2, an advantage over FFS and UFS1.

ZFS is realy not an alternative, I have only 250 MB Ram and 800 MHZ geode
processor.

With 2 FS I have not always the best experience, but is perhaps the most portable.

There is a lot of file systems, but it is still difficult to decide what to use.

Most Linux distributions (including Arch, Debian, Ubuntu) have read support for UFS but write is disabled in the kernel. You have to build a custom kernel to use the write capability, which is definitely not convenient. Some distributions (including openSUSE) have it enabled in their default kernel, but still, if you want your stick to be usable on most computers (including Windows and MacOS ones), don't use UFS, neither ZFS.

FAT (msdosfs) is probably the worst file system still used today, but (and because) basically any OS can read/write it out of the box.

exFAT is a somewhat better replacement for FAT, which is also natively supported on Windows, MacOS and Linux (5.4+) but needs a FUSE module from ports to work on FreeBSD.

Some people use NTFS for that purpose, it can work on most systems, it is journaled (can be both an advantage and a disadvantage) but still requires FUSE on anything other than Windows.

Since I use USB sticks mostly for transferring files from a computer to another, which often have different operating systems, and I don't want journaling, all of mine are formatted with exFAT.
 
FAT (msdosfs) is probably the worst file system still used today, but (and because) basically any OS can read/write it out of the box.
My problem is not the file size limitation, but (1) that from time to time it makes capital letters from
small letters in file names, and (2) that rsync to it does not work well due to the metadata.

I do not want to use fuse or something exrta, all must be minimalistic. I think I will end using ufs. I have no
Idea how to select the parameters, something new to learn.

It is mainly a read only stick, I do not need journaling.

But the original question is not answered: where I can put more data, in the MSDOS or UFS formatted stick?
 
But the original question is not answered: where I can put more data, in the MSDOS or UFS formatted stick?
I mentioned the -i option of newfs(8).

Another possibility is to use compression (gzip, bzip2, xz).

By the way, you can also use USB memory sticks without creating a file system on them. For example, you can write a tar(1) or cpio(1) archive to it:
Code:
tar czf /dev/da0 mydirectory
That will write the contents of mydirectory (recursively) to the USB stick connected to /dev/da0. The stick does not have to be formatted, and it must not be mounted. Beware, any previous data on it will be lost! The data will be gzip-compressed (z option).

To list the contents on the stick (first command is terse, second command is verbose):
Code:
tar tf /dev/da0
tar tvf /dev/da0

To retrieve a certain file:
Code:
tar xf /dev/da0 mydirectory/somefile

To retrieve everything:
Code:
tar xf /dev/da0
 
Another possibility is to use compression (gzip, bzip2, xz).

By the way, you can also use USB memory sticks without creating a file system on them.
Neither compression nor tar is a possibility in my case. The first due to 800Mhz, 250MB,
the second because software needs to "open" and "read" the file, although not "write".
Or is there a way to mount readonly a tar archive? And also in that case I would like the
flexibility of a file system.
 
Neither compression nor tar is a possibility in my case. The first due to 800Mhz, 250MB,
the second because software needs to "open" and "read" the file, although not "write".
Or is there a way to mount readonly a tar archive? And also in that case I would like the
flexibility of a file system.
You might want to have a look at geom_uzip(4).
 
Neither compression nor tar is a possibility in my case. The first due to 800Mhz, 250MB,
the second because software needs to "open" and "read" the file, although not "write".
Or is there a way to mount readonly a tar archive? And also in that case I would like the
flexibility of a file system.
Well, tar archives can only be read sequentially, there is no random access. So, if you need this, you cannot use an archive file format, but you need a real file system.

As far as compression is concerned, you might use one of the lower gzip compression levels. For example, level 2 is fairly fast and doesn’t require much memory, but still compresses fairly good (depending of the kind of files, of course). The default gzip level is 5.

Without compression and similar technologies (deduplication, for example), there is no way you can magically increase the capacity of a storage medium. You might tune the balance between the space used for data and metadata, but I’ve already mentioned this two times. See the newfs(8) manual page.
 
Back
Top