USB External HD is supported ?

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
patwood
DD-WRT User


Joined: 29 Jul 2008
Posts: 118
Location: NJ, USA

PostPosted: Thu Oct 02, 2008 4:25    Post subject: Reply with quote
Okay, here's the samba install. There are a few caveats:

1. I'm not a samba expert. The only reason I run it is because I have a mixed Windows/Linux environment; otherwise, I'd probably be running nfs.

2. This will only work on MIPS-based routers (Broadcom is a MIPS chip). This includes the Asus, Linksys, and Buffalo routers supported by dd-wrt.

3. I have only tested it on an Asus WL520-GU router under dd-wrt version dd-wrt.v24-101037_NEWD_mini_usb.

Instructions:

1. Don't bother with JFFS; you can enable if you plan on using for other stuff, but it's not big enoungh for all this when uncompressed.

2. Mount your USB storage on /opt. The file system *must* be either ext2 or ext3; do not use FAT, VFAT, or FAT32. If you want, you can mount your device elsewhere and use "mount --bind /foo/bar/blah/blah /opt". If you don't know how to use mount --bind, don't bother with it until you are sure this install is working properly. Mount the file system you want to share to /mnt. Make sure any directories you want client machines to have write access to are writable by all users (e.g., chmod 777 /mnt).

3. Download the package (samba2.tar.gz) to /opt.

4. Install the package:
Code:
# cd /opt
# tar xvzf samba2.tar.gz
... lots of files listed here as they're extracted
#


