{"id":842,"date":"2011-10-27T15:30:23","date_gmt":"2011-10-27T20:30:23","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=842"},"modified":"2011-10-28T11:52:53","modified_gmt":"2011-10-28T16:52:53","slug":"opendedup-ubuntu","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2011\/10\/opendedup-ubuntu\/","title":{"rendered":"Opendedup Ubuntu"},"content":{"rendered":"<p>After playing around with ZFS for a while (it&#8217;s pretty nice, especially snapshots), I wanted to try non-solaris-type-deduplication.  Opendedup was the answer.<\/p>\n<p>I installed on a 2.8GHz Xeon Dell Poweredge 850 with 2GB RAM, and a mirrored array 500GB SATA drives.<\/p>\n<p>Installed 10.04.3 LTS x64<\/p>\n<p><strong>Upgrade the Server<\/strong><br \/>\n<code>apt-get dist-upgrade<\/code><br \/>\nreboot<\/p>\n<p><strong>Install and Download<\/strong><br \/>\n<code>apt-get install openjdk-6-jre<\/code><br \/>\n<code>apt-get install attr<\/code><br \/>\n<code>wget http:\/\/opendedup.googlecode.com\/files\/sdfs-1.1.0_amd64.deb<\/code><br \/>\n<code>wget http:\/\/opendedup.googlecode.com\/files\/sdfs_fuse_2.8.4.tar.gz<\/code><br \/>\n<code>tar zxvf sdfs_fuse_2.8.4.tar.gz<\/code><br \/>\n<code>cd sdfs_fuse_2.8.4<\/code><br \/>\n<code>dpkg --install *.deb<\/code><br \/>\n<code>apt-get install -f<\/code><br \/>\n<code>dpkg -i sdfs-1.1.0_amd64.deb<\/code><br \/>\n<code>apt-get install -f<\/code><\/p>\n<p><strong>Edit<\/strong><br \/>\n<code>nano \/etc\/security\/limits.conf<\/code><br \/>\nAdd the following above # End of file:<\/p>\n<blockquote><p>soft\tnofile\t65535<br \/>\nhard\tnofile\t65535<\/p><\/blockquote>\n<p><strong>Create<\/strong><br \/>\n<code>\/sbin\/mkfs.sdfs --volume-name=VOLUMENAME --volume-capacity=CAPACITY<\/code><br \/>\nSo in my case I wanted a 10GB volume for testing:<br \/>\n<code>\/sbin\/mkfs.sdfs --volume-name=volume1 --volume-capacity=10GB<\/code><\/p>\n<p><strong>Mount<\/strong><br \/>\n<code>mkdir \/mnt\/volume1<\/code><br \/>\n<code>\/sbin\/mount.sdfs -v VOLUMENAME -m MOUNTPOINT<\/code><br \/>\n<code>\/sbin\/mount.sdfs -v volume1 -m \/mnt\/volume1<\/code><\/p>\n<p><strong>Verify<\/strong><br \/>\n<code>df -h<\/code><\/p>\n<blockquote><p>sdfs:\/etc\/sdfs\/volume1-volume-cfg.xml:6442<br \/>\n                       10G     0   10G   0% \/mnt\/volume1<\/p><\/blockquote>\n<p>I then copied about 2GB worth of data.  Looks like it parses through every 10 minutes or so &#8211; but since it&#8217;s the end of the day I&#8217;ll be checking in the morning.<\/p>\n<p>There are a few common errors with simple fixes.<br \/>\n1. OutOfMemoryError &#8211; This is caused by the size of the DedupStorageEngine memory requirements being<br \/>\nlarger than the heap size allocated for the JVM. To fix this edit the mount.sdfs script and increase the<br \/>\n-Xmx2g to something larger (e.g. -Xmx4g).<\/p>\n<p>The files are actually stored in \/opt\/sdfs\/volumes\/VOLUMENAME<br \/>\n<code>du -hc<\/code><br \/>\nCompare to df -h<br \/>\n<code>df -h<\/code><\/p>\n<p>In my example:<br \/>\ndf -h<br \/>\n 10G  5.4G  4.7G  54% \/mnt\/volume1<br \/>\ndu -hc<br \/>\n3.1G    total<\/p>\n<p>So I&#8217;m using 5.4GB of space, but it&#8217;s only recorded as 3.1GB.  Not a bad savings right there.<\/p>\n<p>Next I&#8217;ll fill up the 10GB drive I created and see how much it really saves.<\/p>\n<p>So I wanted a second volume shared for vmware using NFS.  I ended up installing webmin and doing some of the configuration there for samba\/cifs and nfs, but here&#8217;s my notes for commands on the opendedup server:<\/p>\n<p><code>apt-get install nfs-kernel-server<\/code><br \/>\n<code>nano \/etc\/exports<\/code><br \/>\nAdd \/export\/volume2 *(insecure,no_subtree_check,rw,nohide,fsid=0)<br \/>\n<code>\/etc\/init.d\/nfs-kernel-server restart<\/code><\/p>\n<p><strong>Delete a Volume<\/strong><br \/>\nIf you ever need to delete a volume, make sure that you unmount it first:<br \/>\n<code>umount \/mnt\/volume1<\/code><br \/>\nThen you can remove the data files:<br \/>\n<code>rm -rf \/opt\/sdfs\/volumes\/volume1<\/code><br \/>\nThe log files:<br \/>\n<code>rm \/var\/log\/sdfs\/volume1*<\/code><br \/>\nAnd finally the configuration files:<br \/>\n<code>rm \/etc\/sdfs\/volume1*<\/code><\/p>\n<p><strong>Show Volume Info<\/strong><br \/>\n<code>\/sbin\/sdfscli --volume-info<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After playing around with ZFS for a while (it&#8217;s pretty nice, especially snapshots), I wanted to try non-solaris-type-deduplication. Opendedup was the answer. I installed on a 2.8GHz Xeon Dell Poweredge 850 with 2GB RAM, and a mirrored array 500GB SATA drives. Installed 10.04.3 LTS x64 Upgrade the Server apt-get dist-upgrade reboot Install and Download apt-get &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2011\/10\/opendedup-ubuntu\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Opendedup Ubuntu<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-842","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=842"}],"version-history":[{"count":6,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/842\/revisions"}],"predecessor-version":[{"id":848,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/842\/revisions\/848"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}