Mounting USB drive on DNS323
by rp
As a followup from my previous post, documenting how to get the NAS box to mount an external drive. It has its own advantages, primarily that it allows you to transfer your old backed-up data quickly and also in case you need to get data out of there (in case of one of the drive fails etc).
So simple steps:
Step 1:
ssh into the box and download the module from here.
# wget http://www.domaigne.com/download/dns-323/usb-storage.ko # mkdir /mnt/HD_a2/mod # cp usb-storage.ko /mnt/HD_a2/mod
Step 2:
Load the module and verify in the memory
# insmod usb-storage.ko # lsmod Module Size Used by Not tainted usb_storage 29956 1 usblp 10976 0 sd_mod 14484 10
That confirms that the module is loaded.Now connect your external hard drive and double confirm everything by checking the system log messages:
# dmesg ####################################### # HD0 awake now ! # ####################################### Initializing USB Mass Storage driver... scsi2 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 2 usb-storage: waiting for device to settle before scanning usbcore: registered new driver usb-storage USB Mass Storage support registered. Vendor: SAMSUNG Model: HD500LJ Rev: Type: Direct-Access ANSI SCSI revision: 02 SCSI device sdc: 976773168 512-byte hdwr sectors (500108 MB) sdc: assuming drive cache: write through SCSI device sdc: 976773168 512-byte hdwr sectors (500108 MB) sdc: assuming drive cache: write through sdc: sdc1 Attached scsi disk sdc at scsi2, channel 0, id 0, lun 0 Attached scsi generic sg2 at scsi2, channel 0, id 0, lun 0, type 0 usb-storage: device scan complete
That shows that my drive HD500LJ is now connected.
Now mount the hdd
# mount -t vfat /dev/sdc1 /mnt/HD_a2/ext/
Now when you mount your volume on your windows/mac, you would be able to see ext folder which is basically the external hdd mounted.
Now, you can ssh into the box and move/copy files around to your hearts content, however make sure you remember to unmount it before you disconnect it, to avoid the risk of loosing data.
#umount /mnt/HD_a2/ext
I get
root@dlink-1A06B9:~# ismod usb-storage.ko
-sh: ismod: not found
ah my bad! typo, the command is insmod not ismod! updated the post as well.