Setting Up A Low Cost NAS Using Tomato

Oleh: admin
February 14, 2009

In this post I’ll describe the steps needed to setup a low cost NAS using the Tomato firmware on the Asus 520gu.  This should work with Asus 500 as well.

If you have no idea what a NAS is, think of it as a shared stor­age device within your home net­work that you can access via an ip address to store and retrieve doc­u­ments, wire­lessly. If you and your wife/girlfriend/partner have two sep­a­rate com­put­ers, you could store, say vaca­tion pho­tos in this shared stor­age. This device would appear as a folder/drive on both a Mac and a PC. You can sim­ply drag and drop files to it.

What you need:

A note about our home­brew NAS…
I’m going to tell what most don’t about set­ting up a USB Wifi NAS. It is pretty cool to put to good use your spare usb drive or exter­nal hard­disk. But don’t expect blaz­ing speeds.

Stor­ing files, doc­u­ments, music, pho­tos are fine. But if you are think­ing of doing a hard drive backup or store full length videos, the speeds may not be acceptable.

But don’t let that dis­cour­age you! It is still pretty cool! We use it as a back up stor­age device for our pho­tos and serves that pur­pose pretty well!

For­mat­ting the USB drive
Tomato sup­ports these filesys­tems:
FAT32 (Windows/Mac/Linux)
FAT16 (Windows/Mac/Linux)
EXT2 (Linux)
EXT3 (Linux)

When you buy a hard drive, it is most likely for­mat­ted to FAT32 since most oper­at­ing sys­tems sup­port it with­out hav­ing to install addi­tional drivers.

So why pick another filesys­tem?
FAT32 is by Microsoft! If that doesn’t con­vince you, you have a file size lim­i­ta­tion of 4GB, plus FAT32 pro­vides no secu­rity and in gen­eral quite inefficient.

FAT16. Don’t even con­sider it! This was the stan­dard used by old MS DOS OS.

EXT2 is mostly used by Linux Oper­at­ing Sys­tems. Nei­ther Win­dows nor Mac can read EXT2 dri­ves natively

EXT3 is EXT2 with jour­nalling enabled. With­out the tech­nob­a­b­ble, that means EXT3 helps pre­vents file cor­rup­tion in case of an non grace­ful sys­tem shut­down (if you sim­ply pull the USB drive out with­out unmount­ing it first)

EXT3 is most pre­ferred. But the dis­ad­van­tage is once for­mat­ted to this for­mat, you can’t plug in your USB drive to your PC or Mac and try to read or write files. You need a Linux sys­tem to do that. (There are ways to get PCs and Macs rec­og­nize EXT2/EXT3 dri­ves, but that involves addi­tional work).

The biggest advan­tage of FAT32 is most dri­ves come pre­for­mat­ted to this for­mat. You can plug in the USB drive to your Mac or PC and you will be able to see this drive as another mount point.

What I’ve done is par­ti­tioned my old Sea­gate 160GB hard drive to both FAT32 and EXT3. They now appear as two mount points on both Win­dows and Mac.

If all this is too tech­ni­cal, just plug in darn drive into the ASUS router! Chances are that it’ll just work!

Get­ting Started
Set up Tomato on the Asus router

In the admin screen goto USB and NAS

tomato-nas-usb-support

Your con­fig should look like the screen­shot above with the excep­tion of Attached Devices.  Don’t attach the USB device yet.  Save the con­fig­u­ra­tion above and restart the router.  Now, come back to this screen and you should see your stor­age device listed.

If the device shows up as not mounted, make sure the hard drive is for­mat­ted to either FAT or EXT and not HFS+ (Mac) or NTFS(XP).  Both are not sup­ported and the hard drive will have to be refor­mat­ted. Restart the router with the USB drive plugged in.  Check this screen, the device should show up as mounted.

If you’ve got­ten this far, you are almost there!  Get­ting the device to mount is usu­ally the biggest hur­dle.  Now using tel­net login to 192.168.1.1:

Trying 192.168.1.1...
Connected to davinci.
Escape character is '^]'.
davinci login: root
Password:

Tomato v1.23.8615 ND USB

