Unix Filesystem for harddisk for both FreeBSD + Linux?

Hello,

Needs to format the USB external harddisk... Go for UFS with newfs or something else?

I am looking for a filesystem that would be highly compatible with both Linux and FreeBSD. It should be widely portable, i.e. available on most installation. So that the external harddisk could read user data files well on both platforms.

Which FS may you recommend?

EXT4: nope, it uses FUSE
EXT3: same as above.
UFS1 and UFS2: Linux can read/write well, but it isnt widely available.
JFS: Good but not always be available without installing it
NTFS: ? (just kidding).
...
 
I use ext2 for such cases.
Its geekiness factor is low, but even Windows can support it (there is some software for it, tried it once long long ago when I still had a Windows license, and it worked).
 
UFS support on linux was always dim. I believe, it can be mounted only readonly. NTFS is my choose for pendrives. And you get Windows support for free.
 
NTFS is made by Microsoft ... :(

ZFS is of course very good, but it is not by default on Linux. You need to install then ZFS-FUSE, and it requires FUSE. This is terrible for kernel compiling.

Furthermose, EXT2 is not by default on FreeBSD.

So finally, Unix ??
There is no single compatible FS, available by default on both NetBSD, FreeBSD, or Linux. Even any single FS. Can you really believe it?
 
My sometimes heavy handed approach to get data from one system to an other is using tar on a raw device. That is not "interactive" but gets the job done.
 
Sensible suggestion: Connect the external disk to an extra computer (might be as small as a Raspberry Pi), and run a file server (like NFS) on it. Then you don't need to switch file systems.
Crazy suggestion: Run a small virtual machine on your computer; in that VM, run always the same OS, and use it as a "disk controller" which exports the disk via NFS. Setting this up (with different hosts for the VM) would be a bit of extra work, but perhaps fun.
 
  • Thanks
Reactions: Oko
Sensible suggestion: Connect the external disk to an extra computer (might be as small as a Raspberry Pi), and run a file server (like NFS) on it. Then you don't need to switch file systems.
Crazy suggestion: Run a small virtual machine on your computer; in that VM, run always the same OS, and use it as a "disk controller" which exports the disk via NFS. Setting this up (with different hosts for the VM) would be a bit of extra work, but perhaps fun.

I did, but after a power down., then again put back the nfs server, mount, and again copy ... (3 Tb is long). So, better to have a portable disk that can be either plug on Linux or BSD.

I wanted to have a good FS, without risk for data. EXT3 is definitely reliable. UFS2 too. Both are default FS, but wont be supported by default by Unix on both at the same time. (I mean of course read and write to work on it).

Better to have an image that does it... What about squashfs if no single FS is compatible for both linux / bsd ?
 
Sensible suggestion: Connect the external disk to an extra computer (might be as small as a Raspberry Pi), and run a file server (like NFS) on it. Then you don't need to switch file systems.

I second this. If this is a custom HD case, you can even place the Pi inside the case. It powers on when you plug it in. Run NFS and Samba on it, then it's compatible with pretty much everything. As a plus, you can attach it to a network and access it like that.
 
EXT2 is, and limited support for EXT3 too (IIRC read-only). It's EXT4 that is not supported natively.
Time goes on. According to ext2fs(5) on FreeBSD 11.1-RELEASE:
DESCRIPTION
The ext2fs driver will permit the FreeBSD kernel to access ext2, ext3,
and ext4 file systems. The ext4 support is read-only.

So it seems to me that the greatest common denominator between FreeBSD and Linux is EXT3.
 
how to use ext3 well on a raspberry pi ? I havent found the package in freebsd ...
It's in the base install.
kldload ext2fs Then mount.

Code:
root@E6420:~ # kldload ext2fs
root@E6420:~ # ls /dev/da*
/dev/da0    /dev/da0s1
root@E6420:~ # mount -t ext2fs /dev/da0s1 /mnt
root@E6420:~ # file -s /dev/da0s1
/dev/da0s1: Linux rev 1.0 ext3 filesystem data, UUID=de3dcbc9-a5c5-472a-9395-5756f84c26d6 (needs journal recovery) (large files)
I am using it in R+W mode and it works.
 
The most suitable FS for interchange between Linux and FreeBSD (only the two) is ZFS. For other BSD or Unix, it didn't exist. You must use Fuse, I prefer NTFS 3g for this situation.
 
You may also use encrypted volume with VERACRYPT (which is in Ports tree/packages) which should also work between FreeBSD and Linux.
 
The most suitable FS for interchange between Linux and FreeBSD (only the two) is ZFS. For other BSD or Unix, it didn't exist.

Actually it's FreeBSD, Linux and illumos - so I'd say its pretty much universal for all relevant OSes.
We're using ZFS on all our FreeBSD, smartOS and the 2 remaining Linux hosts here in the infrastructure, which works like a charm and simplifies many things, especially backups, A LOT. Back when one of my servers at home still ran debian and I had an old debian install on my laptop, I've also used ZFS either locally or on USB-Drives to transfer data between those.
TBH I wouldn't set up a linux host to boot from ZFS any more - it's just a pain and far from production-safe. But for transferring data on external drives via sneakernet between those OSes there's just nothing on this planet that can beat ZFS.
 
Actually it's FreeBSD, Linux and illumos - so I'd say its pretty much universal for all relevant OSes.
We're using ZFS on all our FreeBSD, smartOS and the 2 remaining Linux hosts here in the infrastructure, which works like a charm and simplifies many things, especially backups, A LOT. Back when one of my servers at home still ran debian and I had an old debian install on my laptop, I've also used ZFS either locally or on USB-Drives to transfer data between those.
TBH I wouldn't set up a linux host to boot from ZFS any more - it's just a pain and far from production-safe. But for transferring data on external drives via sneakernet between those OSes there's just nothing on this planet that can beat ZFS.
OpenBSD, NetBSD, Some Proprietary Unix... has ZFS? How Universal!
 
IMHO, ZFS is not the file system of choice on a portable disk drive.

The OP is looking for an appropriate files system for his USB disk for exchanging data between Linux and FreeBSD, and in another post he revealed that he is going to use this on a Raspberry PI.

You are suggesting the Zetabyte (1000^4 = 1000,000,000,000 GB) File System for this application, which leaves the RPI with 640 kB of memory for the rest of the operations -- I know, "No one will need more than 637 kB of memory ..." -- seriously??
 
IMHO, ZFS is not the file system of choice on a portable disk drive.
What is wrong with ZFS on USB drive? I use ZFS on 4 TB 2.5 USB drives and it works like a charm, it even has GELI below for the security ... and Yes, I use it also on Raspberry Pi 2.

Besicdes, ZFS provides data consistency that NTFS/FAT will not provide.
 
What is wrong with ZFS on USB drive? I use ZFS on 4 TB 2.5 USB drives and it works like a charm, it even has GELI below for the security ... and Yes, I use it also on Raspberry Pi 2.

Besicdes, ZFS provides data consistency that NTFS/FAT will not provide.
I've never have usage like you. But on Linux Btrfs (ZFS equivalent on Linux) on USB Disk is a nightmare :mad:
 
Btrfs on USB Disk is a nightmare :mad:

I corrected that sentence for you ;)
A FS that wasn't designed as being production safe from the beginning and whose devs plain out refuse to learn from errors of previous filesystems, should NEVER be trusted to hold any data. It's nothing more than an object lesson for the NIH syndrome.
 
  • Thanks
Reactions: Oko
zfs maybe, but it use fuse to compile on linux :(

how to use ext3 well on a raspberry pi ? I havent found the package in freebsd ...

I'm pretty sure that nowadays ZFS can be supported as a kernel module in Linux.
I'm not sure if most Linux distros have that as a package or support it with a modified kernel compilation, but I'm sure that Manjaro Linux supports ZFS as kernel module installing extra packages
 
Back
Top