<?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>Giuseppe Coviello &#187; Fedora</title>
	<atom:link href="http://osl.uniparthenope.it/people/cjg/tag/fedora/feed/" rel="self" type="application/rss+xml" />
	<link>http://osl.uniparthenope.it/people/cjg</link>
	<description>... from this day to the ending of the world, But we in it shall be remember&#039;d; We few, we happy few, we band of brothers; For he to-day that sheds his blood with me Shall be my brother ...</description>
	<lastBuildDate>Mon, 14 Jun 2010 17:58:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>gVirtuS: the first beta release</title>
		<link>http://osl.uniparthenope.it/people/cjg/2010/03/gvirtus-the-first-beta-release/</link>
		<comments>http://osl.uniparthenope.it/people/cjg/2010/03/gvirtus-the-first-beta-release/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 08:38:09 +0000</pubDate>
		<dc:creator>cjg</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[cuda]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[gpgpu]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[osl]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://osl.uniparthenope.it/people/cjg/?p=542</guid>
		<description><![CDATA[We are proud to announce the first beta release of gVirtuS.
gVirtuS allows an instanced virtual machine to access GPGPUs in a transparent way, with an overhead  slightly greater than a real machine/GPGPU setup. gVirtuS is hypervisor independent, and, even though it currently virtualizes nVIDIA CUDA based GPUs.
The software, developed for research applications, is provided as it is.
We encourage using and testing it in order to collect useful feedbacks and suggestions.
Take a look to the gVirtuS project page: http://osl.uniparthenope.it/projects/gvirtus/.
]]></description>
			<content:encoded><![CDATA[<p>We are proud to announce the first beta release of gVirtuS.</p>
<p>gVirtuS allows an instanced virtual machine to access GPGPUs in a transparent way, with an overhead  slightly greater than a real machine/GPGPU setup. gVirtuS is hypervisor independent, and, even though it currently virtualizes nVIDIA CUDA based GPUs.</p>
<p>The software, developed for research applications, is provided as it is.</p>
<p>We encourage using and testing it in order to collect useful feedbacks and suggestions.</p>
<p>Take a look to the gVirtuS project page: <a href="http://osl.uniparthenope.it/projects/gvirtus/">http://osl.uniparthenope.it/projects/gvirtus/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://osl.uniparthenope.it/people/cjg/2010/03/gvirtus-the-first-beta-release/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Nvidia drivers on Fedora 12 with DKMS</title>
		<link>http://osl.uniparthenope.it/people/cjg/2010/02/using-nvidia-drivers-on-fedora-12-with-dkms/</link>
		<comments>http://osl.uniparthenope.it/people/cjg/2010/02/using-nvidia-drivers-on-fedora-12-with-dkms/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 15:37:24 +0000</pubDate>
		<dc:creator>cjg</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[cuda]]></category>
		<category><![CDATA[dkms]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[nvidia]]></category>

		<guid isPermaLink="false">http://osl.uniparthenope.it/people/cjg/?p=524</guid>
		<description><![CDATA[Although it sucks too much using closed source software, someone wants or have to use that. It&#8217;s the case of Nvidia graphics drivers: someone wants them to obtain better performances, others have to use them because their adapters don&#8217;t work well with open source drivers, and others (like me) have to use Nvidia closed drivers for developing and using CUDA applications.
This is essentially a manual installation but thanks to DKMS, Dynamic Kernel Module Support, it isn&#8217;t required anymore to reinstall [...]]]></description>
			<content:encoded><![CDATA[<p>Although it sucks too much using closed source software, someone wants or have to use that. It&#8217;s the case of Nvidia graphics drivers: someone wants them to obtain better performances, others have to use them because their adapters don&#8217;t work well with open source drivers, and others (like me) have to use Nvidia closed drivers for developing and using CUDA applications.</p>
<p>This is essentially a manual installation but thanks to <a href="http://linux.dell.com/projects.shtml">DKMS</a>, Dynamic Kernel Module Support, it isn&#8217;t required anymore to reinstall the driver at every kernel update.</p>
<p><span id="more-524"></span></p>
<p>Fedora 12 comes with the nouveau driver, I&#8217;m not saying that it isn&#8217;t good enough, but we have to force the system to don&#8217;t use it because only a driver at a time can manage a device. The first thing that we have to do is to blacklist the &#8220;nouveau&#8221; module to prevent that the kernel loads it automatically, to obtain this we should add the row to the file /etc/modprobe.d/blacklist.conf:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">blacklist nouveau</pre></div></div>

<p>and then rebuild the initrd image with dracut, using the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">dracut <span style="color: #660033;">--force</span> <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>initramfs-$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #7a0874; font-weight: bold;">&#41;</span>.img $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Fedora 12 comes also with <a href="http://fedoraproject.org/wiki/Features/KernelModesetting">KernelModesetting</a>, it&#8217;s a service that moves the graphics mode initialization from the X server startup to the kernel, and of course we need to disable it because it would load the nouveau driver. It&#8217;s possible to disable KMS adding the &#8220;nomodeset&#8221; option to the kernel boot parameters, so to obtain this we have to add the option nomodeset to (every) kernel entry in our /boot/grub/grub.conf. Fedora kernel&#8217;s post-install scripts are smart enough to add to the new kernel all the options used by the previous one, so it isn&#8217;t needed to add manually the &#8220;nomodeset&#8221; option when it will be installed an updated kernel.</p>
<p>Now neither the kernel or the KMS service would load the nouveu driver, we can nevermind about the xorg.conf because the nvidia-installer will create it later.</p>
<p>Now we can install the Nvidia driver, I&#8217;m using an x86_64 system and I want to use the version 190.42 of the Nvidia driver so I can download the package:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>us.download.nvidia.com<span style="color: #000000; font-weight: bold;">/</span>XFree86<span style="color: #000000; font-weight: bold;">/</span>Linux-x86_64<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">190.42</span><span style="color: #000000; font-weight: bold;">/</span>NVIDIA-Linux-x86_64-<span style="color: #000000;">190.42</span>-pkg2.run</pre></div></div>

<p>And we can run the following command to install the X Server related part of the driver:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sh</span> NVIDIA-Linux-x86_64-<span style="color: #000000;">190.42</span>-pkg2.run <span style="color: #660033;">--no-x-check</span> <span style="color: #660033;">--silent</span> <span style="color: #660033;">--no-kernel-module</span>  <span style="color: #660033;">--run-nvidia-xconfig</span></pre></div></div>

<p>It&#8217;s possible to make the installation in graphic mode (ie runlevel 5) because we aren&#8217;t going to use the nvidia driver in this session: it wouldn&#8217;t be possible, the nouveau driver is loaded and has acquired the control over the graphic adapter.</p>
<p>Finally we can configure dkms for building and installing automatically the nvidia kernel module when the system boots. But of course it is needed to install dkms, and enable it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> dkms
chkconfig dkms_autoinstaller on</pre></div></div>

<p>DKMS can manage many modules with different versions too, each module&#8217;s sources are located in &#8220;/usr/src/-&#8221;, so we have to create the directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>nvidia-<span style="color: #000000;">190.42</span></pre></div></div>

<p>copy the module sources (extracting them from the autoinstallable package) to that directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sh</span> NVIDIA-Linux-x86_64-<span style="color: #000000;">190.42</span>-pkg2.run <span style="color: #660033;">-x</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> NVIDIA-Linux-x86_64-<span style="color: #000000;">190.42</span>-pkg2<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>nv<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>nvidia-<span style="color: #000000;">190.42</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> NVIDIA-Linux-x86_64-<span style="color: #000000;">190.42</span>-pkg2</pre></div></div>

<p>and create a file that instructs dkms on how build and install the module, the file is conventionally named dkms.conf:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># /usr/src/nvidia-190.42/dkms.conf</span>
<span style="color: #666666; font-style: italic;">#</span>
&nbsp;
<span style="color: #007800;">PACKAGE_NAME</span>=<span style="color: #ff0000;">&quot;nvidia&quot;</span>
<span style="color: #007800;">PACKAGE_VERSION</span>=<span style="color: #ff0000;">&quot;190.42&quot;</span>
<span style="color: #007800;">CLEAN</span>=<span style="color: #ff0000;">&quot;true&quot;</span>
MAKE<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>=<span style="color: #ff0000;">&quot;make module&quot;</span>
BUILD_MODULE_NAME<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>=<span style="color: #ff0000;">&quot;nvidia&quot;</span>
DEST_MODULE_LOCATION<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>=<span style="color: #ff0000;">&quot;/kernel/drivers/video/&quot;</span>
<span style="color: #007800;">AUTOINSTALL</span>=<span style="color: #ff0000;">&quot;yes&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># End Of File</span></pre></div></div>

<p>In dkms.conf where sayng the name and the version of the module, to use &#8220;make module&#8221; as the make command, that the name of the built module is &#8220;nvidia&#8221; and that the module have to be installed automatically. (Note: we use &#8220;true&#8221; as the clean command because the default &#8220;make clean&#8221; would erase every object file, but some of them are closed source so we can&#8217;t recreate them.)</p>
<p>The last thing to do is to add the module to the dkms database with the command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">dkms add <span style="color: #660033;">-m</span> nvidia <span style="color: #660033;">-v</span> <span style="color: #000000;">190.42</span></pre></div></div>

<p>.</p>
<p>and then reboot the system to use the nvidia driver.</p>
<p>That&#8217;s all folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://osl.uniparthenope.it/people/cjg/2010/02/using-nvidia-drivers-on-fedora-12-with-dkms/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Fedora 11 Release Party Napoli</title>
		<link>http://osl.uniparthenope.it/people/cjg/2009/06/fedora-11-release-party-napoli/</link>
		<comments>http://osl.uniparthenope.it/people/cjg/2009/06/fedora-11-release-party-napoli/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 22:32:19 +0000</pubDate>
		<dc:creator>cjg</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Parthenope]]></category>

		<guid isPermaLink="false">http://cjg.cruxppc.org/?p=341</guid>
		<description><![CDATA[
When and Where

Thursday, June 18
11:30 am onwards
Location: University of Naples &#8220;Parthenope&#8221; &#8211; Faculty of Science and Technlogies, Centro Direzionale di Napoli Isola C4


Responsible Ambassadors

Giuseppe Coviello


Attendees

Gianluca Varisco
&#8230; add yourself here! &#8230;


Program

11.30: &#8220;Welcomes to the conference&#8221; by Prof. Giulio Giunta
11.50: &#8220;Fedora 11, New Features&#8221; by Gianluca Varisco
12.20: &#8220;Free Software availment in italian universities&#8221; by Carlo Palmieri
12.40: &#8220;Presentation of the new magazine PaperUni&#8221; by Marielvira Matrone
13.10: &#8220;Open lunch and free speech&#8221;
14.30: &#8220;Workshop: realizing a scientific cluster using Fedora&#8221; by Giuseppe Agrillo
15.30: &#8220;About the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Locandina" src="http://www.nalug.net/fedora-11-release-party/image_mini" alt="" width="141" height="200" /></p>
<h2><span class="mw-headline">When and Where</span></h2>
<ul>
<li>Thursday, June 18</li>
<li>11:30 am onwards</li>
<li>Location: University of Naples &#8220;Parthenope&#8221; &#8211; Faculty of Science and Technlogies, Centro Direzionale di Napoli Isola C4</li>
</ul>
<p><a id="Responsible_Ambassadors" name="Responsible_Ambassadors"></a></p>
<h2><span class="mw-headline">Responsible Ambassadors</span></h2>
<ul>
<li><a title="User:Cjg" href="https://fedoraproject.org/wiki/User:Cjg">Giuseppe Coviello</a></li>
</ul>
<p><a id="Attendees" name="Attendees"></a></p>
<h2><span class="mw-headline">Attendees</span></h2>
<ol>
<li><a title="User:Giangy" href="https://fedoraproject.org/wiki/User:Giangy">Gianluca Varisco</a></li>
<li>&#8230; add yourself here! &#8230;</li>
</ol>
<p><a id="Program" name="Program"></a></p>
<h2><span class="mw-headline">Program</span></h2>
<ul>
<li>11.30: &#8220;Welcomes to the conference&#8221; by Prof. Giulio Giunta</li>
<li>11.50: &#8220;Fedora 11, New Features&#8221; by Gianluca Varisco</li>
<li>12.20: &#8220;Free Software availment in italian universities&#8221; by Carlo Palmieri</li>
<li>12.40: &#8220;Presentation of the new magazine PaperUni&#8221; by Marielvira Matrone</li>
<li>13.10: &#8220;Open lunch and free speech&#8221;</li>
<li>14.30: &#8220;Workshop: realizing a scientific cluster using Fedora&#8221; by Giuseppe Agrillo</li>
<li>15.30: &#8220;About the NaLUG&#8221; by Gianfilippo Giannini</li>
<li>15.50: &#8220;The Fedora project, the community, the ambassadors&#8221; by Gianluca Varisco</li>
<li>16.20: &#8220;Future projects, distribution of gadgets and final regards&#8221; by Giuseppe Coviello</li>
</ul>
<p>&#8212;</p>
<ul>
<li>23.00: Party restarting at Arenile Reload</li>
</ul>
<p><a id="Organizers" name="Organizers"></a></p>
<h2><span class="mw-headline">Organizers</span></h2>
<ul>
<li><a class="external text" title="http://www.uduparthenope.it/" href="http://www.uduparthenope.it/">UDU Parthenope</a></li>
<li><a class="external text" title="http://www.nalug.net/" href="http://www.nalug.net/">NaLUG &#8211; Napoli GNU/Linux Users Group</a></li>
</ul>
<p><a id="Contributors" name="Contributors"></a></p>
<h2><span class="mw-headline">Contributors</span></h2>
<ul>
<li>Associazione Palinsesto</li>
<li><a class="external text" title="http://www.cruxppc.org/" href="http://www.cruxppc.org/">CRUX PPC</a></li>
</ul>
<p><a id="Contact" name="Contact"></a></p>
<h2><span class="mw-headline">Contact</span></h2>
<ul>
<li>Contact: Giuseppe Coviello (cjg@fedoraproject.org).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://osl.uniparthenope.it/people/cjg/2009/06/fedora-11-release-party-napoli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using ZFS for home partition on Fedora</title>
		<link>http://osl.uniparthenope.it/people/cjg/2009/05/using-zfs-for-home-partition-on-fedora/</link>
		<comments>http://osl.uniparthenope.it/people/cjg/2009/05/using-zfs-for-home-partition-on-fedora/#comments</comments>
		<pubDate>Sat, 02 May 2009 17:24:53 +0000</pubDate>
		<dc:creator>cjg</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://cjg.cruxppc.org/?p=281</guid>
		<description><![CDATA[ZFS is a great filesystem: it&#8217;s based on a copy-on-write transactional model, it supports dynamic striping of data across all devices, it supports a transparent compression and many more features, but the more interesting feature to me is the support for snapshot and clones.
I feel interesting snapshots and clones primarily for backups: using a snapshot could be very trivial making a backup of the filesystem, moreover it&#8217;s possible making incremental backup with snapshots.
Although ZFS is developed primary for Solaris and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/ZFS">ZFS</a> is a great filesystem: it&#8217;s based on a copy-on-write transactional model, it supports dynamic striping of data across all devices, it supports a transparent compression and many more features, but the more interesting feature to me is the support for snapshot and clones.</p>
<p>I feel interesting snapshots and clones primarily for backups: using a snapshot could be very trivial making a backup of the filesystem, moreover it&#8217;s possible making incremental backup with snapshots.</p>
<p>Although ZFS is developed primary for Solaris and OpenSolaris, it&#8217;s possible to use it on GNU/Linux through <a href="http://en.wikipedia.org/wiki/Filesystem_in_Userspace">FUSE </a>(Filesytem in Userspace), so it&#8217;s possible to use ZFS on GNU/Linux for all purposes (although could be very trouble using it for the root filesystem).</p>
<p>Fedora (10 or 11 ones) is pretty ready for using ZFS: it&#8217;s available a package (zfs-fuse) for ZFS-FUSE on the official repository, so the first step for using ZFS is installing this package with yum:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> zfs-fuse</pre></div></div>

<p>Then it&#8217;s possible to create the pool of devices containing the filesystems and the filesystems; first of all I&#8217;ve created a pool on a partition of one of the harddisks of mine; before creating the book I&#8217;ve labelled the partition &#8220;ZFS&#8221; using &#8220;Palimpsest Disk Utility&#8221;, so I&#8217;ve created the pool with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">zpool create zfs <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>disk<span style="color: #000000; font-weight: bold;">/</span>by-label<span style="color: #000000; font-weight: bold;">/</span>ZFS</pre></div></div>

<p>And then the filesystems, setting the use of compression and disabling the storing of file access time:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">zfs create zfs<span style="color: #000000; font-weight: bold;">/</span>home
zfs <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">compression</span>=on zfs<span style="color: #000000; font-weight: bold;">/</span>home
zfs <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">atime</span>=off zfs<span style="color: #000000; font-weight: bold;">/</span>home
zfs create zfs<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cjg</pre></div></div>

<p>Finally I&#8217;ve setted the mount point for the home filesystem:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">zfs <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">mountpoint</span>=<span style="color: #000000; font-weight: bold;">/</span>home zfs<span style="color: #000000; font-weight: bold;">/</span>home</pre></div></div>

<p>Les jeux sont fait! From the next reboot I&#8217;ll use ZFS for my /home partition.</p>
<p>Now I had to create a new pool for storing the backups, I&#8217;ve created it on another partition of another disk (the partition is labelled &#8220;ZFSBACKUP&#8221;):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">zpool create zfsbackup <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>disk<span style="color: #000000; font-weight: bold;">/</span>by-label<span style="color: #000000; font-weight: bold;">/</span>ZFSBACKUP
zfs create zfs<span style="color: #000000; font-weight: bold;">/</span>home
zfs <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">compression</span>=on zfs<span style="color: #000000; font-weight: bold;">/</span>home
zfs <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">atime</span>=off zfs<span style="color: #000000; font-weight: bold;">/</span>home</pre></div></div>

<p>I want that all backups will be stored on the zfsbackup pool and I want, also, to use incremental backups, so I&#8217;ve setted up a simple script for making incremental backups from the zfs pool to the zfsbackup pool:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">DATE</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>F-<span style="color: #000000; font-weight: bold;">%</span>H-<span style="color: #000000; font-weight: bold;">%</span>M<span style="color: #000000; font-weight: bold;">`</span>
zfs snapshot zfs<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cjg<span style="color: #000000; font-weight: bold;">@</span><span style="color: #007800;">$DATE</span>
zfs send <span style="color: #660033;">-i</span> latest zfs<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cjg<span style="color: #000000; font-weight: bold;">@</span><span style="color: #007800;">$DATE</span> <span style="color: #000000; font-weight: bold;">&gt;</span> dump
zfs recv zfsbackup<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cjg <span style="color: #000000; font-weight: bold;">&lt;</span> dump
<span style="color: #c20cb9; font-weight: bold;">rm</span> dump
zfs destroy zfs<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cjg<span style="color: #000000; font-weight: bold;">@</span>latest
zfs rename zfs<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cjg<span style="color: #000000; font-weight: bold;">@</span><span style="color: #007800;">$DATE</span> zfs<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cjg<span style="color: #000000; font-weight: bold;">@</span>latest
&nbsp;
<span style="color: #666666; font-style: italic;"># End Of File</span></pre></div></div>

<p>Simply it creates a snapshot of the zfs/home/cjg filesystem and calling it with the current date and time, then with &#8220;zfs send&#8221; it creates an incremental replication from the latest snapshot, then the replication it&#8217;s importend on zfsbackup/home/cjg, the latest snapshot on zfs/home/cjg is removed and the current snapshot is renamed as the latest.<br />
In this way all the snapshot&#8217;s history is stored only on the zfsbackup pool.</p>
<p>Before using this script for the first time I had to create the &#8220;latest&#8221; snapshot on zfs/home/cjg and send it to zfsbackup/home/cjg with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">zfs snapshot zfs<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cjg<span style="color: #000000; font-weight: bold;">@</span>latest
zfs send zfs<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cjg<span style="color: #000000; font-weight: bold;">@</span>latest <span style="color: #000000; font-weight: bold;">&gt;</span> dump
zfs recv zfsbackup<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cjg <span style="color: #000000; font-weight: bold;">&lt;</span> dump</pre></div></div>

<p>To access a particular snapshot it&#8217;s possible to use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">zfs clone zfsbackup<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>cjg<span style="color: #000000; font-weight: bold;">@</span><span style="color: #000000;">2009</span>-05-02-<span style="color: #000000;">12</span>-<span style="color: #000000;">33</span> zfsbackup<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>-05-02-<span style="color: #000000;">12</span>-<span style="color: #000000;">33</span></pre></div></div>

<p>So it&#8217;s possible to access to the snapshot file through &#8220;/zfsbackup/home/2009-05-02-12-33&#8243;; of course it&#8217;s possible to use &#8220;zfs rollback&#8221; to restore the filesystem from a snapshot.</p>
<p>When the clone isn&#8217;t needed anymore it&#8217;s possible to remove it with</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">zfs destroy zfsbackup<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>-05-02-<span style="color: #000000;">12</span>-<span style="color: #000000;">33</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://osl.uniparthenope.it/people/cjg/2009/05/using-zfs-for-home-partition-on-fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
