The time now is Mon 18 Dec 2017, 07:26
All times are UTC - 4
Joined: 04 Jan 2009
Location: Gatineau (Qc), Canada
|Posted: Sun 15 Oct 2017, 20:25 Post subject:
Four scripts to create, fill, check and back-up /mnt/ram1
Subject description: Ramdisk creator, filler, back-up and checker
On trouvera la version française de ce fil ici.
Nothing beats a ramdisk for speedy copy and save operations, even in this
age of fast hard disks and USB drives.
As the name of the archive suggests, the creation script takes 2/3 of your
free RAM and creates a ramdisk out of it. "2/3 of free RAM" means that
your apps should still have lots of room to run after /mnt/ram1 is created.
It is strongly recommended that YOU DO NOT USE THESE SCRIPTS
if you have less than 3 Gb's of RAM on your machine. Use
Pizza'sGood original script instead (URL below). Are we clear about this?
The attached pet archive includes 4 ramdisk bash scripts to
The creation and filling at boot-up, and the back-up at shutdown are
automatic. The checking is up to you (but you don't normally need to).
The back-up script is located in /etc/init.d. It uses a shut-down technique
developed by BarryK, as I understand it. It copies (aka back-up) the
contents of an active ramdisk at /mnt/ram1 to /mnt/home/ramdisk.
Conversely, at boot-up, if there is some content in /mnt/home/ramdisk,
the zzz-ramdisk script in /root/Startup creates /mnt/ram1 and copies that
The Start-up filler script checks the size of the contents vs the capacity of
the ramdisk. If the contents' overall size is too big to fit on the ramdisk,
nothing is copied. In such a case you will have to choose what to copy to
your ramdisk manually. But normally you don't have to do this.
Reserve directory /mnt/home/ramdisk only to the shuttle with /mnt/ram1.
Don't put anything else in it.
Basically, I made it to run so that you, the user, don't have to worry about
it. The ramdisk's content is saved at boot-down and re-copied at boot-up.
If for some reason, you need to recycle X or your window manager, it just
displays a 5-seconds message that the ramdisk is there; it doesn't
reformat or destroy anything in an existing ramdisk during your session.
Please note that hard shut-downs are not protected, meaning: if you
ever need to do an emergency shut-down with your computer's reset
button, your ramdisk contents will be lost.
But with regular power-offs and re-boots, you should find the contents of
your ramdisk in /mnt/ram1 from one session to the next.
Inspired by Pizza's Good original script and a discussion with Smithy
on that thread. Thanks to both of them.
I tested it extensively, and I decided to make it a permanent feature of
my current and future Pups -- because it's so handy. But please test it too
and get back to me if it needs improvements. I'll try to accommodate.
PS. The tree of the pet archive is as follows:
[ 431] ./etc/init.d/stop_ramdisk-0.1
[ 834] ./opt/local/bin/ramdisk_check.sh
[ 610] ./opt/local/bin/ramdisk_cp.sh
[ 158] ./pet.specs
[ 33] ./root/Startup/zzz_ramdisk.sh -> /opt/local/bin/ramdisk_2thirds.sh
7 directories, 6 files
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
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 cannot attach files in this forum
You can download files in this forum
Powered by phpBB © 2001, 2005 phpBB Group