Mount ext4

Status
Not open for further replies.

ctpfaff

Dabbler
Joined
Aug 22, 2015
Messages
26
Hi

I want to migrate some data from an external disk formated as ext4 to my FreeNAS box (9.10.2-u3). The import functionality of the web ui works fine. However that ui is quite rudimentary. Thus I thought I could just mount the drive myself via cli and then rsync it over with verbose option and progress enabled to see whats is going on (e.g. the eta). As the web interface can somehow copy my disk successfully
I thought that must be simple. I tried

kldload fuse
mount -t ext4 /dev/da1 /mnt/extusb
mount -t ext2fs /dev/da1 /mnt/extusb

But all without success. But then my questions are. How does FreeNAS itself actually realize that import copy functionality
for ext4 and the like? And can I replicate that on CLI?
 
Last edited by a moderator:

ctpfaff

Dabbler
Joined
Aug 22, 2015
Messages
26
He
I cannot test right at the moment to copy paste the exact error message.

But using

mount -t ext4 /dev/da1 /mnt/extusb

Said something like: not supported by device.

And

mount -t ext2fs /dev/da1 /mnt/extusb

Said syntax error.

I am not sure if that helps already. If not I can test probably by this evening and copy and paste exact output.
 
Last edited by a moderator:

ctpfaff

Dabbler
Joined
Aug 22, 2015
Messages
26
Well i just checked with a call to "df" what is mounted where. As the autoimport triggered via ui is currently running I found

/dev/da1p1 mounted to /var/run/importcopy/tmpdir

So I guess you are pretty much right that I just forgot to specify the partition to mount.
 

ctpfaff

Dabbler
Joined
Aug 22, 2015
Messages
26
OK. I tested this now again with a ext4 formated usb stick which has one primary partition on it. It is available to the system via "/dev/da10". However there seems to be no device for the first partition with "p1" there is rather "/dev/da10s1". Is that equivalent? Mounting it however still does not work.

Code:
cd /mnt
mkdir extusb
kldload fuse

mount -t ext2fs /dev/da10s1 /mnt/extusb																																	
mount: /dev/da10s1: Invalid argument

mount -t ext2fs /dev/da10 /mnt/extusb
mount: /dev/da10: Invalid argument

mount -t ext4 /dev/da10 /mnt/extusb																																		
mount: /dev/da10: Operation not supported by device

mount -t ext4 /dev/da10s1 /mnt/extusb																																		
mount: /dev/da10s1: Operation not supported by device


Fdisk gives me:

Code:
fdisk /dev/da10s1																																							
******* Working on device /dev/da10s1 *******																																					
parameters extracted from in-core disklabel are:																																				
cylinders=949 heads=255 sectors/track=63 (16065 blks/cyl)																																		
																																																
parameters to be used for BIOS calculations are:																																				
cylinders=949 heads=255 sectors/track=63 (16065 blks/cyl)																																		
																																																
fdisk: invalid fdisk partition table found																																					 
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 165 (0xa5),(FreeBSD/NetBSD/386BSD)																																						
	start 63, size 15245622 (7444 Meg), flag 80 (active)																																		
		beg: cyl 0/ head 1/ sector 1;																																							
		end: cyl 948/ head 254/ sector 63																																						
The data for partition 2 is:																																									
<UNUSED>																																														
The data for partition 3 is:																																									
<UNUSED>																																														
The data for partition 4 is:																																									
<UNUSED>					


Blkid gives me:

Code:
blkid /dev/da10s1																																							
/dev/da10s1: UUID="edff0d16-f698-40a9-8a39-198d2afd9f5e" TYPE="ext4"
 
Last edited:
D

dlavigne

Guest
It's possible you're using the wrong command and I'm not sure which fuse modules ship with 9.10.2. If fusefs-ext4fuse is built-in, replacing mount -t ext4 with
Code:
ext4fuse
should work. However, if the fuse module isn't built-in, I'm pretty sure ext4 mounting will not work (as even the built-in FreeBSD ext3 support has limitations).
 

ctpfaff

Dabbler
Joined
Aug 22, 2015
Messages
26
No that does not work either.

Code:
kldstat -v | grep ext 


Only shows there is ext2fs.ko. Grepping for fuse only returns fuse.ko.

Then still the question is how does the import tool of the freenas ui handles that as it is importing from ext4 fine.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
I thought EXT4 was not supported by FreeBSD?

Anyone, please correct me if wrong.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I thought EXT4 was not supported by FreeBSD?

Anyone, please correct me if wrong.

http://doc.freenas.org/11/storage.html#import-disk

Imports of EXT3 or EXT4 filesystems are possible in some cases, although neither is fully supported. EXT3 journaling is not supported, so those filesystems must have an external fsck utility, like the one provided by E2fsprogs utilities, run on them before import. EXT4 filesystems with extended attributes or inodes greater than 128 bytes are not supported. EXT4 filesystems with EXT3 journaling must have an fsck run on them before import, as described above.
 
Status
Not open for further replies.
Top