Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 19 Nov 2017, 17:43
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
Four scripts to create, fill, check and back-up /mnt/ram1
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
musher0


Joined: 04 Jan 2009
Posts: 11158
Location: Gatineau (Qc), Canada

PostPosted: 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.
~~~~~~~~~~~~~~
Hello all.

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
create,
fill,
check and
back-up /mnt/ram1.

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
content there.

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.

Enjoy.
~~~~~~~~~~
PS. The tree of the pet archive is as follows:
Quote:
[4.0K] ./etc
[4.0K] ./etc/init.d
[ 431] ./etc/init.d/stop_ramdisk-0.1
[4.0K] ./opt
[4.0K] ./opt/local
[4.0K] ./opt/local/bin
[1.6K] ./opt/local/bin/ramdisk_2thirds.sh
[ 834] ./opt/local/bin/ramdisk_check.sh
[ 610] ./opt/local/bin/ramdisk_cp.sh
[ 158] ./pet.specs
[4.0K] ./root
[4.0K] ./root/Startup
[ 33] ./root/Startup/zzz_ramdisk.sh -> /opt/local/bin/ramdisk_2thirds.sh
7 directories, 6 files
RamDisk_2thirds-0.1.pet
Description 
pet

 Download 
Filename  RamDisk_2thirds-0.1.pet 
Filesize  2.9 KB 
Downloaded  15 Time(s) 

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
Jump to:  

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
[ Time: 0.0274s ][ Queries: 13 (0.0034s) ][ GZIP on ]