Mount external ext4 usb drive

Status
Not open for further replies.

Suiname

Dabbler
Joined
Dec 5, 2012
Messages
31
so before I created my nas (and the reason I did), I was backing up media from my ubuntu server to an external USB drive which was formatted with an ext4 fs. I realize that freebsd doesn't suppose ext4, however, I thought that I would be able to mount it as ext2 and it just turns the journaling off. What I've done so far is to do:
Code:
ls /dev/

doing this before I plug my usb drive in and then after I plug my drive in, shows me that my usb drive is located at /dev/da1

so then I created a directory /external and I'd like to mount this usb drive. The command I used was
Code:
mount -t ext2fs /dev/da1 /external


However, this results in the following error
Code:
mount: /dev/da1 : Invalid argument


I am running as root, so it shouldn't be a permissions issue, and I can mount this drive on my ubuntu server still just fine, so I know the drive is not corrupt or anything. Anyone know how to do this correctly? I could just mount it to the linux server and move it via the network, but that would be much slower and there's almost 2TB of data on here. Thanks
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Most disks have a partition table. Perhaps it would help to figure out which partition you used, then try mounting the appropriate partition.
 

Suiname

Dabbler
Joined
Dec 5, 2012
Messages
31
there is only one partition, da1s1, I've tried the same command mounting this specific partition, but I get the same result
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Then it would seem that ext2 and ext4 are not sufficiently the same thing for your plan to work. Personally I think you're confusing some possible compatibility between ext3 and ext4; ext2 is that godawful thing from the early days of Linux. ext3 is that godawful thing from the late '90's. ext4 is the slightly less godawful thing that evolved from that. Each one theoretically had some compatibility with disks created by the previous version, but there is no particular reason to assume that a filesystem built with ext4 and the most current versions of the data structures would be readable on an ext2 system.

Or put more simply, "you're going the wrong way...!"
 

ulf

Dabbler
Joined
Apr 23, 2013
Messages
33
I just tried mounting an ext2 formatted disk, and get the same error.

If the fs is created on Ubuntu with
$ mkfs.ext2 /dev/sdc1

it does not work since Ubuntu now by default sets the number of inodes to 256.
FreeNAS only understand when inodes = 128

If the fs is created on Ubuntu with
$ mkfs.ext2 -I 128/dev/sdc1
it is possible to mount using

$ mount -t ext2fs /dev/ada4s1 /mnt/media/backup

Such limitations are a real PITA.

Are using 8.3.1p2

Is this fixed in later version?
 

zuzuzzzip

Dabbler
Joined
Apr 4, 2016
Messages
28
FWIW

I had this problem too and was running into this.

This did the trick for me:
Code:
fsck_ext2fs /dev/da6s1

And then use the Import Disk in the FreeNAS GUI.

I'm on FreeNAS 9.10 atm.
 
Status
Not open for further replies.
Top