5. Start up samba (this is to test that it's working):
Code:
# sh /opt/etc/config/optware.startup
Starting smbd:
Starting nmbd:
#


You should now be able to mount the samba share using the user name "nobody" and the password "nobody".

6. If your network IP address doesn't start with 192.168.xxx.xxx, you'll need to edit the "hosts allow = 192.168." line in /opt/etc/samba/smb.conf to specify your network address range. Any part of the IP address range that's omitted is assumed to be all allowed (so my configuration allows access from any hosts with IP addresses that start with 192.168).

7. Take a look at my rc_startup nvram code (example is in /opt/etc/rc_startup). Change it to mount your partition in the correct place(s). If you are not using a USB flash memory stick, you can delete the "-o noatime" part from the mount command; this prevents excessive writes to the flash device, reducing memory wear.

8. Install your own startup code in the rc_startup nvram variable:

Code:
# nvram set rc_startup=`cat your_rc_startup_file`
# nvram get rc_startup
... should list the contents of your rc_startup file
#


Note the use of *back quotes* above; not regular single quotes. This is a very important distinction for the Unix shell -- the back qoutes (found under the ~ symbol on most PC keyboards) are replaced by the shell with the *output* of the command listed inside them. So in this case, the contents of your_rc_startup_file replaces the `cat your_rc_startup_file` in the assignment.

Now reboot and verify that samba starts up properly.

Pat



samba2.tar.gz
 Description:

Download
 Filename:  samba2.tar.gz
 Filesize:  1.35 MB
 Downloaded:  1871 Time(s)

Sponsor
patwood
DD-WRT User


Joined: 29 Jul 2008
Posts: 118
Location: NJ, USA

PostPosted: Thu Oct 02, 2008 13:53    Post subject: Reply with quote
Oh, and my download doesn't contain any codepage files. This is only a problem if you are using non-US ASCII file names (e.g., umlaut, kanji file names). If your file systems contain file names with non-US characters in them, they may display incorrectly in GUI file browsers. You can wget the samba2_2.12-1_mipsel.ipk file and extract the codepage files as follows (assumes downloading the file to /opt):

Code:
# cd /opt
# tar xvzf samba2_2.12-1_mipsel.ipk
... list of files extracted by tar ...
# cd /
# tar xvzf data.tar.gz ./opt/lib/codepages
... list of codepages files
#


Note the "cd /" between the two tar extractions; this is required, or the codepages files will go into the wrong place (/opt/opt instead of /opt).

Pat
predatorftp
DD-WRT Novice


Joined: 26 Sep 2008
Posts: 41

PostPosted: Thu Oct 02, 2008 18:18    Post subject: Reply with quote
I followed the steps you described and with no gr8 success.

I can see the 2nd partition (FAT32) that I mounted to /mnt but it's very slow and gets stuck reading and writing from it.

how could i speed it up ?
herman
DD-WRT Novice


Joined: 09 Sep 2008
Posts: 40
Location: Germany

PostPosted: Thu Oct 02, 2008 19:11    Post subject: Reply with quote
predatorftp wrote:
I followed the steps you described and with no gr8 success.

I can see the 2nd partition (FAT32) that I mounted to /mnt but it's very slow and gets stuck reading and writing from it.

how could i speed it up ?


well read again the second step > where we were told not to use FAT at all.

try this
Code:
2. Mount your USB storage on /opt. The file system *must* be either ext2 or ext3; do not use FAT, VFAT, or FAT32.2.


herman
predatorftp
DD-WRT Novice


Joined: 26 Sep 2008
Posts: 41

PostPosted: Thu Oct 02, 2008 19:28    Post subject: Reply with quote
herman wrote:
predatorftp wrote:
I followed the steps you described and with no gr8 success.

I can see the 2nd partition (FAT32) that I mounted to /mnt but it's very slow and gets stuck reading and writing from it.

how could i speed it up ?


well read again the second step > where we were told not to use FAT at all.

try this
Code:
2. Mount your USB storage on /opt. The file system *must* be either ext2 or ext3; do not use FAT, VFAT, or FAT32.2.


Yes well i thank you for taking the time to tell me that, but:
A. what are you trying to say
B. if you have taken the time to read exactly what i wrote you would see that I I have 1 partiton EXT3 and the rest is in fat32 i loaded samba and everything to the EXT3 partition.
I actually could read\write to the FAT32 partition mounted to /mnt !! but it is very slow + it deform my native characters (hebrew).
I am now at the point i have gave up on this, I flashed back to linksys firmware and i will wait for the brave one that will make this part of the Mega release. built in.

Thanks to everyone

herman
patwood
DD-WRT User


Joined: 29 Jul 2008
Posts: 118
Location: NJ, USA

PostPosted: Thu Oct 02, 2008 20:35    Post subject: Reply with quote
I have had problems using the FAT32 file system with the dd-wrt USB2.0 implementations, especially when writing large files to the FAT32 partition. It could just be that I was using an old flash stick that was having write errors (doubtful, but possible) that FAT32 couldn't handle but ext3 could (ext2 and ext3 are much more resistant to bad media blocks than FAT32).

Don't know why your FAT32 was so slow; read/write speeds to/from FAT32 were about the same as ext3 for me (directly on the router, not via a client over samba), at least while my FAT32 file system was working. I suppose you could try sharing your ext file system and comparing speeds; the problem could be completely unrelated to the file system type.

As I've said in other threads, I'm a Unix/Linux user/programmer/hacker, not a Windows person, so I tend to avoid anything invented by Microsoft (including FAT32) unless I have no choice (like running XP on my wife's PC; too bad Quicken crashes on wine).

Pat
centos
DD-WRT Novice


Joined: 25 Jan 2007
Posts: 35

PostPosted: Fri Oct 03, 2008 4:16    Post subject: Reply with quote
I have try this :
1. flash using dd-wrt.v24-101037_NEWD_mini_usb
2. actived usb support almost all except support 2.0
3. using my ipod nano , create partition ext3 1 GB and format using mkfs.ext3 at different computer.
4. the router found /dev/scsi......part1 , i mount to /jffs/opt and mount -o bind /jffs/opt /opt
5. run this step wget http://www.wlan-sat.com/boleo/optware/optware-install-ddwrt.sh -O - | tr -d '\r' > /tmp/optware-install.sh
sh /tmp/optware-install.sh
all working fine
6. install package openvpn using ipkg install openvpn
and openvpn running well
7. install samba2 using ipkg install samba2
but it have problem after finish download ,
when i try tar xvf samba......ipk the router stuck

I try to downlod this samba2.tar.gz , uncompressed to /opt but when try to smbd start it show "bus error"

I'm not sure where the problem is , from the usb disc ? or from firmware ?
it always stuck when uncompressed large files
if i pull out the usb flash , the router respond.

regards
patwood
DD-WRT User


Joined: 29 Jul 2008
Posts: 118
Location: NJ, USA

PostPosted: Fri Oct 03, 2008 6:08    Post subject: Reply with quote
Okay, what model router do you have? I have an Asus WL-520GU.

For my router, I disabled USB 1.1 support (both UHCI and OHCI) and enabled USB 2.0 support (USB 2.0 is working on the 520GU as of 10137; there was a later patch -- 10328 -- for the Asus 500GP/V2). Also enabled USB storage support and ext2/ext3 file system support. I don't know what will happen if you have USB 1.1 and USB 2.0 drivers enabled at the same time; I think only one should be active, since USB 2.0 is compatible with 1.1 devices.

I mounted my USB device on /mnt, not /jffs. If you have jffs2 enabled, I have no idea what happens if you attempt to mount another file system over /jffs, so don't do that for now.

Make sure you clear out the /opt directory structure before attempting to install my samba2.tar.gz package. There are some conflicts from the optware library package with my startup script.

Pat
nicholaswc
DD-WRT Novice


Joined: 03 Jun 2008
Posts: 31

PostPosted: Thu Oct 09, 2008 2:03    Post subject: Reply with quote
patwood wrote:
The problem is that there simply isn't enough room to store all the samba stuff in a dd-wrt build, even one targeted for an 8MB (or even 16MB, if there is such a thing) router. The samba2 install package is > 7MB compressed. The optware uclibc libraries are > 10MB compressed. Won't fit. Period.

Pat

can i use a USB stick to extend the flash space?
patwood
DD-WRT User


Joined: 29 Jul 2008
Posts: 118
Location: NJ, USA

PostPosted: Thu Oct 09, 2008 4:06    Post subject: Reply with quote
Not the way you want. You can't extend the flash space of the dd-wrt binary download. You can only extend the total storage on your system after dd-wrt boots by mounting the file system on your usb stick. That's why samba is installed as a separate package and isn't part of the dd-wrt base install.

Pat
ajoh99
DD-WRT Novice


Joined: 13 Oct 2008
Posts: 1

PostPosted: Mon Oct 13, 2008 7:26    Post subject: Reply with quote
Has anyone tried supporting multiple external hard drives with a USB hub? It seems it should technically work, but I was wondering if anyone managed to get it working in practice.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum