wiki:Docs/825gen2/Dev/Devices/USB/Storage

Version 1 (modified by Don Wilson, 12 months ago) ( diff )

--

USB Storage Devices

The 825gen2 supports USB storage devices formatted for FAT32 or ExFAT.

ExFAT (FAT32 has maximum individual file size of 4G. ExFAT file size limit is 128PB, so effectively individual file size can be as big as the flash drive.)

SanDisk 256G flash drive.

dmesg
…
[  972.373516] audit: type=1327 audit(1698930643.213:22): proctitle="(systemd)"
[  992.372412] usb 4-1.2: new SuperSpeed USB device number 4 using xhci-hcd
[  992.395362] usb-storage 4-1.2:1.0: USB Mass Storage device detected
[  992.395822] scsi host1: usb-storage 4-1.2:1.0
[  993.425958] scsi 1:0:0:0: Direct-Access      USB      SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[  993.428431] sd 1:0:0:0: [sdc] 488570880 512-byte logical blocks: (250 GB/233 GiB)
[  993.429383] sd 1:0:0:0: [sdc] Write Protect is off
[  993.429400] sd 1:0:0:0: [sdc] Mode Sense: 43 00 00 00
[  993.429719] sd 1:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  993.436723]  sdc: sdc1
[  993.438787] sd 1:0:0:0: [sdc] Attached SCSI removable disk

root@imx8mq-var-dart:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.1G  4.2G  2.5G  64% /
devtmpfs        1.5G  4.0K  1.5G   1% /dev
tmpfs           2.0G  4.0M  2.0G   1% /dev/shm
tmpfs           782M   11M  772M   2% /run
tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup
tmpfs           2.0G   32K  2.0G   1% /tmp
tmpfs           2.0G  224K  2.0G   1% /var/volatile
/dev/mmcblk0p2  7.1G   24K  6.7G   1% /run/media/rootfs2-mmcblk0p2
/dev/mmcblk0p3  182M   14K  168M   1% /run/media/data-mmcblk0p3
/dev/mmcblk0p1  7.1G  3.1G  3.6G  47% /run/media/rootfs1-mmcblk0p1
tmpfs           391M   12K  391M   1% /run/user/1001
tmpfs           391M     0  391M   0% /run/user/0
/dev/sdc1       233G   43M  233G   1% /run/media/sdc1

root@imx8mq-var-dart:~# ls -l /run/media/sdc1
total 43584
-rwxrwx--- 1 root disk 44041519 Oct  6  2021  SanDiskMemoryZone.apk
-rwxrwx--- 1 root disk   497832 Oct 25  2021  SanDiskMemoryZone_QuickStartGuide.pdf
drwxrwx--- 2 root disk    32768 Nov 24  2021 'System Volume Information'
root@imx8mq-var-dart:~#

root@imx8mq-var-dart:~# echo "Test" > /run/media/sdc1/test.txt
root@imx8mq-var-dart:~# ls -l /run/media/sdc1
total 43616
-rwxrwx--- 1 root disk 44041519 Oct  6  2021  SanDiskMemoryZone.apk
-rwxrwx--- 1 root disk   497832 Oct 25  2021  SanDiskMemoryZone_QuickStartGuide.pdf
drwxrwx--- 2 root disk    32768 Nov 24  2021 'System Volume Information'
-rwxrwx--- 1 root disk        5 Nov  2 13:13  test.txt

Verified in Windows this is FAT32 and not ExFAT by trying to copy large file to the drive.

Error "File Too Large" appeared

Used Windows 10 to reformat to ExFAT

Then copied large file successfully

Moved flash drive back to 825

Dmesg

[ 1858.483512] usb-storage 4-1.2:1.0: USB Mass Storage device detected [ 1858.485704] scsi host1: usb-storage 4-1.2:1.0 [ 1859.490708] scsi 1:0:0:0: Direct-Access USB SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6 [ 1859.491710] sd 1:0:0:0: [sdc] 488570880 512-byte logical blocks: (250 GB/233 GiB) [ 1859.492735] sd 1:0:0:0: [sdc] Write Protect is off [ 1859.492753] sd 1:0:0:0: [sdc] Mode Sense: 43 00 00 00 [ 1859.493136] sd 1:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 1859.500237] sdc: sdc1 [ 1859.502308] sd 1:0:0:0: [sdc] Attached SCSI removable disk root@imx8mq-var-dart:~#

