<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TJLUG &#187; ramdisk</title>
	<atom:link href="http://www.tjlug.org/tag/ramdisk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tjlug.org</link>
	<description>The stone age is an electrical power cut away !</description>
	<lastBuildDate>Sun, 25 Jul 2010 14:29:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>how to mount a ram hard disk in Linux</title>
		<link>http://www.tjlug.org/2010/02/01/how-to-mount-a-ram-hard-disk-in-linux/</link>
		<comments>http://www.tjlug.org/2010/02/01/how-to-mount-a-ram-hard-disk-in-linux/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 08:54:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hard disks]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[ramdisk]]></category>

		<guid isPermaLink="false">http://www.tjlug.org/?p=358</guid>
		<description><![CDATA[In this post, i will show you how to create a very fast, 0 latency hard drive from the extra gigabyte or 2 on your system 1- You need to change the boot options to allow this&#8230; Since i use debian lenny, my boot options look like this in /boot/grub/menu.lst title        Debian GNU/Linux, kernel [...]]]></description>
			<content:encoded><![CDATA[<p>In this post, i will show you how to create a very fast, 0 latency hard drive from the extra gigabyte or 2 on your system</p>
<p>1- You need to change the boot options to allow this&#8230;</p>
<p>Since i use debian lenny, my boot options look like this in /boot/grub/menu.lst</p>
<p>title        Debian GNU/Linux, kernel 2.6.26-2-686<br />
root        (hd0,1)<br />
kernel        /boot/vmlinuz-2.6.26-2-686 root=/dev/sda2 ro quiet<br />
initrd        /boot/initrd.img-2.6.26-2-686</p>
<p>We need to append ramdisk_size=1572864 if we wanted a 1.5GB RAM drive, make sure you have 1.5GB EXTRA on your system, let&#8217;s say you must have a minimum of 2GB for the system to run using the 512MB you are leaving the system with</p>
<p>title        Debian 1.5GB Ramdisk, kernel 2.6.26-2-686<br />
root        (hd0,1)<br />
kernel        /boot/vmlinuz-2.6.26-2-686 root=/dev/sda2 ro quiet ramdisk_size=1572864<br />
initrd        /boot/initrd.img-2.6.26-2-686</p>
<p>You are done for now, if you want to format and use it do this</p>
<p>/sbin/mkfs.ext2 /dev/ram0</p>
<p>Remember that you need to format as ext2 and not ext3, i have seen people format the hard drive as EXT3, why would you ever need Journaling on a RAM disk that is already volatile (Deleted when you reboot)</p>
<p>mkdir /ramdisk<br />
mount /dev/ram0 /ramdisk</p>
<p>You can now get creative and format or load a disk image at boot time, in any case, the RAM is only allocated to the disk when you use it, but you really don&#8217;t need to know that to use your new RAM hard disk</p>
<p>NOTE: I chose to explain RAM disk because later on i will show you what advantages we can get from having a block level device, you can surely do this without modifying boot options by simply using tempfs or RAMFS that give you an instant ram disk, but it is not a block level device in that case</p>
<p>Testing Speed</p>
<p>So, you want to see how fast it is, but for that we need a data source that can push this thing to the maximum, the answer is /dev/zero that responds with a stream of zeros, so let us write a 1.3GB file to our new volatile hard disk</p>
<p>dd if=/dev/zero of=/ramdisk/pathtoimage.img bs=1M count=1300</p>
<p>On my computer, this took about 4.54006 seconds.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tjlug.org/2010/02/01/how-to-mount-a-ram-hard-disk-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
