Differences
This shows you the differences between the selected revision and the current version of the page.
howto:external_drive 2008/05/05 12:32 | howto:external_drive 2017/09/06 18:38 current | ||
---|---|---|---|
Line 2: | Line 2: | ||
The DNS-323 does not support external discs, but a small //hack// allows you to use them on the unit anyway. Before you even try this, you need to have [[telnet]] access to your device. | The DNS-323 does not support external discs, but a small //hack// allows you to use them on the unit anyway. Before you even try this, you need to have [[telnet]] access to your device. | ||
- | Note: If you're a linux newbie and the steps below are too difficult for you, there is more background information and a set of "steps for dummies" to connect external USB drives to the DNS-323 at [[http://forum.dsmg600.info/viewtopic.php?pid=3221#p3221|Attaching USB Storage to the DNS-323 for Linux Newbies & Dummies.]] | + | Note: If you're a linux newbie and the steps below are too difficult for you, there is more background information and a set of "steps for dummies" to connect external USB drives to the DNS-323 at [[http://dns323.kood.org/forum/viewtopic.php?pid=3221#p3221|Attaching USB Storage to the DNS-323 for Linux Newbies & Dummies.]] |
===== WARNING ===== | ===== WARNING ===== | ||
Line 11: | Line 11: | ||
===== Load USB Storage Module ===== | ===== Load USB Storage Module ===== | ||
- | The first thing you need to do is to add an extra module to your system. [[http://forum.dsmg600.info/profile.php?id=173|Paul]] has been so kind that he has produced such a module for you to [[http://dev.skcserver.de/dns323/modules_v1.03/kernel/drivers/usb/storage/usb-storage.ko|download for v1.03]] (working for 1.04 too). | + | The first thing you need to do is to add an extra module to your system. [[http://dns323.kood.org/forum/profile.php?id=173|Paul]] has been so kind that he has produced such a module for you to [[http://dev.skcserver.de/dns323/modules_v1.03/kernel/drivers/usb/storage/usb-storage.ko|download for v1.03]] (working for 1.04 too). |
- | [[http://forum.dsmg600.info/t764-usb-storage.ko-module-without-debugging-enable.html|Here]] you can find a discussion about usb-storage module compiled without debugging enable. Download optimizing module [[http://www.domaigne.com/download/dns-323/|here]] (firmware >=1.03). | + | [[http://dns323.kood.org/forum/t764-usb-storage.ko-module-without-debugging-enable.html|Here]] you can find a discussion about usb-storage module compiled without debugging enable. Download optimizing module [[http://www.domaigne.com/download/dns-323/|here]] (firmware >=1.03). |
Store that file somewhere on your disc, e.g. in the ../lnx_bin/.. directory of your unit. Next step is to [[telnet]] to the device and load the module to the kernel: | Store that file somewhere on your disc, e.g. in the ../lnx_bin/.. directory of your unit. Next step is to [[telnet]] to the device and load the module to the kernel: | ||
Line 38: | Line 38: | ||
</code> | </code> | ||
Please note the 'sdc' above as it might differ when you insert your disc. Use //your// device. | Please note the 'sdc' above as it might differ when you insert your disc. Use //your// device. | ||
+ | |||
+ | |||
+ | |||
Line 56: | Line 59: | ||
mkdir /mnt/usb1 | mkdir /mnt/usb1 | ||
mount -t ext2 /dev/sdc1 /mnt/usb1 | mount -t ext2 /dev/sdc1 /mnt/usb1 | ||
+ | </code> | ||
+ | |||
+ | If you need [[wp>UTF8|UTF8]] support for a FAT32 file system in order to handle an extended character set (greek, chinese, german umlauts, ...), add the -o utf8 option to your mount command: | ||
+ | <code> | ||
+ | mkdir /mnt/usb1 | ||
+ | mount -t vfat -o utf8 /dev/sdc1 /mnt/usb1 | ||
</code> | </code> | ||
Line 68: | Line 77: | ||
After this, restart the samba deamon using the command: <code># smb restart</code>. | After this, restart the samba deamon using the command: <code># smb restart</code>. | ||
+ | |||
+ | |||
===== Implicit Export ===== | ===== Implicit Export ===== | ||
Line 73: | Line 84: | ||
<code># mkdir /mnt/HD_a2/usb_disc | <code># mkdir /mnt/HD_a2/usb_disc | ||
- | # mount -t vfat /dev/sdc /mnt/HD_a2/usb_disc | + | # mount -t vfat /dev/sdc1 /mnt/HD_a2/usb_disc |
+ | </code> | ||
+ | |||
+ | If you don't want the whole drive in one share, you can add symbolic links to existing shares, that will take on their users and permissions. Mount the disc to a point that exists, but outside the shares, then add a link inside the share. In this example, there is a folder on the USB drive called "Public" and an already shared folder on the first hard drive called "Public/Share". There will be a new "folder" (the link) created and it will be visible at "Public/Share/USB_Drive". | ||
+ | |||
+ | <code># mount -t ext2 /dev/sdc1 /mnt/usb1 | ||
+ | # cd /mnt/HD_a2/Public/Share | ||
+ | # ln -s /mnt/usb1/Public USB_Drive | ||
+ | </code> | ||
+ | |||
+ | You might need to chmod 777 or 755 your usb drive. You only need to make the links once. Then you can mount and umount your drive after that without changing anything. | ||
+ | |||
+ | ===== Unmount ===== | ||
+ | If you want to safely unplug your USB harddrive, you can use the umount command (**not** unmount). It's probably a good idea to do this if you are turning off or restarting your DNS-323. | ||
+ | |||
+ | Example: | ||
+ | <code> | ||
+ | umount /dev/sdc1 | ||
</code> | </code> | ||
Line 93: | Line 121: | ||
then | then | ||
insmod $DIR/lnx_bin/usb-storage.ko | insmod $DIR/lnx_bin/usb-storage.ko | ||
+ | # wait a few seconds for the usb drive to be detected | ||
+ | sleep 15 | ||
dmesg > $DIR/lnx_bin/logs/dmesg.out | dmesg > $DIR/lnx_bin/logs/dmesg.out | ||
mkdir $DIR/usb_120 | mkdir $DIR/usb_120 | ||
Line 100: | Line 130: | ||
fi | fi | ||
</code> | </code> | ||
+ | |||
+ | |||
+ | |||
+ | |||
===== Proposed Functionality ===== | ===== Proposed Functionality ===== | ||
An obvious (and very useful) extension to the work you guys have put into USB functionality would be a plugin which automatically copies the entire contents of a USB stick to a directory on the drive. It would be pretty simple to code, I imagine | An obvious (and very useful) extension to the work you guys have put into USB functionality would be a plugin which automatically copies the entire contents of a USB stick to a directory on the drive. It would be pretty simple to code, I imagine | ||
+ | |||
+ | Another useful extension would be automatic backup to a usb disk which afterwards can be carried off site. | ||
+ | |||
+ | Is it technically possible to use the USB to connect DNS-323 to PC, as an external USB hard drive? The reason to do this would be to get better throughput when playing HD movies in Windows. I understand DNS-323 is using EXT2 which is supported by Windows using ext2fsd (http://ext2fsd.sourceforge.net) or ext2ifs (http://www.fs-driver.org). | ||
+ | |||
+ | => I think that would require the USB port to be working in host mode which I don't believe is electrically possible in this case. | ||
===== Partitioning and formating of external hard disk drives ===== | ===== Partitioning and formating of external hard disk drives ===== | ||
Line 113: | Line 153: | ||
1. Connect the drive to a linux pc and partition and format it there, using i.e tools like GParted. | 1. Connect the drive to a linux pc and partition and format it there, using i.e tools like GParted. | ||
- | 2. Partitioning and formating can even be done with the DNS323 itself in a telnet session using the command line tool fdisk. **Please be very careful with this tool, because if used wrongly you could lose all your data.** You need an up to date version of the fdisk tool; otherwise, you may get a segmentation fault. | + | 2. Partitioning and formating can even be done with the DNS323 itself in a telnet session using the command line tool fdisk. **Please be very careful with this tool, because if used wrongly you could lose all your data.** You need an up to date version of the fdisk tool; otherwise, you may get a segmentation fault. You can get a working version from this post in the forum: "[[http://dns323.kood.org/forum/t3375-ffp%27s-fdisk-dies-with-segfault.html|ffp's fdisk dies with segfault]]" |
<code bash> | <code bash> | ||
Line 131: | Line 171: | ||
Finally, try to mount the newly created partition. | Finally, try to mount the newly created partition. | ||
- | |||
- |