Other How much mature is XFS today under FreeBSD ?

Hello.

I was looking for a good fs that allows to share files beetween Linux and FreeBSD without risking to lose some important data and I found XFS on this old thread :


I've googled a little and I found that it also has the write support for both the OSes. Someone knows if it is stable or not ? It is more stable than EXT4 or NTFS ? Because actually,after having had some data loss,I stopped mounting those file systems while using FreeBSD. I want use it to store data,even files bigger than 200GB each one.

Just to refresh some important informations buried in the past,this is how it can / could be used :

From here : https://forums.freebsd.org/threads/xfs-support.61449/post-362924

I just tested this myself on FreeBSD 11.1 and it's working like a charm. The steps I took was these:
  1. Install fusefs-lkl with pkg install fusefs-lkl
  2. Load the fuse kernel module with kldload fuse
    1. Optionally add fuse_load="YES" to /boot/loader.conf
  3. Mount the drive with lklfuse -o type=xfs /dev/da0s1 /mnt (change da0s1 to your own drive)
 
Note that you can only use it for exchanging files. You can't use it to boot FreeBSD (only UFS and ZFS are supported).
 
So :
  1. Install fusefs-lkl with : pkg install fusefs-lkl
  2. Load the fuse kernel module with : kldload fusefs OR if you want to add persistence :
  3. Add fusefs_load="YES" to /boot/loader.conf OR /etc/rc.conf
  4. Mount the drive with : lklfuse -o type=xfs /dev/da0s1 /mnt/da0s1 (change da0s1 to your own drive)
 
I want to use it only for exchanging files between Linux and FreeBSD because it seems to be less tricky than ZFS...

I doubt that given that you have to go fuse. And performance will probably be really bad in FreeBSD.

In ZFS you only have to make sure not to use features (when creating the pool) that the other OS doesn't understand (yet).

As for stability I have never seen anybody using the fuse version of XFS. It is possibly not well-exercised.
 
I‘d prefer loading fuse via rc.conf.
I already rendered a system unbootable by having a problem with fuse in loader.conf.

As for the filesystem, what about exfat? I think I recall it working fine with fuse.
 
It does not work :

mario@marietto:/usr/home/marietto/Desktop # lklfuse -o type=xfs /dev/da4p5 /mnt/da4p5
mario@marietto:/usr/home/marietto/Desktop # cd /mnt/da4p5
mario@marietto:/mnt/da4p5 # ls
ls: .: Not a directory
 
This is the reason why I said that zfs is tricky and that I wanted use xfs :


point is that there are a lot of experienced users that have some troubles to admit that ZFS is tricky for most hobbyst users. That's only because they love ZFS and they learned how to use it and maybe they pretend that everyone think and do the same.
 
Better use ZFS. This FS is native in FreeBSD and the implementation is same in the GNU/Linux (OpenZFS).
Indeed. From linux I could write to both FreeBSD & OpenSolaris QEMU VM's with root on ZFS.

It's as easy as doing:

Bash:
sudo modprobe nbd
sudo qemu-nbd --connect=/dev/nbd0 /var/lib/libvirt/images/freebsd.qcow2
sudo modprobe -v zfs
sudo zpool import -R /mnt zroot
...
sudo zfs umount -a
sudo zpool export zroot
sudo modprobe -rv zfs
sudo qemu-nbd --disconnect /dev/nbd0
sudo modprobe -rv nbd
 
I used ext2fs to mount an ext4 drive and copied 120gb in less than half an hour with rsync
havent tried copying files from freebsd to ext4 but it useful to mount linux drives

i wouldnt use zfs with freebsd and linux,
ubuntu is the linux distro that has zfs out of the box and it doesnt support full disk encryption yet

i had a zpool get corrupted a few years ago on an external usb drive trying to mount on linux and freebsd

your best bet would be to take the file system out of the equation by either using syncthing between 2 computers
or if you have a 3rd computer set it up as a file server
 
Well, good enough file systems have already been mentioned - Ext4, ZFS, NTFS and so on.

The trick is to calculate the MD5 hash for every file after transfer, and compare these between the two HDDs.

Or creating a RAID1-ZFS array on the HDDs. Or to create a RAID1 on the Linux side with self healing capabilities, and expose that via NFS to FreeBSD.
 
i had a zpool get corrupted a few years ago on an external usb drive trying to mount on linux and freebsd
At that time, maybe the FreeBSD and Linux implementations were different, but now both OSes use OpenZFS (2.2 on FreeBSD 14).

As long as you use the same version on both systems you will have no problems.
 
Back
Top