topic title: System to RAM
Posts: 13
Pumukli
Joined: 03 Jan 2014
#1
After my webserver issues are solved I would like to request your help in the following topic:

As I mentioned I use an SSD in the BRIO. Yes, you are right, I solved the"mechanical damage to spinning HDD plates" possibility by this move but introduced the"SSD write endurance" fear. __{{emoticon}}__

What I want: a system that lasts.

How long?

Say for another 10 years, possibly without any hardware part servicing.

Is it ludicrous?

I think it is possible. Should be possible. I ran an old P-1 233MMX for 7 years 24/7 (except maybe a few days of cummulated off-time due to mains outages and ONCE a processor cooling fan replace) before the original 3,5" HDD failed. It was between 1998 and 2005. It was a lightly stressed machine.
So I assume that after I removed the processor cooling fan from the BRIO (and put a big heatsink on it), reduced the power supply cooling fan spinning by reducing its supply voltage and substituted the mechanical HDD with the SSD I can achieve this - in a similarly lightly stressed system with adequate cooling.

But for this goal I should eliminate as much SSD writing as possible!

What I did so far:

I introduced tmpfs and mounted /var/log onto it. Moreover the webserver document root and ftp server root and rrdtool's rrd databases are also placed on tmpfs. At startup the rc.local script populates these directories with the appropriate files and sets the permissions to be OK. When I want to reboot or eventually power off the machine I call my"graceful" reboot.sh and shutdown.sh scripts which do things in the reversed order. I also bought an APC UPS and installed apcupsd so -in theory- I have a chance to save the most important things if a mains outage occurs. I set up apcupsd to call the gracefull shutdown script when the power outage is too long and the battery in the UPS is almost empty.

What I want is

1, to know how much SSD writing is still occuring in other parts of the filesystem and,
2, how could I minimize or entirely stop them.

The SSD was formatted to ext2 and noatime is set in fstab.

Is it too much what I want?
Last edited by Pumukli on 18 Jan 2014, 19:46, edited 1 time in total.
Posts: 765
rust collector
Joined: 27 Dec 2011
#2
On my ssd's, I set them to ext4, noatime, discard

The discard is to enable trim, which I think is a good idea
Posts: 13
Pumukli
Joined: 03 Jan 2014
#3
Trim is not supported on this SSD.
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#4
Pumukli wrote:Trim is not supported on this SSD.
I sold my eeepc's that I had for years. They had the cheapo low budget Phison SSD drives.

They are still running as ext2 file systems running Linux to the people I sold them to.
It's a small town so if anything went wrong. I'd hear about it.

So just format and install as ext2. No /swap on the SSD. Then forget about it.
Or not. Up to you. Just mentioning how I roll when paranoid about SSD failure
on aging early model ssd drives.

I am not up to date/hip yet of what F2FS is capable of yet with the newer kernels and booting
a Linux operating system or using F2FS file system for /home instead of root. I made a lame attempt once ssd-antix-13beta2-32bit-jfs-f2fs-home-t4271.html

rc cheered me on but I dove for the mat on the 1st round. That install is still pumping and up to
date and takes punishment in my motorcycle saddlebags in the extreme desert heat6.

I figure when I need to hear about it. It'll be all over the forums I belong to.
Posts: 765
rust collector
Joined: 27 Dec 2011
#5
I also noticed btrfs seems to have a ssd-mode? I think I saw that in the boot text
Posts: 69
Neil
Joined: 16 Oct 2013
#6
I wonder if a frugal install would meet your needs. As I understand it, a frugal install boots from an SSD, or HDD, just like it does from a LiveCD/USB, and runs in RAM only saving changes and such when needed.
Posts: 13
Pumukli
Joined: 03 Jan 2014
#7
Thanks Neil, my next question would have been"what's this frugal stuff anyhow?" __{{emoticon}}__

Is it basically:

- copied .iso file from install media to hdd
- run as if a live CD ?

OK, but what if I want to install extra apps which are not part of the core-iso? Can I apt-get install them as normal? (I mean in another directory on HDD) and load them into memory when I call them say in rc.local?
Then I gracefuly quit before power off and save everything what is important (database, logs, whatnot) and restore them on following reboot?

