Ext2, ext3 and ext4 support on Haiku

Hello. I’m planning to create a new partition to share data (mp3, movies, etc.) between Haiku and Linux.

I’m not sure about the level of support of the different ext2, ext3 and ext4 filesystems in Haiku. What format is recomended in this case?

Thanks!

Haiku has support for ext2. To which ext3 is AFAIK somewhat backward compatible. It does provide read/write, but I had corruption issues in the past, so I only mount my ext3 partitions read-only in Haiku and copy stuff over from Haiku when I’m in Linux. Most Linuxes can mount BFS read-only out of the box.

1 Like

Thanks Humdinger. Then, I guess the best option is ext2, for best compatibility from both S.O.

I think actually our ext2 driver got most of the ext3 features by now. The write support for ext3 was added back in GSoC 2010. It also supports some of the ext4 features.
If you plan to write to the disk, I would suggest going with ext3 as you get a journal which can avoid many cases of filesystem corruptions (because of power cuts or KDL during a write, for example).

2 Likes

there is a bfs driver for linux out there.

I use ext4 for debian linux, bfs for haiku and ntfs for windows xp. Haiku reads ext4 (how writes now, do not know) and ntfs (writes very slowly), linux reads bfs, reads and writes ntfs. Some times, also have some fat32 pratition (on hdd or stick). There is no ideal variant.

the problem is you are loosing all file attributes ob haiku file copy them on a non bfs partition.

if you want to have a partiton who can be write and read from all youe systems use a fat partition an store every haiku file into a zip file before you copy them on it.

Most filesystems have support for attributes. Haiku can read and write them just fine on ext2/3/4 (with the attribute size limits of these filesystems), as well as ReiserFS and even NFS, for example.
FAT doesn’t support extended attributes, of course.
NTFS can do it, but I do not think we implemented it there. I could be wrong, I rarely use NTFS.

There are some compatibility problems when doing unusual stuff, such as copy from Haiku to an ext2 partition, then using Linux to an SMB share, then recovering the files directly from the shared NTFS drive and putting them back on your Haiku install. mmu_man wrote a paper about such problems. However, for simple cases of just sharing data between two systems, I don’t think you are at much risk here.

2 Likes

Thanks to everyone :slight_smile: In my case, I would use it to both read and write files (for example, organizing mp3 collections, running MS-DOS apps (with Dosbox), saving documents etc., from both systems: Haiku and Linux.

I’m not planning to using the extended attributes from Haiku, because I need the most compatibility between both systems. I would like choose the more “secure” option, in the meaning of avoid data corruption.

I used to happily mount my (apparently ext2) Ubuntu partition read/write, but a couple of years ago something screwed up in writing from Haiku, and after that Ubuntu was completely hosed! Severely hanicapped me for some urgent work I needed to do at the time. I eventually recovered most of the partition, but from then on the mount has been read-only! If I need to pass something the other way I do it from Linux.

Ditto, I trashed my /home ext4 partition a few years ago, so I no longer mount it read/write from haiku. I think the linux bfs driver is also read only (the one that comes with most linux systems anyway, I think there might be an alternative?)

You have been warned!

It works with EXT2/3 on my machine when I tried it with flash drives, but EXT4 was not recognized by Haiku. On the other side on Debian I can access the Haiku hard drive as read only without any additional software. I just mounted it in whatever the default LXDE file manager is. I have a 500GB external USB hard drive that I use to share media between computers running OS X Sierra, Windows XP/Vista/7, Debian Stretch, Android Nougat, and Haiku OS. I’ve found that NTFS is the best option for such a thing.