LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 08-16-2008, 07:56 AM   #1
Matizek
LQ Newbie
 
Registered: Jan 2008
Posts: 15

Rep: Reputation: 0
Debian server on usb sticks


Hi!

I am planning to build a debian server which will use usb sticks instead of hard disks in order to reduce power consumption, noise and heat. My questions:

1.) Could you please make an opinion about this? I'd like to know whether it is reasonable to use USB sticks instead of hard disk. I don't really need much space.
2.) The thing I am mostly concerned about is how durable are these USB sticks? I mean, will they last for several years, in theory? This server will be mostly used as a web, mail, dns and ftp server.
3.) How much slower will the system be? I mean, for the upper purposes, will it be okay? Will a php/mysql based webpage load significantly longer?
4.) I will probably use two USB sticks, one 8gb as / and /home and one 2gb as swap. Will two USB sticks consume less power than one 3,5" 40Gb 5400Rpm drive?
5.) I would like to make my server as reliable as possible, should I use RAID1 with usb sticks? If I choose raid, I will have to use software raid, as my hardware does not support it. I was thinking about what this guy did: http://cs.joensuu.fi/~mmeri/usbraid/

Thanks!
 
Old 08-16-2008, 04:03 PM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,094
Blog Entries: 2

Rep: Reputation: 111Reputation: 111
1) Sure its reasonable
2) Depends on how much writing you are doing to them
3) It's slower no doubts on that, but you can frontend the web server and ftp server with squid running out of ram
4) Put more ram in and skip swap (or make a really small ramdisk swap if the system wants it)
4a) What works nice is putting your OS on one that is read only and do a unionfs with either a ram disk or the other stick where you're putting all your non-static data
5) if you can do 4a that greatly increases the life since you aren't writing to it at all, I think doing regular backups would be easier than raiding a couple of sticks together (imho).

Last edited by estabroo; 08-16-2008 at 04:04 PM. Reason: improving readability
 
Old 08-17-2008, 03:29 AM   #3
Matizek
LQ Newbie
 
Registered: Jan 2008
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for the answer!
3.) Could you explain this a bit please? I mean, I uderstand that running www and ftp from ram is just like running them from disk but instead of reading from disk constantly it reads from disk only once and then stores temporarily in ram, as ram is faster to read from. But what is squid? Isn't that some sort of proxy program?
4.) Would this much ram be enough: http://matizek.no-ip.org/phpsysinfo/
4a.) Ok I don't really understand this one How can you make OS-disk read only? I'm pretty sure it still needs some writings, in /etc for example... Correct me if I'm wrong please. Secondly, what is unionfs? I don't really understand it from here.

Thanks!
 
Old 08-17-2008, 10:15 AM   #4
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,094
Blog Entries: 2

Rep: Reputation: 111Reputation: 111
Okay for 3) your using squid as a reverse proxy or web accelerator, it essentially allows people hitting your website to have what hasn't changed or timed out to be fed from squid running out of ram instead of having to hit the webserver and I'm pretty sure you can use it to do the same thing for ftp (but I could be wrong on that one). Just google squid as a reverse proxy and you'll get a ton of pages that explain it.

4) can you ever have too much ram? The answer is maybe, depends on what you end up running, personally I'd put in as much as I could.

4a) you can do this a couple of ways, the most common would be to use something like squashfs or cramfs, they are compressed read-only filesystems designed to run out of flash or out of ram (I prefer squashfs over cramfs). Unionfs lets you overlay directories so you can have a read-only directory and a writable one sharing the same directory. This is how most live CDs work, they make a union of a readonly filesystem and a ramdisk (or usb stick/drive marked for persistent storage)

Code:
/etc_readonly \
               /etc (union of both, reads come from readonly unless they've been updated in writable)
/etc_writeable/
mmm my ascii art leaves much to be desired

Last edited by estabroo; 08-17-2008 at 10:17 AM. Reason: needed spacing to be correct
 
Old 08-17-2008, 01:33 PM   #5
Matizek
LQ Newbie
 
Registered: Jan 2008
Posts: 15

Original Poster
Rep: Reputation: 0
Oh I see! I will use the unionfs, thanks for enlightening me If needed, I'll add more ram and if the web server will be too slow, I'll make it run from ram Thanks again!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add a PATH that STICKS in Debian? lumix Linux - Newbie 3 03-20-2007 01:42 PM
Best supported USB WLAN sticks MS3FGX Linux - Wireless Networking 4 04-17-2006 01:40 PM
mp3 usb players/sticks unihiekka Linux - Hardware 1 12-01-2005 12:32 PM
USB memory sticks island_dude Linux - Hardware 1 01-20-2004 11:16 AM
Mounting different usb-sticks robertmarkbram Linux - Hardware 3 10-22-2003 07:16 AM


All times are GMT -5. The time now is 01:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration