When the USB disk is inserted USB/USB OTG port, it cannot automatic mount the directory.
But the device can detect this device (/dev/sda).
Console log:
1) log of the USB disk is inserted USB port:
usb 1-1.4: new high-speed USB device number 3 using ci_hdrc
usb-storage 1-1.4:1.0: USB Mass Storage device detected
scsi1 : usb-storage 1-1.4:1.0
scsi 1:0:0:0: Direct-Access JetFlash Transcend 16GB 8.07 PQ: 0 ANSI: 4
sd 1:0:0:0: [sda] 30530688 512-byte logical blocks: (15.6 GB/14.5 GiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
usb 1-1.4: reset high-speed USB device number 3 using ci_hdrc
usb 1-1.4: reset high-speed USB device number 3 using ci_hdrc
usb 1-1.4: reset high-speed USB device number 3 using ci_hdrc
usb 1-1.4: reset high-speed USB device number 3 using ci_hdrc
usb 1-1.4: reset high-speed USB device number 3 using ci_hdrc
usb 1-1.4: reset high-speed USB device number 3 using ci_hdrc
usb 1-1.4: reset high-speed USB device number 3 using ci_hdrc
sd 1:0:0:0: [sda] Media Changed
sd 1:0:0:0: [sda]
Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 1:0:0:0: [sda]
Sense Key : Unit Attention [current]
Info fld=0x0
sd 1:0:0:0: [sda]
Add. Sense: Not ready to ready change, medium may have changed
sd 1:0:0:0: [sda] CDB:
Read(10): 28 00 00 00 00 00 00 00 08 00
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
sda: unable to read partition table
hub 1-1:1.0: cannot reset port 4 (err = -71)
usb 1-1.4: USB disconnect, device number 3
sd 1:0:0:0: [sda] READ CAPACITY failed
sd 1:0:0:0: [sda]
Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
sd 1:0:0:0: [sda] Sense not available.
sd 1:0:0:0: [sda] Write Protect is on
sd 1:0:0:0: [sda] No Caching mode page found
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] Attached SCSI removable disk
sd 1:0:0:0: [sda] Asking for cache data failed
scsi 1:0:0:0: [sda] Assuming drive cache: write through
usb 1-1.4: new high-speed USB device number 4 using ci_hdrc
usb-storage 1-1.4:1.0: USB Mass Storage device detected
scsi2 : usb-storage 1-1.4:1.0
scsi 2:0:0:0: Direct-Access JetFlash Transcend 16GB 8.07 PQ: 0 ANSI: 4
sd 2:0:0:0: [sda] 30530688 512-byte logical blocks: (15.6 GB/14.5 GiB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1
sd 2:0:0:0: [sda] Attached SCSI removable disk
usb 1-1.4: reset high-speed USB device number 4 using ci_hdrc
sd 2:0:0:0: [sda] Media Changed
sd 2:0:0:0: [sda]
Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 2:0:0:0: [sda]
Sense Key : Unit Attention [current]
Info fld=0x0
sd 2:0:0:0: [sda]
Add. Sense: Not ready to ready change, medium may have changed
sd 2:0:0:0: [sda] CDB:
Read(10): 28 00 00 00 00 20 00 00 18 00
end_request: I/O error, dev sda, sector 32
Buffer I/O error on device sda, logical block 4
Buffer I/O error on device sda, logical block 5
Buffer I/O error on device sda, logical block 6
sda: sda1
root@:~#
root@:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.4G 3.3G 0 100% /
devtmpfs 503M 76K 503M 1% /dev
tmpfs 40K 0 40K 0% /mnt/.psplash
tmpfs 503M 256K 503M 1% /run
tmpfs 503M 96K 503M 1% /var/volatile
/dev/mmcblk0p1 8.0M 5.4M 2.7M 67% /run/media/mmcblk0p1
/dev/mmcblk2p1 8.0M 5.4M 2.7M 67% /run/media/mmcblk2p1
/dev/mmcblk0p2 3.4G 1.5G 1.7G 47% /run/media/mmcblk0p2
root@:~# ls /dev/sda
sda sda1
2) log of the USB disk is inserted USB OTG port:
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 2
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usb 2-1: new high-speed USB device number 2 using ci_hdrc
usb-storage 2-1:1.0: USB Mass Storage device detected
scsi1 : usb-storage 2-1:1.0
scsi 1:0:0:0: Direct-Access JetFlash Transcend 16GB 8.07 PQ: 0 ANSI: 4
sd 1:0:0:0: [sda] 30530688 512-byte logical blocks: (15.6 GB/14.5 GiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1
sd 1:0:0:0: [sda] Attached SCSI removable disk
usb 2-1: reset high-speed USB device number 2 using ci_hdrc
sd 1:0:0:0: [sda] Media Changed
sd 1:0:0:0: [sda]
Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 1:0:0:0: [sda]
Sense Key : Unit Attention [current]
Info fld=0x0
sd 1:0:0:0: [sda]
Add. Sense: Not ready to ready change, medium may have changed
sd 1:0:0:0: [sda] CDB:
Read(10): 28 00 01 d1 dc 7d 00 00 01 00
end_request: I/O error, dev sda, sector 30530685
Buffer I/O error on device sda, logical block 3816335
sda: sda1
FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
root@:~#
root@:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.4G 3.3G 0 100% /
devtmpfs 503M 76K 503M 1% /dev
tmpfs 40K 0 40K 0% /mnt/.psplash
tmpfs 503M 256K 503M 1% /run
tmpfs 503M 96K 503M 1% /var/volatile
/dev/mmcblk0p1 8.0M 5.4M 2.7M 67% /run/media/mmcblk0p1
/dev/mmcblk2p1 8.0M 5.4M 2.7M 67% /run/media/mmcblk2p1
/dev/mmcblk0p2 3.4G 1.5G 1.7G 47% /run/media/mmcblk0p2
root@:~# ls /dev/sda
sda sda1
Can you help me to solve this issue?
Thank you.
Best Regards,
Alex
This is just a regular behaviour, not specific to any NXP product. Just google for "auto mounting removable device in Linux". The example answers are as follows:
https://help.ubuntu.com/community/Mount/USB
Have a great day,
Artur
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I think you misunderstood what I meant.
The i.MX6 product doesn't happen this issue on Yocto BSP 1.8_ga.
But the i.MX6DP product will happen this issue.
I try to manual mount USB disk, it still cannot mount the directory.
Do you have other suggestion?
Thanks.