Hmm, is that so simple? Where's the catch?
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#8
for a small server like that I would be sore-tempted to boot a live-persistent usb key with the"toram" boot option. A frugal install would work too. The good part about this is that all the system stuff writes to ram instead of the ssd, which is now available for hosting up your files (all read I presume).

I've got some videos on this at my youtube board (see my sig below). I personnally set up a persistent usb key everytime a new antix comes out, test with that, install all my usual apps, and then run the installer from the liveusb. Its one of my favorite features.

I think the frugal install can work the same way. I've never set one up though.
Posts: 13
Pumukli
Joined: 03 Jan 2014
#9
Thanks dolphin!

Actually I've seen two or three of your Youtube videos earlier, not the one you mentioned though.
The boot from an USB Pendrive is tempting, especially with the coming second generation home server! The base hardware is ready, booted antiX 13.2 from a bootable pendrive flawlessly, I could even run the built-in benchmarks!
The only showstopper with this pendrive approach is that I feel a kind of unease about the reliability of such el-cheapo hardware. This is why I wait for the SSD module to arrive. The datasheet talks about some insanely large numbers regarding its write endurance and MTBF, if half (or even quarter) of that is true than I'll be a happy man! __{{emoticon}}__
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#10
The nice thing about el-cheapo hardware is that you can easily have more than one! I've got a kingston data traveler (1GB!)that I've been using for about 7 years. Its been through my washing machine twice, and survived several camping trips. Its rock solid, and still kicking.

but I see your point, and the frugal install, which will still do the"toram" thing, may be for you.
Posts: 69
Neil
Joined: 16 Oct 2013
#11
Pumukli wrote:Is it basically:
- copied .iso file from install media to hdd
- run as if a live CD ?
Well...not quite that simple, but close. Here is the Wiki article about it:

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://antix.mepis.org/index.php?title=Frugal_install"
linktext was:"http://antix.mepis.org/index.php?title=Frugal_install"
====================================
Pumukli wrote:OK, but what if I want to install extra apps which are not part of the core-iso? Can I apt-get install them as normal?
Yes, changes and updates you make will be saved and loaded to RAM again should you have to reboot.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#12
To minimize writes and still customize your system, I suggest you do a frugal-install (or live-usb)with live remastering and possibly (if needed) root persistence.

On these systems if you install/remove packages then those changes are stored in RAM and will be lost on the next reboot unless you either have root persistence enabled or do a remaster-live. With root persistence you can choose when to do the writes and the will be done all at once via rsync which is both fast and efficient. The problem is that root persistence does not get the changes out of RAM. This is where remaster-live comes in. It creates a new compressed filesystem that contains all of your changes thus moving the changes out of RAM.

So do all the package install/remove that you want (as long as you don't run out of RAM). If you want to save intermediate results between reboots then use root persistence. When you have the system tweaked the way you want then do a remaster-live. On the next reboot all the changes that were being saved in RAM will be moved to a read-only compressed filesystem on disk. Every time you remaster-live the entire filesystem will get compressed and stored on disk so you don't want to do this every day. But once it is set up you can disable the root persistence and run with NO disk writes and minimal use of RAM. If there is info you do want to store then put it on a partition that is mounted separately.

I suggest using ext3 or ext4 instead of ext2.

Now I'm going back to my vacation.
Posts: 13
Pumukli
Joined: 03 Jan 2014
#13
Thanks BitJam,

Your suggestions seems very promising.
Can I do a remaster-live without the graphic interface? I'm sure I can because X is just a disguise for command line but I don't know the exact commands to type in a terminal to do that!
Remember, I use antiX core-libre and a few extra packages installed later! __{{emoticon}}__
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#14
antix core includes the cli version of antixsnapshot, which may do what you want.
Posts: 13
Pumukli
Joined: 03 Jan 2014
#15
Hi dolphin,

So"antixsnapshot" ="remaster-live" ?

It gets better and better! __{{emoticon}}__