How to get block-mount do automount of USB and SATA on Barrier Breaker? I have /sbin/block and modified /etc/config/fstab to add mount point for /dev/sda1. But auto mount is not happening.
Running "/sbin/block detect" does not show USB or SATA device. Manually executing "/sbin/block mount" is not mounting USB/SATA
Topic: Automount of USB and SATA on Barrier breaker using block-mount
The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
Hello,
Has any one tried automount using block-mount for USB & SATA ? Kindly let me know if you have any inputs.
Thanks.
Sure. My USB flash drive auto-mounts quite ok with Barrier Breaker.
Provide more details.
What happens in system log and kernel log when you insert the drive.
What do you mean by SATA here?
(Last edited by hnyman on 7 May 2014, 13:08)
Thank You for responding.
When I connect flash device, I see USB core logs; log says its on sda: sda1
I have the following config in /etc/config/fstab
config global automount
option from_fstab 1
option anon_mount 1
config mount
option target '/mnt'
option device '/dev/sda1'
option fstype 'vfat'
option options 'rw,sync'
option enabled '1'
option enabled_fsck '0'
Having this, automount will not happen. However if I do "block mount" then it will be mounted. But, again if I remove the flash device, auto umount wont happen and if I connect it back remount also wont happen
Do I have to add rules or write some scripts? Which file I should modify?
I meant SATA hard disk.
Thanks.
That looks like old config for pre-BB versions (Backfire, Attitude Adjustment). Wiki information is currently a bit confusing.
Below is my fstab config and also log output what happens when I insert my USB drive (and later disconnect it).
root@OpenWrt:~# cat /etc/banner | grep BAR
BARRIER BREAKER (Bleeding Edge, r40694)
root@OpenWrt:~# cat /etc/config/fstab
config 'global'
option anon_swap '0'
option anon_mount '1'
option auto_swap '1'
option auto_mount '1'
option delay_root '0'
option check_fs '0'
## use 'block detect' to find out uuid, if you want device specific mount.
## anon_mount enables the automatic mounting of /dev/sdXy to /mnt/sdXy
root@OpenWrt:/mnt# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 9.8M 428.0K 9.4M 4% /
/dev/root 4.8M 4.8M 0 100% /rom
tmpfs 61.8M 1.0M 60.8M 2% /tmp
/dev/mtdblock5 9.8M 428.0K 9.4M 4% /overlay
overlayfs:/overlay 9.8M 428.0K 9.4M 4% /
tmpfs 512.0K 0 512.0K 0% /dev
/dev/sda1 3.8G 85.4M 3.7G 2% /mnt/sda1
root@OpenWrt:~# logread | tail -n 20
Wed May 7 16:55:34 2014 daemon.warn dnsmasq[1922]: possible DNS-rebind attack detected: test.hs.fi
Wed May 7 16:57:21 2014 kern.info kernel: [283004.990000] usb 1-1: new high-speed USB device number 3 using ehci-platform
Wed May 7 16:57:21 2014 kern.info kernel: [283005.150000] usb-storage 1-1:1.0: USB Mass Storage device detected
Wed May 7 16:57:21 2014 kern.info kernel: [283005.150000] scsi1 : usb-storage 1-1:1.0
Wed May 7 16:57:22 2014 kern.notice kernel: [283006.160000] scsi 1:0:0:0: Direct-Access Pretec UltimateGuard 2.00 PQ: 0 ANSI: 2
Wed May 7 16:57:22 2014 kern.notice kernel: [283006.170000] sd 1:0:0:0: [sda] 7897088 512-byte logical blocks: (4.04 GB/3.76 GiB)
Wed May 7 16:57:22 2014 kern.notice kernel: [283006.180000] sd 1:0:0:0: [sda] Write Protect is off
Wed May 7 16:57:22 2014 kern.debug kernel: [283006.180000] sd 1:0:0:0: [sda] Mode Sense: 00 00 00 00
Wed May 7 16:57:22 2014 kern.err kernel: [283006.180000] sd 1:0:0:0: [sda] Asking for cache data failed
Wed May 7 16:57:22 2014 kern.err kernel: [283006.190000] sd 1:0:0:0: [sda] Assuming drive cache: write through
Wed May 7 16:57:22 2014 kern.err kernel: [283006.200000] sd 1:0:0:0: [sda] Asking for cache data failed
Wed May 7 16:57:22 2014 kern.err kernel: [283006.200000] sd 1:0:0:0: [sda] Assuming drive cache: write through
Wed May 7 16:57:22 2014 kern.info kernel: [283006.380000] sda: sda1
Wed May 7 16:57:22 2014 kern.err kernel: [283006.560000] sd 1:0:0:0: [sda] Asking for cache data failed
Wed May 7 16:57:22 2014 kern.err kernel: [283006.560000] sd 1:0:0:0: [sda] Assuming drive cache: write through
Wed May 7 16:57:22 2014 kern.notice kernel: [283006.570000] sd 1:0:0:0: [sda] Attached SCSI removable disk
Wed May 7 16:57:22 2014 kern.warn kernel: [283006.610000] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Wed May 7 16:57:28 2014 authpriv.info dropbear[5004]: Child connection from 192.168.1.188:49405
Wed May 7 16:57:33 2014 authpriv.notice dropbear[5004]: Pubkey auth succeeded for 'root' with key ...
Wed May 7 17:01:39 2014 kern.info kernel: [283263.730000] usb 1-1: USB disconnect, device number 3
Hello, Thanks for the information.
I changed my /etc/config/fstab similar to yours; still auto mount is not happening.
Log:
================
[ 101.690000] usb 1-1: new high-speed USB device number 2 using fusiv-ehci-hcd
[ 101.840000] usb 1-1: New USB device found, idVendor=03f0, idProduct=5607
[ 101.840000] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 101.850000] usb 1-1: Product: v210w
[ 101.850000] usb 1-1: Manufacturer: HP
[ 101.860000] usb 1-1: SerialNumber: AA00000000003998
[ 101.870000] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 101.870000] scsi1 : usb-storage 1-1:1.0
[ 103.060000] scsi 1:0:0:0: Direct-Access hp v210w 1100 PQ: 0 ANSI: 4
[ 103.070000] sd 1:0:0:0: [sda] 7907328 512-byte logical blocks: (4.04 GB/3.77 GiB)
[ 103.080000] sd 1:0:0:0: [sda] Write Protect is off
[ 103.080000] sd 1:0:0:0: [sda] No Caching mode page found
[ 103.090000] sd 1:0:0:0: [sda] Assuming drive cache: write through
[ 103.110000] sd 1:0:0:0: [sda] No Caching mode page found
[ 103.110000] sd 1:0:0:0: [sda] Assuming drive cache: write through
[ 103.120000] sda: sda1
[ 103.140000] sd 1:0:0:0: [sda] No Caching mode page found
[ 103.140000] sd 1:0:0:0: [sda] Assuming drive cache: write through
[ 103.150000] sd 1:0:0:0: [sda] Attached SCSI removable disk
=======================================================
Are you using udev to create device files in /dev?
In your case, who creates device files and who calls 'block mount' ? Please let me know.
Thanks.
Its working now. Thanks for your help.
Have you tried NTFS mounting ? Please let me know.
Could you please share your working /etc/config/fstab and also your .config?
I am using Attitude Adjustment and automount is not happening. However, I can manually mount my USB device.
config 'global'
option anon_swap '0'
option anon_mount '1'
option auto_swap '1'
option auto_mount '1'
option delay_root '0'
option check_fs '0'
Make sure CONFIG_EPOLL , CONFIG_FSNOTIFY and CONFIG_INOTIFY_USER are enabled.
config 'global'
option anon_swap '0'
option anon_mount '1'
option auto_swap '1'
option auto_mount '1'
option delay_root '0'
option check_fs '0'Make sure CONFIG_EPOLL , CONFIG_FSNOTIFY and CONFIG_INOTIFY_USER are enabled.
do you mind advising how to enable CONFIG_EPOLL, CONFIG_FSNOTIFY ... ??
or perhaps check whether they are enable?
(Last edited by n3utronic on 8 Nov 2014, 06:59)
The discussion might have continued from here.