Solved Accessing large amounts of data from Linux filesystem in FreeBSD

I posted a message here a week or three ago saying that after many unsuccessful attempts to use FreeBSD (always uncountering a show-stopping problem), 12.1 seemed to
finally have done the job. I've used system without major problems for several weeks now and it's been a pleasure in many ways.

But ... I've now hit a major snag and before I throw up my hands and give up, I thought I'd discuss it here. I have a large amount of archived data on two USB drives. The data is about 250GB in size and the data is stored in an XFS filesystem on one disk and an EXT4 filesystem on the other. I need access to that data from FreeBSD. FreeBSD, in the Handbook, claims to support mounting EXT4 filesystems. It is not so. See Bug 214479. It's worse than this. I am unable to mount a newly-formatted exfat filesystem on a USB drive (formatted on a Windows 10 system), or an ext2 filesystem. The only USB-resident filesystems I've succeeded in mounting are UFS filesystems created by FreeBSD. And yes, I've tried newfs-ing filesystems in the partitions that previously contained rejected ext2 and exfat filesystem just to be sure there wasn't a hardware problem with the USB drive(s) I was using. There isn't. The error messages I get when attempting to mount vary: No such file or directory or operation not permitted, etc.

To use this system, I need the ability to access my archived files. If I can't do that, I can't use the system; simple as that. This should be routine -- just read The Handbook -- but that's just not the case because it appears that the support for mounting the filesystems mentioned, at least on USB drives, is buggy. NFS is a possbility, I suppose, but I'm not enthusiastic about it for a variety of reasons. If anyone has a bright idea, I'd love to hear it. Thanks.
 
I should add that the subject this thread is not quite accurate -- copying the data isn't necessary; I just need access to it.
 
https://www.freebsd.org/doc/handbook/filesystems-linux.html

For ext4, you need ext2fs. This driver can also be used to access ext3 and ext4 file systems. I've not used a Linux file system recently, but the last time I did, the READ access worked ok.

Code:
# kldload ext2fs

Use gpart to see your hard disk info.
Code:
# gpart show

"da0p1" is an example. Use what you see for your USB drive partition, and then mount it.
Code:
# mount -t ext2fs /dev/da0p1 /mnt


For XFS, refer to https://forums.FreeBSD.org/threads/xfs-support.61449/post-362924
 
Thanks for the help. A couple of days ago, did what you suggest (which is also in the Handbook "Mount Linux File Systems" section, which I read) to mount my ext4 file-system. It did not work. When I came back to it today, I forgot to load the kernel module, which explains my lack of success today. My error. I'm not sure why my previous attempt failed, because that one I did by the book. Probably a typo, but I'll never know for sure. Anyway, repeating that attempt as you and the Handbook suggest did the trick. Thanks for helping to get me unconfused and for avoiding abandoning this system, which is otherwise working very well for me.
 
Sure. I'm aware of fuse and may resort to it if normal mounting doesn't do the job. I will also probably create a UFS filesystem on another 1TB USB drive I have and copy the archived files to that. So if I can get through that (it's about 250GB), I won't need the ext4 support much.
 
If you don't require to write on those disks I recommend to mount these archive drives as read-only under FreeBSD. I've not used Linux FS under FreeBSD for some time but I do remember occasional issues before.
"Archive disks" sounds important enough for me to mention this. And/or make sure those are not your only backups.
 
If you don't require to write on those disks I recommend to mount these archive drives as read-only under FreeBSD. I've not used Linux FS under FreeBSD for some time but I do remember occasional issues before.
"Archive disks" sounds important enough for me to mention this. And/or make sure those are not your only backups.

Yes, thanks for the heads-up, but I'm an old (literally) hand at this and very careful. I did mount the ext4 disk read-only and promptly copied it to a UFS2 file-system on another USB drive. That's what precipitated all the discussion this morning about how df behaves when a UFS file-system gets nearly full. And, as you wisely suggest, I have always maintained more than one copy of the backup/archive disk, including one off-site.

And your comment about remembering "occasional issues before" is consistent with my experience. In one of my earliest attempts to use FreeBSD many years ago, I tried to do exactly what I've done here -- use a Linux-generated backup/archive disk on a FreeBSD system. I encountered a bug in the ext2 driver that killed the system. I reported the problem and it got fixed very quickly (as I recall the person working on it sent me a patch and I built a kernel). So I'm aware of the dangers of relatively-little-used corners of the system being good candidates for bugs.
 
Back
Top