root@imx8mq-var-dart:~# ls /run/media Data256G-sdc1 data-mmcblk0p3 rootfs1-mmcblk0p1 rootfs2-mmcblk0p2

root@imx8mq-var-dart:~# ls -l /run/media/Data256G-sdc1/ total 5827968 drwxrwxrwx 1 root root 131072 Nov 2 08:21 'System Volume Information' -rwxrwxrwx 1 root root 5967587328 Oct 24 2022 en-us_windows_10_business_editions_version_22h2_x64_dvd_8cf17b79.iso

root@imx8mq-var-dart:~# echo "test123" > /run/media/Data256G-sdc1/test123.txt root@imx8mq-var-dart:~# ls -l /run/media/Data256G-sdc1/ total 5828096 drwxrwxrwx 1 root root 131072 Nov 2 08:21 'System Volume Information' -rwxrwxrwx 1 root root 5967587328 Oct 24 2022 en-us_windows_10_business_editions_version_22h2_x64_dvd_8cf17b79.iso -rwxrwxrwx 1 root root 8 Nov 2 13:27 test123.txt

root@imx8mq-var-dart:~# cat /run/media/Data256G-sdc1/test123.txt test123

fdisk -l to view file system information:

root@imx8mq-var-dart:~# fdisk -l Disk /dev/mmcblk0: 14.68 GiB, 15758000128 bytes, 30777344 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xe49b9c9d

Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 16384 15192063 15175680 7.2G 83 Linux /dev/mmcblk0p2 15192064 30367743 15175680 7.2G 83 Linux /dev/mmcblk0p3 30367744 30777343 409600 200M 83 Linux

Disk /dev/mmcblk1: 29.72 GiB, 31914983424 bytes, 62333952 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xb88fb0cd

Device Boot Start End Sectors Size Id Type /dev/mmcblk1p1 16384 15171583 15155200 7.2G 83 Linux

Disk /dev/sdc: 232.97 GiB, 250148290560 bytes, 488570880 sectors Disk model: SanDisk 3.2Gen1 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x3083954b

Device Boot Start End Sectors Size Id Type /dev/sdc1 32 488570879 488570848 233G 7 HPFS/NTFS/exFAT root@imx8mq-var-dart:~#

Attempt NTFS

Reformatted and copied large file back on drive.

Inserted in 825

dmesg

[ 2632.765588] sd 1:0:0:0: [sdc] Write Protect is off [ 2632.765606] sd 1:0:0:0: [sdc] Mode Sense: 43 00 00 00 [ 2632.768104] sd 1:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 2632.776333] sdc: sdc1 [ 2632.778398] sd 1:0:0:0: [sdc] Attached SCSI removable disk [ 2633.488384] ntfs: driver 2.1.32 [Flags: R/O MODULE]. [ 2633.530979] ntfs: volume version 3.1.

root@imx8mq-var-dart:~# ls /run/media Data256G-sdc1 data-mmcblk0p3 rootfs1-mmcblk0p1 rootfs2-mmcblk0p2 root@imx8mq-var-dart:~# root@imx8mq-var-dart:~# root@imx8mq-var-dart:~# ls -l /run/media/Data256G-sdc1/ total 5827724 dr-x------ 1 root root 0 Nov 2 13:35 'System Volume Information' -r-------- 1 root root 5967587328 Oct 24 2022 en-us_windows_10_business_editions_version_22h2_x64_dvd_8cf17b79.iso

root@imx8mq-var-dart:~# echo "TestXYZ" > /run/media/Data256G-sdc1/testxyz.txt -sh: /run/media/Data256G-sdc1/testxyz.txt: Read-only file system

Read NTFS successful, but does not support writing

Note: See TracWiki for help on using the wiki.