{"id":227,"date":"2013-01-25T09:49:17","date_gmt":"2013-01-25T09:49:17","guid":{"rendered":"http:\/\/blog.knofafo.de\/?p=227"},"modified":"2013-01-25T11:13:11","modified_gmt":"2013-01-25T11:13:11","slug":"openwrt-usb-storage","status":"publish","type":"post","link":"https:\/\/blog.knofafo.de\/?p=227","title":{"rendered":"OpenWRT USB storage"},"content":{"rendered":"<p>This is a continuation of my last post <a href=\"http:\/\/blog.knofafo.de\/?p=209\" title=\"OpenWRT on TP-Link WDR3600\">OpenWRT on TP-Link WDR3600<\/a>. It deals with the use of my TP-Link WDR3600 as a central file server.<!--more--><\/p>\n<h5>Setting up USB storage<\/h5>\n<p>USB storage is addressed in <a href=\"http:\/\/wiki.openwrt.org\/doc\/howto\/usb.storage\" title=\"USB Storage\">USB Storage<\/a>. I learned that I should install <code>kmod-usb-storage kmod-fs-ext4 kmod-usb-storage-extras block-mount kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1<\/code> (my USB stick was formatted as ext3, my hard disc as vfat with iso codepages).<\/p>\n<p>I created a mount folder <code>\/mnt\/share<\/code> and modified <code>\/etc\/config\/fstab<\/code> in a way that it now contains<br \/>\n<code><br \/>\nconfig mount<br \/>\n        option device '\/dev\/sda1'<br \/>\n        option options 'rw,sync'<br \/>\n        option enabled '1'<br \/>\n        option target '\/mnt\/share'<br \/>\n        option fstype 'ext3'<br \/>\n<\/code><br \/>\nOf course user-id and group-id have to be present, as well as the mount point. <code>\/etc\/init.d\/fstab start<\/code> led to an automatic mounting of the stick. With <code>\/ent\/init.d\/fstab enable<\/code> I enabled this tho be started after every reboot. Now from the command line I can access the storage, create folders copy data, whatever.<br \/>\nAs the disk space on the router&#8217;s flash disk is very limited I also added the line<br \/>\n<code>dest usb \/mnt\/share\/packages<\/code><br \/>\nto <code>\/etc\/opkg.conf<\/code> so with <code>opkd -dest usb install package<\/code> software is installed on the USB disk, which, then, of course, has to be attached if you want to use the software. Also not every software works without further configuration from USB storage.<\/p>\n<h5>File access<\/h5>\n<p>For file access I installed NFS and Samba (following <a href=\"http:\/\/wiki.openwrt.org\/doc\/howto\/nfs.server\" title=\"Network File System (NFS)\" target=\"_blank\">Network File System (NFS)<\/a> and <a href=\"http:\/\/wiki.openwrt.org\/doc\/howto\/cifs.server\" title=\"Samba\" target=\"_blank\">Samba<\/a>).<br \/>\nI had some additional work as I installed the Servers on the USB-stick, but the kernel-modules on the hard disc. In principle everything could by solved by adjusting the <code>\/etc\/init.d<\/code> scripts.<br \/>\nMy NFS client then made problems. On my main computer, I&#8217;m running Chakra Linux. The solution to the error messages<br \/>\n<code><br \/>\nmount.nfs: rpc.statd is not running but is required for remote locking.<br \/>\nmount.nfs: Either use '-o nolock' to keep locks local, or start statd.<br \/>\nmount.nfs: an incorrect mount option was specified<br \/>\n<\/code><br \/>\nI found in <a href=\"http:\/\/netbunker.de\/tag\/chakra\/\" title=\"NFS unter Chakra Linux\" target=\"_blank\">NFS unter Chakra Linux<\/a> and in <a href=\"http:\/\/chakra-project.org\/bbs\/viewtopic.php?id=4319\" title=\"the Chakra project forum\" target=\"_blank\">the Chakra project forum<\/a>. Additionally minor problems with NFS appeared, which could, however be resolved (again I know a bit more about NFS).<\/p>\n<h5>MiniDLNA<\/h5>\n<p>See HowTo on <a href=\"http:\/\/wiki.openwrt.org\/doc\/uci\/minidlna\" title=\"MiniDLNA\" target=\"_blank\">this link<\/a>. I use this server to stream media over the network.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a continuation of my last post OpenWRT on TP-Link WDR3600. It deals with the use of my TP-Link WDR3600 as a central file server.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[3,19,4],"tags":[28,7,38,29],"_links":{"self":[{"href":"https:\/\/blog.knofafo.de\/index.php?rest_route=\/wp\/v2\/posts\/227"}],"collection":[{"href":"https:\/\/blog.knofafo.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.knofafo.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.knofafo.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.knofafo.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=227"}],"version-history":[{"count":20,"href":"https:\/\/blog.knofafo.de\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions"}],"predecessor-version":[{"id":258,"href":"https:\/\/blog.knofafo.de\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions\/258"}],"wp:attachment":[{"href":"https:\/\/blog.knofafo.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.knofafo.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.knofafo.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}