3

I decided to switch from CentOS to FreeBSD 10 after I had a really good experience installing it on a Xserve G4 (PowerPC, that's a story for another day if anyone is interested).

Anyway, my CentOS machine (x86) connected to an iSCSI target that held all of my data. I am now trying to connect my new FreeBSD machine to that iSCSI target and mount the partition.

I have no problem connecting the target. Issuing the command

# iscsictl


Result:
Target name                          Target portal    State
iqn.2000-01.com.synology:diskstation.linuxserver diskstation.home Connected: da0

Ok, so my drive is connected. If I do an fdisk on that particular drive, I see that the sysid = 131 which means its an ext2/ext3 partition - this is correct.

fdisk /dev/da0
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=1305 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=1305 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 131 (0x83),(Linux native)
start 2048, size 20969472 (10239 Meg), flag 0
    beg: cyl 1/ head 0/ sector 1;
    end: cyl 1023/ head 63/ sector 32

Here is where the issue comes in.

When I try to mount the volume, I get an error message "Invalid Argument"

# mount -t ext2fs /dev/da0s1 /mnt
mount: /dev/da0s1: Invalid argument

When I look at my /var/log/messages, I find this message:

WARNING: mount of da0s1 denied due to unsupported optional features

I don't know what argument it's looking for and I am not aware of any "unsupported optional features."

A point in the right direction would be greatly appreciated.

Update

I issued the following command to manually load the ext2fs as a kernel loadable modeule as per the man page man ext2fs(5).

# kldload ext2fs
kldload: can't load ext2fs: module already loaded or in kernel

So, it seems that support is already there, it just isn't connecting.

2

The ext2fs file system is optional on FreeBSD and needs to be loaded.

Add the following line to /boot/loader.conf to have it loaded at boot time:

ext2fs_load="YES"
1
  • I tried this with no success.
    – Allan
    Feb 2 '16 at 0:38
1

Answer

I ran across this thread on the FreeBSD Forums. While it was nearly identical to my issue in almost every way, the main differentiating point was it was in reference to ext4, not ext2.

Since ext4 is technically backward compatible with ext2/3, I I decided to take the chance and see if I could try this solution - it worked.

Here's what I did to mount the drive

1) Install fusefs-ext4fuse (using the ports method)

cd /usr/ports/sysutils/fusefs-ext4fuse
make install clean

Fuse will compline and install in about 20 seconds (that's what it took for me)

then I issued the command:

# kldload fuse

2) Next, I mount the drive to a mountpoint I previously created (this directory must exist).

# ext4fuse /dev/da0s1 /mnt/linux

Then I traverse to the directory and list the contents

# cd /mnt/linux

# ls

.DS_Store       ._foundation        html
.VolumeIcon.icns    ._html          lost+found
._.         cgi-bin         site-backups
._.DS_Store     cron.log
._.VolumeIcon.icns  foundation

It works!

3) Next, I went to my NAS, created another iSCSI target and formatted it to with extFAT (or Fat32) so that it is compatible across Mac/Windows/Linux/FreeBSD. I then copied all the contents from my original drive to the new drive with the more compatible format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.