Ext4 on FreeBSD

General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

Ext4 on FreeBSD

Postby guillaje » 06 Oct 2011, 12:41

Hello,

I'm a Linux user, quite new to FreeBSD.
I recently installed FreeBSD 8.2-RELEASE amd64 as a backup server. These backups consist of the synchronisation between SAN snapshots of the FS I want to backup and ZFS filesytems.

In order to mount my Linux FS, I installed the port of e2fsprog, and it works great for EXT2/3, but not for EXT4:

I can fsck it :
Code: Select all
endor# fsck_ext2fs /dev/da1s2
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/da1s2: 63569/657072 files (0.2% non-contiguous), 498732/2624256 blocks


But I can't mount it:
Code: Select all
endor# mount -t ext2fs /dev/da1s2 /mnt
mount: /dev/da1s2 : Invalid argument


In dmesg:
Code: Select all
WARNING: mount of da1s2 denied due to unsupported optional features


I tried to deactivate some ext4 features of this fs on a Debian box, but I can't disable all of them:
Code: Select all
root@xen0adm1:~# tune2fs -O ^flex_bg /dev/iscsi/xen0adm1-2011-09-30-14p2
tune2fs 1.41.12 (17-May-2010)
Clearing the flex_bg flag would cause the the filesystem to be
inconsistent.
root@xen0adm1:~# tune2fs -O ^uninit_bg /dev/iscsi/xen0adm1-2011-09-30-14p2
tune2fs 1.41.12 (17-May-2010)
root@xen0adm1:~# tune2fs -O ^dir_index /dev/iscsi/xen0adm1-2011-09-30-14p2
tune2fs 1.41.12 (17-May-2010)
root@xen0adm1:~# tune2fs -O ^extents /dev/iscsi/xen0adm1-2011-09-30-14p2
tune2fs 1.41.12 (17-May-2010)
Clearing filesystem feature 'extent' not supported.

And after that, the error is the same when I try to mount it on FreeBSD.

So my question is, is it a way to mount an EXT4 filesystem on FreeBSD? Even in ro, without journal.

Thank you,
jC
guillaje
Junior Member
 
Posts: 3
Joined: 06 Oct 2011, 10:53

Postby pkubaj » 06 Oct 2011, 13:14

Unfortunately, there's currently no way to mount an EXT4 slice. The original driver was created for EXT2, still, it somehow works also with EXT3, but not with EXT4.
pkubaj
Member
 
Posts: 378
Joined: 02 Jun 2010, 21:49

Postby guillaje » 06 Oct 2011, 15:30

I read that it was not possible, but this page made me think I missed something...

"This project implements preallocation in ext2fs and update ext2fs to be able to read ext4 file systems and possibly add other functionality, such as write ext4 file systems."
guillaje
Junior Member
 
Posts: 3
Joined: 06 Oct 2011, 10:53

Postby fluca1978 » 06 Oct 2011, 16:05

Aren't EXT3 and EXT4 back compatible with EXT2?
fluca1978
Member
 
Posts: 726
Joined: 20 May 2010, 08:53

Postby adamk » 06 Oct 2011, 17:40

EXT3 mostly is, EXT4 mostly is not :-)

Adam
adamk
Senior Member
 
Posts: 1624
Joined: 21 Nov 2008, 11:00

Postby davidgurvich » 07 Oct 2011, 02:55

EXT3 is forward compatible with EXT4. An EXT4 system can be mounted as EXT3 if extents aren't enabled. Is the ext2fs feature complete for EXT3?
davidgurvich
Member
 
Posts: 195
Joined: 03 Feb 2010, 04:56

Postby phoenix » 08 Oct 2011, 04:46

You can mount an EXT3 filesystem on FreeBSD by mounting it as EXT2.

Last I checked, you could not mount an EXT3 filesystem as EXT3.
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
User avatar
phoenix
MFC'd
 
Posts: 3349
Joined: 17 Nov 2008, 05:43
Location: Kamloops, BC, Canada

Postby ddreamer » 23 Nov 2013, 05:09

To fluca1978 and adamk: EXT2 and EXT3 filesystems are compatible with the ext4 driver but the EXT4 filesystem isn't compatible with the ext2 or ext3 driver.

It seems OK to mount EXT4 in FreeBSD. See
http://pasha.spb.su/arch/483
http://forums.freebsd.org/showthread.php?t=29217&highlight=ext4 last post by desshi
ddreamer
Junior Member
 
Posts: 1
Joined: 23 Nov 2013, 04:12

Re: Ext4 on FreeBSD

Postby Nukama » 25 Nov 2013, 21:34

Get rid of this Linux file system and use ZFS for your external and backup medium on Linux and FreeBSD.
Nukama
Member
 
Posts: 124
Joined: 10 Feb 2010, 22:43

Re: Ext4 on FreeBSD

Postby user00 » 31 Mar 2014, 23:09

After reading the above link, I experimentally found what device and what partitions contained the Linux mounts I wanted to use under FreeBSD by issuing commands and created the below script.

Code: Select all
#!/bin/sh

ext4fuse /dev/ada0s6 /mnt/f19home
ext4fuse /dev/ada0s5 /mnt/f19root
ext4fuse /dev/ada0s2 /mnt/FileDump1TB


Then I rebooted... Now instead of mounting the partitions, the command throws an error:

Code: Select all
# ./f19mnt.sh
fuse: failed to open fuse device: No such file or directory
fuse: failed to open fuse device: No such file or directory
fuse: failed to open fuse device: No such file or directory


Fuse FS is enabled in rc.conf just as it was when it worked. What could I possibly break?
user00
Junior Member
 
Posts: 53
Joined: 31 Mar 2014, 15:34

Re: Ext4 on FreeBSD

Postby user00 » 01 Apr 2014, 21:10

Turns out, I was not loading fuse module in /boot/loader.conf and that's why ext4fuse was not working. Added a line and loaded the module on command line and EXT4 can be mounted again.
user00
Junior Member
 
Posts: 53
Joined: 31 Mar 2014, 15:34


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests