Hi robbiz,
today I tried to connect a USB drive to my N5200 too - and - no success....
So I checked what's going on when connecting a USB drive and I've found out, that the mount command is producing an error.
The reason for the error is that the mount uses the iochaset=utf8 option which is not available for ext2/3 and many other filesystems.
But it should work for NTFS filesystems (but only read-only).
Whenever a USB drive is connected to the N5200, the script /app/bin/usb.hotplug is called. Here is a (sh -x) trace of that script when it is called:
+ mkdir=/bin/mkdir
+ rmdir=/bin/rmdir
+ dir=
+ usbpath=/raid/data/usbhdd/
++ echo
++ cut -d : -f 1
++ cut -d - -f 2
+ usb_ports=
+ echo '/app/bin/usb.hotplug add '
+ case "$1" in
+ add_usb
+ led=0
+ led1=0
++ df
++ awk '/\/raid\/data/||/\/raid\/sys/'
+ raid='/dev/vg0/lv0 1456634992 308930568 1073711620 22% /raid/data
/dev/vg0/syslv 1032088 32880 946780 3% /raid/sys'
+ '[' '/dev/vg0/lv0 1456634992 308930568 1073711620 22% /raid/data
/dev/vg0/syslv 1032088 32880 946780 3% /raid/sys' '!=' '' ']'
+ sleep 5
++ cat /proc/scsi/scsi
++ awk '/Thecus:/{FS=" ";printf("%s:%s\n",$2,$3)}'
++ awk -F: '{if ($2>8) {printf("%s\n",$4)}}'
+ normal=sdf
+ for i in '$normal'
+ strExec='cat /proc/partitions|awk '\''/sdf/{FS=" ";print $4}'\'''
++ eval cat '/proc/partitions|awk' ''\''/sdf/{FS="' '";print' '$4}'\'''
+++ cat /proc/partitions
+++ awk '/sdf/{FS=" ";print $4}'
+ mount_usbs='sdf
sdf1'
+ for mount_usb in '$mount_usbs'
++ mount
++ grep '/dev/sdf '
+ chkmount=
+ '[' '' == '' ']'
+ /bin/mkdir -p /raid/data/usbhdd//sdf
+ echo 'Copy 1'
+ /bin/mount -o iocharset=utf8,umask=0,fmask=001,uid=99,gid=99 /dev/sdf /raid/data/usbhdd//sdf
mount: you must specify the filesystem type
+ '[' 32 -eq 0 ']'
+ sleep 5
++ mount
++ grep '/dev/sdf '
+ mount_ok=
+ '[' '' == '' ']'
+ /bin/rmdir -p /raid/data/usbhdd//sdf
rmdir: `/raid/data': Device or resource busy
+ for mount_usb in '$mount_usbs'
++ mount
++ grep '/dev/sdf1 '
+ chkmount=
+ '[' '' == '' ']'
+ /bin/mkdir -p /raid/data/usbhdd//sdf1
+ echo 'Copy 1'
+ /bin/mount -o iocharset=utf8,umask=0,fmask=001,uid=99,gid=99 /dev/sdf1 /raid/data/usbhdd//sdf1
mount: wrong fs type, bad option, bad superblock on /dev/sdf1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
+ '[' 32 -eq 0 ']'
+ sleep 5
++ mount
++ grep '/dev/sdf1 '
+ mount_ok=
+ '[' '' == '' ']'
+ /bin/rmdir -p /raid/data/usbhdd//sdf1
rmdir: `/raid/data': Device or resource busy
+ '[' 0 -ge 1 ']'
+ '[' 0 = 0 ']'
+ '[' 0 = 1 ']'
+ echo 'Copy 0'
+ echo 'Copy 0'
I will think about a workaround for this problem. The problem is, the directory where this script is located, is read-only, becase it is loop mounted from a file.
Andreas