Mounting ext4 fs usb

Hi,
I’ve an Ext4 formatted USB stick. I used it with NomadBSD, probably before update the package sysutils/e2fsprogs . Now when I try to use it NomadBSD says; “Error opening directory ‘/media/USB-DATA’: Device not configured”.
I can use it with GNU/Linux without any problem.

dmesg

ugen0.3: at usbus0
umass0 on uhub3
umass0: <Lexar USB Flash Drive, class 0/0, rev 3.10/11.00, addr 2> on usbus0
umass0: SCSI over Bulk-Only; quirks = 0x8100
umass0:1:0: Attached to scbus1
da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
da0: <Lexar USB Flash Drive 1100> Removable Direct Access SPC-4 SCSI device
da0: Serial Number xxxxxxxxxxxxxxx
da0: 400.000MB/s transfers
da0: 29700MB (60825600 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>

kldstat -v | grep ext
25 1 0xffffffff82b7a000 1ae78 ext2fs.ko (/boot/kernel/ext2fs.ko)
522 ext2fs

gpart show da0
=> 63 60825537 da0 MBR (29G)
63 1985 - free - (993K)
2048 60821504 1 linux-data (29G)
60823552 2048 - free - (1.0M)

ls /dev/da0*
/dev/da0 /dev/da0s1

How can use my ext4 USB automatically as it should be.
Thanks.

Do you have fusefs-ext2 installed?

Yes, 0.0.10_2 installed.

Could you please post the output tail -200 /var/log/dsbmd.log? For convenience you can use termbin.com:

# tail -200 | nc termbin.com 9999

and then post the URL.

EDIT
Corrected URL

tail -200 /var/log/dsbmd.log

dsbmd: dsbmd started on Tue Nov 9 15:27:43 2021
dsbmd: Client with UID 1001 connected on Tue Nov 9 15:28:41 2021
dsbmd: Client with UID 1001 disconnected on Tue Nov 9 15:28:41 2021
dsbmd: Client with UID 1001 connected on Tue Nov 9 15:28:46 2021
dsbmd: Client with UID 1001 disconnected on Tue Nov 9 16:30:16 2021
dsbmd: dsbmd exited on Tue Nov 9 16:30:17 2021
dsbmd: dsbmd started on Wed Nov 10 11:39:28 2021
dsbmd: Client with UID 1001 connected on Wed Nov 10 11:40:15 2021
dsbmd: Client with UID 1001 disconnected on Wed Nov 10 11:40:15 2021
dsbmd: Client with UID 1001 connected on Wed Nov 10 11:40:20 2021
dsbmd: dsbmd exited on Wed Nov 10 12:48:07 2021
dsbmd: Lost connection to devd. Reconnecting … on Wed Nov 10 12:48:07 2021
dsbmd: dsbmd started on Wed Nov 10 12:50:33 2021
dsbmd: Client with UID 1001 connected on Wed Nov 10 12:51:28 2021
dsbmd: Client with UID 1001 disconnected on Wed Nov 10 12:51:28 2021
dsbmd: Client with UID 1001 connected on Wed Nov 10 12:51:40 2021
dsbmd: Device /dev/da0s1 mounted on /media/USB-DATA by UID 1001 on Wed Nov 10 12:59:36 2021
dsbmd: Device /dev/da0s1 mounted on /media/USB-DATA by UID 1001 on Wed Nov 10 13:00:39 2021
dsbmd: Device /dev/da0s1 unmounted from /media/USB-DATA by UID 1001 on Wed Nov 10 13:02:14 2021
dsbmd: Device /dev/da1s1 mounted on /media/da1s1 by UID 1001 on Wed Nov 10 13:04:20 2021
dsbmd: Device /dev/da1s1 unmounted from /media/da1s1 by UID 1001 on Wed Nov 10 13:04:49 2021
dsbmd: Device /dev/da0s1 mounted on /media/USB-DATA by UID 1001 on Wed Nov 10 13:04:59 2021
dsbmd: Device /dev/da0s1 mounted on /media/USB-DATA by UID 1001 on Wed Nov 10 13:12:03 2021
dsbmd: Device /dev/da0s1 unmounted from /media/USB-DATA by UID 1001 on Wed Nov 10 13:12:44 2021
dsbmd: Device /dev/ugen0.2 mounted on /media/Pixel 3a by UID 1001 on Wed Nov 10 13:13:35 2021
dsbmd: Device /dev/da0s1 mounted on /media/USB-DATA by UID 1001 on Wed Nov 10 13:16:59 2021
dsbmd: Client with UID 1001 disconnected on Wed Nov 10 16:11:10 2021
dsbmd: dsbmd exited on Wed Nov 10 16:11:11 2021
dsbmd: dsbmd started on Wed Nov 10 18:13:53 2021
dsbmd: Client with UID 1001 connected on Wed Nov 10 18:15:03 2021
dsbmd: Client with UID 1001 disconnected on Wed Nov 10 18:15:03 2021
dsbmd: Client with UID 1001 connected on Wed Nov 10 18:15:15 2021
dsbmd: Client with UID 1001 disconnected on Wed Nov 10 23:31:01 2021
dsbmd: dsbmd exited on Wed Nov 10 23:31:02 2021
dsbmd: dsbmd started on Thu Nov 11 15:09:11 2021
dsbmd: Client with UID 1001 connected on Thu Nov 11 15:10:30 2021
dsbmd: Client with UID 1001 disconnected on Thu Nov 11 15:10:30 2021
dsbmd: Client with UID 1001 connected on Thu Nov 11 15:10:42 2021
dsbmd: Client with UID 1001 disconnected on Thu Nov 11 16:21:54 2021
dsbmd: dsbmd exited on Thu Nov 11 16:21:55 2021
dsbmd: dsbmd started on Fri Nov 12 14:05:10 2021
dsbmd: Client with UID 1001 connected on Fri Nov 12 14:07:43 2021
dsbmd: Client with UID 1001 disconnected on Fri Nov 12 14:07:43 2021
dsbmd: Client with UID 1001 connected on Fri Nov 12 14:07:56 2021
dsbmd: Client with UID 1001 disconnected on Fri Nov 12 15:13:52 2021
dsbmd: dsbmd exited on Fri Nov 12 15:13:54 2021
dsbmd: dsbmd started on Fri Nov 12 15:15:57 2021
dsbmd: dsbmd exited on Fri Nov 12 15:28:49 2021
dsbmd: dsbmd started on Fri Nov 12 15:31:05 2021
dsbmd: Client with UID 1001 connected on Fri Nov 12 15:32:32 2021
dsbmd: Client with UID 1001 disconnected on Fri Nov 12 15:32:32 2021
dsbmd: Client with UID 1001 connected on Fri Nov 12 15:32:45 2021
dsbmd: Client with UID 1001 disconnected on Fri Nov 12 16:48:47 2021
dsbmd: dsbmd exited on Fri Nov 12 16:48:48 2021
dsbmd: dsbmd started on Mon Nov 15 09:52:37 2021
dsbmd: Client with UID 1001 connected on Mon Nov 15 09:54:18 2021
dsbmd: Client with UID 1001 disconnected on Mon Nov 15 09:54:18 2021
dsbmd: Client with UID 1001 connected on Mon Nov 15 09:54:33 2021
dsbmd: Device /dev/da0s1 mounted on /media/da0s1 by UID 1001 on Mon Nov 15 10:26:13 2021
dsbmd: dsbmd exited on Mon Nov 15 12:19:35 2021
dsbmd: dsbmd started on Mon Nov 15 12:23:30 2021
dsbmd: Client with UID 1001 connected on Mon Nov 15 12:24:50 2021
dsbmd: Client with UID 1001 disconnected on Mon Nov 15 12:24:50 2021
dsbmd: Client with UID 1001 connected on Mon Nov 15 12:25:03 2021
dsbmd: Device /dev/da0s1 mounted on /media/USB-DATA by UID 1001 on Mon Nov 15 13:11:05 2021
dsbmd: Client with UID 1001 connected on Mon Nov 15 13:11:46 2021
dsbmd: Device /dev/ada0p2 mounted on /media/ada0p2 by UID 1001 on Mon Nov 15 13:11:46 2021
dsbmd: Client with UID 1001 disconnected on Mon Nov 15 13:13:21 2021
dsbmd: Client with UID 1001 disconnected on Mon Nov 15 16:07:19 2021
dsbmd: dsbmd exited on Mon Nov 15 16:07:20 2021
dsbmd: dsbmd started on Tue Nov 16 10:42:39 2021
dsbmd: Client with UID 1001 connected on Tue Nov 16 10:44:15 2021
dsbmd: Client with UID 1001 disconnected on Tue Nov 16 10:44:15 2021
dsbmd: Client with UID 1001 connected on Tue Nov 16 10:44:28 2021
dsbmd: Device /dev/ugen0.2 mounted on /media/Pixel 3a by UID 1001 on Tue Nov 16 11:44:31 2021
dsbmd: Client with UID 1001 disconnected on Tue Nov 16 15:10:30 2021
dsbmd: dsbmd exited on Tue Nov 16 15:10:32 2021
dsbmd: dsbmd started on Wed Nov 17 10:14:25 2021
dsbmd: Client with UID 1001 connected on Wed Nov 17 10:19:35 2021
dsbmd: Client with UID 1001 disconnected on Wed Nov 17 10:19:35 2021
dsbmd: Client with UID 1001 connected on Wed Nov 17 10:19:50 2021
dsbmd: Client with UID 1001 disconnected on Wed Nov 17 11:57:40 2021
dsbmd: dsbmd exited on Wed Nov 17 11:57:41 2021
dsbmd: dsbmd started on Wed Nov 17 11:59:49 2021
dsbmd: Client with UID 1001 connected on Wed Nov 17 12:01:09 2021
dsbmd: Client with UID 1001 disconnected on Wed Nov 17 12:01:09 2021
dsbmd: Client with UID 1001 connected on Wed Nov 17 12:01:23 2021
dsbmd: Client with UID 1001 disconnected on Wed Nov 17 15:01:31 2021
dsbmd: dsbmd exited on Wed Nov 17 15:01:32 2021
dsbmd: dsbmd started on Thu Nov 18 12:11:03 2021
dsbmd: Client with UID 1001 connected on Thu Nov 18 12:12:22 2021
dsbmd: Client with UID 1001 disconnected on Thu Nov 18 12:12:22 2021
dsbmd: Client with UID 1001 connected on Thu Nov 18 12:12:36 2021
dsbmd: Client with UID 1001 disconnected on Thu Nov 18 14:09:20 2021
dsbmd: dsbmd exited on Thu Nov 18 14:09:22 2021
dsbmd: dsbmd started on Fri Nov 19 11:49:32 2021
dsbmd: Client with UID 1001 connected on Fri Nov 19 11:51:23 2021
dsbmd: Client with UID 1001 disconnected on Fri Nov 19 11:51:23 2021
dsbmd: Client with UID 1001 connected on Fri Nov 19 11:51:37 2021
dsbmd: Device /dev/da0s1 mounted on /media/USB-DATA by UID 1001 on Fri Nov 19 12:01:37 2021
dsbmd: Device /dev/da0s1 unmounted from /media/USB-DATA by UID 1001 on Fri Nov 19 12:20:38 2021
dsbmd: Client with UID 1001 disconnected on Fri Nov 19 12:21:37 2021
dsbmd: dsbmd exited on Fri Nov 19 12:21:39 2021
dsbmd: dsbmd started on Fri Nov 19 12:31:39 2021
dsbmd: Client with UID 1001 connected on Fri Nov 19 12:33:17 2021
dsbmd: Client with UID 1001 disconnected on Fri Nov 19 12:33:17 2021
dsbmd: Client with UID 1001 connected on Fri Nov 19 12:33:31 2021
dsbmd: Device /dev/da0s1 mounted on /media/USB-DATA by UID 1001 on Fri Nov 19 12:34:14 2021
dsbmd: Device /dev/ugen5.3 mounted on /media/Pixel 3a by UID 1001 on Fri Nov 19 12:35:29 2021
dsbmd: Device /dev/da0s1 unmounted from /media/USB-DATA by UID 1001 on Fri Nov 19 12:49:24 2021
dsbmd: Device /dev/da0s1 mounted on /media/USB-DATA by UID 1001 on Fri Nov 19 12:49:52 2021
dsbmd: Device /dev/da0s1 unmounted from /media/USB-DATA by UID 1001 on Fri Nov 19 12:50:42 2021
dsbmd: Device /dev/da0s1 mounted on /media/USB-DATA by UID 1001 on Fri Nov 19 13:04:15 2021
dsbmd: Client with UID 1001 disconnected on Fri Nov 19 13:42:55 2021
dsbmd: dsbmd exited on Fri Nov 19 13:42:57 2021
dsbmd: dsbmd started on Fri Nov 19 13:46:41 2021
dsbmd: Client with UID 1001 connected on Fri Nov 19 13:52:04 2021
dsbmd: Client with UID 1001 disconnected on Fri Nov 19 13:52:04 2021
dsbmd: Client with UID 1001 connected on Fri Nov 19 13:52:19 2021
dsbmd: Client with UID 1001 disconnected on Fri Nov 19 15:26:09 2021
dsbmd: dsbmd exited on Fri Nov 19 15:26:10 2021
dsbmd: dsbmd started on Fri Nov 19 16:55:49 2021
dsbmd: Client with UID 1001 connected on Fri Nov 19 16:58:08 2021
dsbmd: Client with UID 1001 disconnected on Fri Nov 19 16:58:08 2021
dsbmd: Client with UID 1001 connected on Fri Nov 19 16:58:24 2021
dsbmd: Device /dev/da0s1 mounted on /media/USB-DATA by UID 1001 on Fri Nov 19 17:02:11 2021

http://terminbin.com/

Hmm. We’re having trouble finding that site.

We can’t connect to the server at terminbin.com.


Sorry, corrected the URL.

Well, the log looks good. Check the filesystem as follows to see if it’s dirty:

# e2fsck -n /dev/da0s1
LANG=C sudo e2fsck -n /dev/da0s1
e2fsck 1.46.4 (18-Aug-2021)
USB-DATA contains a file system with errors, check forced.
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
Block bitmap differences:  -(34640--34649)
Fix? no

Free blocks count wrong for group #1 (300, counted=299).
Fix? no

Free blocks count wrong (6169667, counted=6169966).
Fix? no

Block bitmap differences: Group 1 block bitmap does not match checksum.
IGNORED.

USB-DATA: ********** WARNING: Filesystem still has errors **********

USB-DATA: 31147/1904256 files (0.4% non-contiguous), 1432509/7602176 blocks

I think it should be repaired. Should I take a backup? How can I repair?

Edit:
fsck found same error on Linux. Linux handles USB without any problem.

Either run fsck on your Linux, or run e2fsck /dev/da0s1 on NomadBSD.

I guess fusefs-ext2 refuses to mount an unclean filesystem to prevent data loss, which is a good idea.

Thanks, solved as always. :pray:

1 Like

You can set unmount_on_exit to yes in /usr/local/etc/dsbmd.conf. This makes sure all mounted filesystems will be unmounted when you shutdown or reboot. FreeBSD unmount all filesystems automatically on shutdown except for filesystems mounted via FUSE.

1 Like