macsat.com OpenWrt and ASUS WL Forum
January 08, 2009, 14:07:19 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Will USB memory-stick survive?  (Read 2410 times)
0 Members and 1 Guest are viewing this topic.
C4Vette
Newbie
*
Offline Offline

Posts: 4


View Profile
« on: July 04, 2007, 11:40:21 AM »

Hi all,

Using Macsat's example script for RRD I made my own modifications and the graphs are looking fine on my WL-500gP with WR RC6.
The script is generating the RRD-files and together with the PNG's are written to a USB memory-stick.
But know I wonder how long the memory-stick is going to survive the many 'writes' per day. Would it be better to write these files to memory (/tmp ?) and let cron make copies ones or twice a day to the stick?

greetingz from the Netherlands
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #1 on: July 05, 2007, 10:00:18 AM »


Any given USB memorystick should be able to handle several 100.000 writes / reads.

A harddrive would be a better choice, but I dont think you will encounter problems with the USB Stick.

You can either do as you write - place the pics in /tmp - or you can get yourselves a harddrive instead of the USB Memory device :-)

...or you can just use the memory stick, and hope it works. My guess is that you wont see problems for as longs as you are using it. Hardware tend to outdate before it breaks these days :-)

Reference: http://en.wikipedia.org/wiki/USB_flash_drive#Weaknesses
Logged
C4Vette
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #2 on: July 05, 2007, 12:33:07 PM »

Macsat, thanks for your answer. I appreciate your website, tutorials and scripts: thanks again! It really helped me, the beginner/novice I am.

About the memory, I'm a bit confused now. When I save files to /tmp they don't survive a power-cycle but when saved in for instance /www they do survive. Is it just /tmp which is RAM or can you explain what dirs are NVRAM and what dirs are RAM?

Ed
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #3 on: July 05, 2007, 13:07:53 PM »


/tmp is RAM

All other mountpoints (except the ones you made for usb flash drive) is in the Flash chip in the device (like nvram - which is in a dedicated area of the flash chip).

Logged
C4Vette
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #4 on: July 05, 2007, 20:04:13 PM »

Ok, that sounds logical. I could not find this info anywhere.
So this means that writing the PNG's to /www/images writes to NVRAM? This makes me concerned about the lifespan of the router  Undecided
Is it possible to let the BusyBox httpd read the images from /tmp/images ?
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #5 on: July 06, 2007, 06:25:56 AM »



I guess an easy way was to place the images in /tmp/images and then make a symlink in /www like this:

Code:
ln -s /tmp/images /www/images

But when you reboot the router, the images will be lost !

Logged
zsjoska
Newbie
*
Offline Offline

Posts: 29



View Profile
« Reply #6 on: July 06, 2007, 16:07:45 PM »

I doesn't know too much about this topic nor about filesystems but after I read this: http://en.wikipedia.org/wiki/JFFS2
I guess that the memory stick would resist a bit longer.

Logged

------------------------------------------------------------
Using Asus WL-500g Deluxe with OpenWrt RC6 + WebIf2
Pjotrek
Jr. Member
**
Offline Offline

Posts: 67


Systems Architect Emeritus


View Profile WWW
« Reply #7 on: July 15, 2007, 22:28:56 PM »

I've been thinking along the same lines, but was told off by someone working at Kingston:
These flash memory devices have their own load-leveling software on board to even out load to all parts of the memory. Using JFFS2 would be counter-productive, since the load-leveling algorithms in the filesystem and on the stick will work against each other.
Use any non-journaling file system on the flash unit - ext2 would be a good choice.
Or adopt my layout: I am using two flash sticks in my routers: one for more or less static data and one for often changing data. Then I use a cron job to backup data from the often changing flash onto the other one every 4 hours. I also have that done before a controlled reboot of the router. Thus I loose only 4 hours of data in worst case, and I dont have to have an expensive, noisy and eventually unreliable hard disk. Flash memorys are cheap nowadays - I pay 180SEK for 1Gb ~20EUR, so I can afford to change the often changing flash when it fails - but it has not failed yet.
« Last Edit: July 15, 2007, 22:35:30 PM by Pjotrek » Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #8 on: July 16, 2007, 07:15:58 AM »


Sounds like a good way. And yes - flash is very very cheap.

I have a 500GB Harddrive attached, as I am using it as a NAS, so I dotn bother about flash memory devices Smiley


Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.461 seconds with 25 queries.