BusyBox v1.12.3 (2009-01-28 23:18:53 EST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

root@davinci:/tmp/home/root# cd /mnt
root@davinci:/tmp/mnt# ls
disc0_1 disc0_2
root@davinci:/tmp/mnt#

disc0_1 and disc0_2 are the par­ti­tions in my USB drive. If you have only one par­ti­tion, you’ll see only one disc. Note down this info.

Go to File Shar­ing under USB and NAS. Enter the info as in this screen­shot below:
tomato-nas-file-sharing

For each direc­tory under /mnt, give a share name and descrip­tion and save. Set the code page and work­group name (Win­dows default is work­group). Set the access level to Read/Write. Save.

Now on a Mac:
Open Finder
Goto Go..Connect to Server
picture-17
You will now be dis­played the mount points and your share will appear under ‘Shared’ in Finder!

On a PC:
Your shares should appear auto­mat­i­cally in Net­work Neigh­bor­hood with the share name you specified

Now you drag and drop files to your NAS device over a wifi net­work. Pretty cool huh?!


Enter Your Mail Address

Related Posts with Thumbnails

Incom­ing search terms:

  • tomato nas
  • tomato usb
  • tomato usb nas
  • tomato file sharing
  • toma­tousb screenshots
  • toma­tousb nas
  • toma­tousb
  • tomato print server
  • tomato usb file sharing
  • tomato usb storage

Tags: , , , , ,

Category: Featured | RSS 2.0 | Give a Comment | trackback

77 Comments

  • sandy

    I was sucess­ful at set­ting up the NAS on a Asus 520gu. How­ever, I just recently refor­mat­ted my HDD from fat32 to ext3. Now, I am hav­ing trou­ble access­ing my files. I know it has to do with per­mis­sions. On my Ubuntu machine, I used sudo chown –R username:username /media/movies and I was able to access my movies files, but I don’t know how to set this up in tomato. I am assum­ing you need a script in the “Init” sec­tion before access­ing the HDD. I am able to mount the HDD. There are 2 par­ti­tions (ext3 & NTFS). I can access the files on the NTFS par­ti­tion. I also have a swap par­ti­tion. I’ve searched a few forums and google, but can’t find any help. Thanks!

  • H K

    Hi,
    I am cur­rently using D-Link DNS-321 as a NAS, but it’s woe­fully slow. I am stream­ing HD videos to PS3, which requires upto 20Mbps, how­ever, DNS-321 tops out at 10Mbps.
    If I setup a wl-520gu with a usb con­nected hard-drive, what are the expected read/write speeds?
    Thanks for your response.

    HK

  • FJ

    Hi,

    I won­der if there are avail­able pro­grams out there that can also do mir­ror­ing (back up). It’s like hook­ing up 2 hard disk (HD) in your Asus router. First HD is for NAS. Sec­ond HD will act as back up of the First HD in case it fails.

  • Tim

    I for­mat­ted my drive into two par­ti­tions, one fat32 and the other ntfs. I can mount my fat32 par­ti­tion easy enough in tomato, but I can­not for the life of me fig­ure out how to access the drive from my com­puter. I am using win­dows 7 ulti­mate 64bit with the Asus 520gu. Ive gone under net­work and see the router itself and that is it. Click­ing on the router just brings up access denied. Can any­one help me get this working?

    Thank you in Advance,
    Tim

  • Ken

    I have my HD plug into usb, all works well, does any have
    a script file to spin down the HD after not being use for
    a while.

  • Tim

    I setup my exter­nal hdd as a NAS via these instruc­tions and works well. Is it pos­si­ble to access my drive out­side my net­work, say for exam­ple, from my work? Can any­one point me in the direc­tion of instruc­tions for how to do this?

  • Matt

    I’m try­ing to set up an exter­nal HD as a NAS, I have suc­cess­fully mounted it but for some rea­son the pass­word and user name is dif­fer­ent for my router on tel­net. It is a asus 520gu, any way I can find the user and pass? Thanks Matt

  • GX

    Hi, just got my asus wl-500g v2 and installed tomato fol­low­ing the guide. Thanks for the great tuto­ri­als. How­ever, I got some prob­lems with the file shar­ing. I was able to con­nect my 4G flash drive to the router and mount it as a net­work drive under win­dows xp. The prob­lem is I can only map the share folder (which is /mnt by default). The sys­tem can not save the new share name and direc­tory I added. After I click the save but­ton, it says ‘set­tings saved, some ser­vices are restarted’. Then I refresh the page and every­thing is gone. I can read the files under win­dows but not write to the flash drive (fat32).

    I have tried sev­eral dif­fer­ent builds like 1.28.8748.ext, 1.28.8750.ext and tomato-K26USB-1.28.9050MIPSR1-beta20-Ext. All three have the same prob­lem for me. I’ve spent sev­eral hours on this and still could not fix it. Any sug­ges­tions will be appre­ci­ated. Thanks a lot!

    GX

    • GX

      UPDATE: I was able to write to flash drive by adding samba script to the “Samba cus­tom con­fig­u­ra­tion”. How­ever, the web­page set­tings are still not work­ing for me.

  • Ferdie

    I am using tomato 1.27

    My FAT for­mat­ted flash drive can’t be mounted.
    Check the screen­shot
    http://img833.imageshack.us/i/failedmount.jpg/

    Any advice how I can make it mounted?

    TIA

  • Andrew

    I have the same ques­tion as Matt about the user­name and pass­word for the router on tel­net. Can any­one help with this?

    • Tim

      Are you hav­ing trou­ble access­ing the router after flash­ing to tomato? Seems like Matts post was an issue with access­ing the mounted drive. If it is the router, the default is user: admin pass: admin. If it is the drive you are try­ing to con­nect to try this
      \\Default\nas media\Mount Name\Partition Name

      • Andrew

        I was hav­ing a prob­lem access­ing the mounted drive. But I went into the router and found my user­name and pass­word and that worked. Thanks for your help.

Leave a Reply

  • Widget Area

    This is widget area, add your widget here from your widget on appereance on your admin panel