<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-686052747553296167</id><updated>2012-02-16T14:55:08.941-08:00</updated><category term='Misc'/><category term='*BSD'/><category term='tech'/><category term='NetBSD'/><category term='shell'/><category term='GlusterFS'/><title type='text'>/sac</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-7992141846414894947</id><published>2011-05-17T01:35:00.000-07:00</published><updated>2011-05-17T02:47:23.471-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GlusterFS'/><title type='text'>GlusterFS: replace-brick</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;GlusterFS has a volume command called replace-brick, intuitively it replaces one brick with another. However, the way it works is not quite intuitive but requires some understanding before actually trying it out.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="white-space: pre-wrap; word-wrap: break-word;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Let us say the cluster looks like this:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="white-space: pre-wrap; word-wrap: break-word;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;i&gt;# gluster volume info&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Volume Name: rb-test&lt;br /&gt;Type: Distribute&lt;br /&gt;Status: Started&lt;br /&gt;Number of Bricks: 4&lt;br /&gt;Transport-type: tcp&lt;br /&gt;Bricks:&lt;br /&gt;Brick1: 192.168.1.95:/data/distributestore/store-1&lt;br /&gt;Brick2: 192.168.1.95:/data/distributestore/store-2&lt;br /&gt;Brick3: 192.168.1.96:/data/distributestore/store-1&lt;br /&gt;Brick4: 192.168.1.96:/data/distributestore/store-2&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;To replace the brick 192.168.1.95:/data/distributestore/store-2 with 192.168.1.77:/data/distributestore/store-2 we run the following command.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;# gluster volume replace-brick rb-test \ &lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;192.168.1.95:/data/distributestore/store-2 \ &lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;i&gt;192.168.1.77:/data/distributestore/store-2 start&lt;/i&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="white-space: pre-wrap; word-wrap: break-word;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;This command basically migrates the data from&lt;br /&gt;&lt;i&gt;192.168.1.95:/data/distributestore/store-2&lt;/i&gt; to &lt;i&gt;192.168.1.77:/data/distributestore/store-2&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;But actual brick replacement is not done on the volume yet. After the completion of the above command the data is present both on 192.168.1.95:/data/distributestore/store-2 and&lt;br /&gt;192.168.1.77:/data/distributestore/store-2.&lt;br /&gt;&lt;br /&gt;To include the brick 192.168.1.77:/data/distributestore/store-2 to the cluster the command,&lt;br /&gt;&lt;br /&gt;# gluster volume replace-brick rb-test \ 192.168.1.95:/data/distributestore/store-2 \&lt;br /&gt;192.168.1.77:/data/distributestore/store-2 commit&lt;br /&gt;&lt;br /&gt;has to be run. This attaches the brick to the cluster. After the above command volume info looks like this:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="white-space: pre-wrap; word-wrap: break-word;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;i&gt;[root@centos5 store-2]# gluster volume info rb-test&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;b&gt;Volume Name: rb-test&lt;br /&gt;Type: Distribute&lt;br /&gt;Status: Started&lt;br /&gt;Number of Bricks: 4&lt;br /&gt;Transport-type: tcp&lt;br /&gt;Bricks:&lt;br /&gt;Brick1: 192.168.1.95:/data/distributestore/store-1&lt;br /&gt;Brick2: 192.168.1.77:/data/distributestore/store-2&lt;br /&gt;Brick3: 192.168.1.96:/data/distributestore/store-1&lt;br /&gt;Brick4: 192.168.1.96:/data/distributestore/store-2&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;br /&gt;If you need to just create a backup of a brick just run `gluster volume replace-brick &amp;lt;VOLNAME&amp;gt; &amp;lt;BRICK&amp;gt; &amp;lt;NEW-BRICK&amp;gt; start' ;-).&lt;br /&gt;&lt;br /&gt;The volume command `replace-brick' has other sub-commands viz pause, abort, status which are pretty much intuitive. See &lt;a href="http://goo.gl/F3Lfw"&gt;http://goo.gl/F3Lfw&lt;/a&gt; for more details on them.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-7992141846414894947?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/7992141846414894947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2011/05/glusterfs-replace-brick.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/7992141846414894947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/7992141846414894947'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2011/05/glusterfs-replace-brick.html' title='GlusterFS: replace-brick'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-801819804647072463</id><published>2011-05-15T07:15:00.000-07:00</published><updated>2011-05-18T08:38:18.347-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Shell: Reading directory with spaces in filename</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;My friend asked me how do you read a directory which has spaces in file names and assign them to a variable.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;For example if my directory test has a file `foo bar.txt' &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;for file in `ls`; do&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "$file"&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;done&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;does not work, the variable file is assigned `foo' and `bar.txt'.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;There is more than one way to solve this problem.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;1. This works on most of the systems.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;for file in *; do&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "$file"&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;done &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;2. Will definitely work.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;IFS='&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;'&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;for file in `ls`; do&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "$file"&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;done&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;or&lt;/span&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;IFS=`echo -en "\n\b"`&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;for file in `ls`; do&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "$file"&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;done&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;3. One of my favorites and most efficient.&lt;/span&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;find . -type f -print0 | while read -d $'\0' file; do&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "$file"&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;done&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-801819804647072463?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/801819804647072463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2011/05/shell-reading-directory-with-spaces-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/801819804647072463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/801819804647072463'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2011/05/shell-reading-directory-with-spaces-in.html' title='Shell: Reading directory with spaces in filename'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-4373711545939276299</id><published>2011-05-11T06:26:00.000-07:00</published><updated>2011-05-11T06:26:05.715-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NetBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><title type='text'>Sparse files: du vs. ls -h</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;When the disk size is checked for a &lt;a href="http://en.wikipedia.org/wiki/Sparse_file"&gt;sparse file&lt;/a&gt; using `ls -lh' and `du -h' they report different sizes. This is not because of a bug in either du/ls or the filesystem itself, but the way du and ls calculate the file size.&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;du uses fts(3) to walk the filesystem and calculates the sizes of the files (this is on the BSDs, I haven't checked the GNU version of du but it will be more or less the same).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;du calculates the size by looking into &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;b&gt;*fts_statp-&amp;gt;st_blocks&lt;/b&gt;  from the FTSENT structure, which is the number of allocated blocks with block size 512 bytes. Hence the size is calculated as &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;*fts_statp-&amp;gt;st_blocks * 512, fts_statp is the &lt;b&gt;struct *stat&lt;/b&gt; from the stat(2) call.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;On the other hand `ls -l' uses the same above method as `du' but looks into the &lt;b&gt;st_size&lt;/b&gt; field of the stat structure to determine the file size. This gives the size of the file than the actual allocated blocks.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;References:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/du/du.c?rev=1.34&amp;amp;content-type=text/x-cvsweb-markup&amp;amp;only_with_tag=MAIN&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;http://cvsweb.netbsd.org/bsdweb.cgi/src/bin/ls/ls.c?rev=1.68&amp;amp;content-type=text/x-cvsweb-markup&amp;amp;only_with_tag=MAIN&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-4373711545939276299?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/4373711545939276299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2011/05/sparse-files-du-vs-ls-h.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/4373711545939276299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/4373711545939276299'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2011/05/sparse-files-du-vs-ls-h.html' title='Sparse files: du vs. ls -h'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-6752640591909235303</id><published>2011-05-07T08:00:00.000-07:00</published><updated>2011-05-07T08:24:57.013-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GlusterFS'/><title type='text'>ReiserFS doesn't like GlusterFS?</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt;ReiserFS comes as a default filesystem on my &lt;a href="http://www.slackware.com/"&gt;Slackware&lt;/a&gt; box and somehow I notice that ReiserFS does not seem to like GlusterFS. The system locks up while doing xattr operations and dmesg reports bunch of warnings before locking up:&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;meta equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;i&gt;&lt;b&gt;[  229.328509] REISERFS warning (device sda6): jdm-20001 reiserfs_xattr_get: Invalid magic for xattr (trusted.gfid) associated with [10723 11732 0x0 SD]&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;i&gt;&lt;b&gt;[  229.328973] REISERFS warning (device sda6): jdm-20001 reiserfs_xattr_get: Invalid magic for xattr (trusted.gfid) associated with [10723 11732 0x0 SD]&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;i&gt;&lt;b&gt;[  229.330871] REISERFS warning (device sda6): jdm-20001 reiserfs_xattr_get: Invalid magic for xattr (trusted.gfid) associated with [10723 11732 0x0 SD]&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;i&gt;&lt;b&gt;[  229.332178] REISERFS warning (device sda6): jdm-20001 reiserfs_xattr_get: Invalid magic for xattr (trusted.gfid) associated with [10723 11732 0x0 SD]&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;i&gt;&lt;b&gt;[  229.333257] REISERFS warning (device sda6): jdm-20001 reiserfs_xattr_get: Invalid magic for xattr (trusted.gfid) associated with [10723 11732 0x0 SD]&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;i&gt;&lt;b&gt;[  229.334390] REISERFS warning (device sda6): jdm-20001 reiserfs_xattr_get: Invalid magic for xattr (trusted.gfid) associated with [10723 11732 0x0 SD]&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;i&gt;&lt;b&gt;[  229.335931] REISERFS warning (device sda6): jdm-20001 reiserfs_xattr_get: Invalid magic for xattr (trusted.gfid) associated with [10723 11732 0x0 SD]&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt;This happened twice, I am not sure if it is a co-incidence, however I will try to reproduce it more definitively before concluding. This takes a very low priority for two reasons:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt;a. GlusterFS is not recommended with ReiserFS&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt;b. ReiserFS itself is no longer being developed or supported.&lt;/span&gt;&lt;/div&gt;&lt;meta equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt;I&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt; have used ReiserFS as backend for GlusterFS before and this didn't  seem to happen. Or maybe the usage pattern was different, I'm not sure.&lt;/span&gt;&lt;/div&gt;&lt;meta equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-6752640591909235303?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/6752640591909235303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2011/05/reiserfs-doesnt-like-glusterfs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/6752640591909235303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/6752640591909235303'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2011/05/reiserfs-doesnt-like-glusterfs.html' title='ReiserFS doesn&apos;t like GlusterFS?'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-8511643339887155373</id><published>2011-05-02T22:44:00.001-07:00</published><updated>2011-05-04T01:36:32.849-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GlusterFS'/><title type='text'>GlusterFS defaults</title><content type='html'>&lt;span class="Apple-style-span"&gt;&lt;meta equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman';"&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span"&gt;I recently came across a question in the Gluster mailing list which discussed about default options set for the translators. The command `gluster volume info' lists the options re-configured. But there is no way to know the default configurations (as of now), other than to check the volume files and the code.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span"&gt;I have listed the default options below. All the options are as of 3.2.x and applies to 3.1.x.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;GlusterFS servers by default have the following translators enabled&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;ul&gt;&lt;li&gt;features/access-control &lt;/li&gt;&lt;li&gt;features/locks &lt;/li&gt;&lt;li&gt;performance/io-threads&lt;/li&gt;&lt;li&gt;features/marker&lt;/li&gt;&lt;li&gt;debug/io-stats  &lt;/li&gt;&lt;/ul&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;b&gt;Client has the following performance translators enabled by default&lt;/b&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;ul&gt;&lt;li&gt;performance/write-behind&lt;/li&gt;&lt;li&gt;performance/read-ahead&lt;/li&gt;&lt;li&gt;performance/io-cache &lt;/li&gt;&lt;li&gt;performance/quick-read &lt;/li&gt;&lt;li&gt;performance/stat-prefetch &lt;/li&gt;&lt;li&gt;debug/io-stats&lt;/li&gt;&lt;/ul&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;Below, I've listed the default options that are set for the above translators.&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;span style="font-size:130%;"&gt;&lt;b&gt;&lt;meta equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; white-space: normal;font-family:'Times New Roman';" &gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span"&gt;&lt;b&gt;Server translator defaults&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;b&gt;features/locks&lt;/b&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;trace off&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;b&gt;performance/io-threads&lt;/b&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;ul&gt;&lt;li&gt;thread-count 16 &lt;i&gt;(minimun 1, maximum 64)&lt;/i&gt;&lt;/li&gt;&lt;li&gt;idle-time 1&lt;/li&gt;&lt;/ul&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;b&gt;features/marker&lt;/b&gt; &lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;ul&gt;&lt;li&gt;volume-uuid - &lt;i&gt;UUID of the volume &lt;/i&gt;&lt;/li&gt;&lt;li&gt;timestamp-file - &lt;i&gt;path&lt;/i&gt;&lt;/li&gt;&lt;li&gt;xtime - off &lt;/li&gt;&lt;li&gt;quota - off&lt;/li&gt;&lt;/ul&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;path&gt;&lt;b&gt;debug/io-stats&lt;/b&gt;&lt;/path&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;ul&gt;&lt;li&gt;dump-fd-stats off &lt;/li&gt;&lt;li&gt;latency-measurement off &lt;/li&gt;&lt;li&gt;count-fop-hits off &lt;/li&gt;&lt;li&gt;log-level INFO  &lt;/li&gt;&lt;/ul&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span"  style="font-size:130%;"&gt;&lt;b&gt;Client translator defaults&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;:   &lt;/span&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;b&gt;performance/write-behind&lt;/b&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;ul&gt;&lt;li&gt;flush-behind   on &lt;/li&gt;&lt;li&gt;cache-size/window-size  1MB &lt;i&gt;(Min 512KB, Max 1GB) &lt;/i&gt;&lt;/li&gt;&lt;li&gt;disable-for-first-nbytes 0&lt;/li&gt;&lt;li&gt;enable-O_SYNC   disabled by default &lt;/li&gt;&lt;li&gt;enable-trickling-writes on&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;performance/read-ahead&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman';"&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;li&gt;force-atime-update   false&lt;/li&gt;&lt;li&gt;page-count 4 &lt;i&gt;(Min 1, Max 16)&lt;/i&gt;&lt;/li&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman';"&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;b&gt;performance/io-cache&lt;/b&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;ul&gt;&lt;li&gt;priority 1 &lt;/li&gt;&lt;li&gt;cache-timeout/force-revalidate-timeout 1sec &lt;i&gt;(min 0, max 60) &lt;/i&gt;&lt;/li&gt;&lt;li&gt;cache-size 32MB &lt;i&gt;(min 4MB, max 6GB)&lt;/i&gt;&lt;/li&gt;&lt;li&gt;min-file-size 0 &lt;/li&gt;&lt;li&gt;max-file-size -1 &lt;i&gt;(Limited by the underlying FS)&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;b&gt;performance/quick-read&lt;/b&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;ul&gt;&lt;li&gt;priority 1 cache-size 128MB &lt;i&gt;(min 0, max 6GB) &lt;/i&gt;&lt;/li&gt;&lt;li&gt;cache-timeout 1 &lt;i&gt;(min 1, max 60) &lt;/i&gt;&lt;/li&gt;&lt;li&gt;max-file-size 64KB &lt;i&gt;(min 0, max 1MB)  &lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;b&gt;performance/stat-prefetch&lt;/b&gt;&lt;/pre&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;&lt;i&gt;This translator does not have any options to configure.&lt;/i&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-8511643339887155373?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/8511643339887155373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2011/05/glusterfs-defaults.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/8511643339887155373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/8511643339887155373'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2011/05/glusterfs-defaults.html' title='GlusterFS defaults'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-1098408767335201279</id><published>2011-04-12T00:53:00.000-07:00</published><updated>2011-05-03T00:54:06.340-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GlusterFS'/><title type='text'>Using loop devices to test GlusterFS</title><content type='html'>&lt;div&gt; I had come across a issue when one of our users had questions like does X  happen when one of the nodes in GlusterFS is almost full? Or does Y happen if one of the nodes is full? Or does GlusterFS work at all if couple of nodes are full? &lt;/div&gt;&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;&lt;div&gt; Though the answer was straight forward I thought it would be better to test the functionality under those conditions before answering the obvious.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;&lt;div&gt; Initially I thought about launching a few VMs to do a quick test. But the  partition sizes were too huge for my tests, it was going to be a long wait before I fill up the nodes. As a alternative I had to create smaller partitions which involves fdisk et al., and work back to restore to original disk layout (if necessary). &lt;/div&gt;&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;&lt;div&gt; The better solution for this type of test would be to create a few huge files with `dd' command and use them as Gluster exports.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;  &lt;p&gt;For example:&lt;/p&gt;  &lt;code&gt;&lt;b&gt; sac@odin:/data/disks $ for i in {1..4}; do&lt;br /&gt;&amp;gt; dd if=/dev/zero of=disk$i bs=256k count=1000&lt;br /&gt;&amp;gt; done&lt;br /&gt;sac@odin:/data/disks $ &lt;/b&gt;&lt;/code&gt;  &lt;p&gt; Create a filesystem on the data files. &lt;/p&gt;  &lt;code&gt;&lt;b&gt; root@odin:/root # for i in {1..4}; do&lt;br /&gt;&amp;gt; mkfs.ext3 /data/disks/disk$i&lt;br /&gt;&amp;gt; done&lt;br /&gt;root@odin:/root # &lt;/b&gt;&lt;/code&gt;  &lt;p&gt; Mount the filesystem via the loop device &lt;/p&gt;  &lt;code&gt;&lt;b&gt; root@odin:/root # mkdir /mnt/{1..4}&lt;br /&gt;root@odin:/root # for i in {1..4}; do&lt;br /&gt;&amp;gt; mount /data/disks/disk$i /mnt/$i -o loop&lt;br /&gt;&amp;gt; done&lt;br /&gt;root@odin:/root # &lt;/b&gt;&lt;br /&gt; &lt;/code&gt;&lt;p&gt; Now we have four partitions with the sizes we want pretty cheaply, without needing to have multiple servers or partitions. &lt;/p&gt;  &lt;code&gt;&lt;b&gt; root@odin:/root # df -h /mnt/*&lt;br /&gt;Filesystem            Size  Used Avail Use% Mounted on&lt;br /&gt;/dev/loop0            2.9G   69M  2.7G   3% /mnt/1&lt;br /&gt;/dev/loop1            2.9G   70M  2.7G   3% /mnt/2&lt;br /&gt;/dev/loop2            2.9G   70M  2.7G   3% /mnt/3&lt;br /&gt;/dev/loop3            2.9G   70M  2.7G   3% /mnt/4&lt;br /&gt;root@odin:/root # &lt;/b&gt;&lt;/code&gt;  &lt;p&gt; These mount points are then used as export directories and can be played around to understand Gluster behavior when one of the partitions is filled up. Or the performance observations by building filesytems with various different flags. &lt;/p&gt;  &lt;p&gt; Conclusion:&lt;br /&gt;&lt;br /&gt; This is a fast and cheaper way to test GlusterFS functionality under various filesystems without having to bother about getting disks and creating partitions. The advantage is we need not repartition the disks to create different sized partitions, we can delete the file and create a new file with a different size. Better for functionality testing, sucks in performance though. Gluster behavior can be quickly tested over various filesystems before setting up dedicated disks for extensive testing. Building filesytems with various options and tuning for observing GlusterFS behavior is very easy. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-1098408767335201279?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/1098408767335201279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2011/04/using-loop-devices-to-test-glusterfs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/1098408767335201279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/1098408767335201279'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2011/04/using-loop-devices-to-test-glusterfs.html' title='Using loop devices to test GlusterFS'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-589387092352839291</id><published>2011-04-10T23:32:00.000-07:00</published><updated>2011-05-03T00:59:25.450-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GlusterFS'/><title type='text'>Gluster 3.0.x to 3.1.x migration</title><content type='html'>&lt;span class="Apple-style-span"&gt;Migrating from GlusterFS 3.0.x to 3.1.x is explained in &lt;a href="http://bit.ly/ibgF6K"&gt;http://bit.ly/ibgF6K&lt;/a&gt;, however this migration process leaves room for errors. More precaution is necessary while migrating between these major versions.&lt;br /&gt;&lt;br /&gt;I have listed a few steps which have to be followed during the 3.0.x to 3.1.x migration. And the error one might encounter due to faulty migration and the steps to overcome them.&lt;br /&gt;&lt;br /&gt;One of the new things that came in 3.1 is a concept called gfid, gfid is a extended attribute that gets set to every file and directory on a GlusterFS file system. So, essentially after migrating to 3.1 every file that is accessed from the mount point hence after is assigned this new extended attribute.&lt;br /&gt;&lt;br /&gt;As a first step after migrating from 3.0.x to 3.1.x is to mount the cluster with a `single' client and run stat on the mount point recursively for e.g `ls -lR' &amp;gt;/dev/null. Double check if other clients are accessing the cluster, and shut them down.&lt;br /&gt;&lt;br /&gt;After upgrade, if more than one client accesses the cluster, there is a possibility that directories on the backends might end up with different gfids, I have illustrated this in the below example. In such cases directory or file removal fails and you might see some unexpected behaviors. Below is a error due to gfid mismatch...&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;root@odin:/mnt/distribute1# rm -rf glusterfs-3.*&lt;br /&gt;rm: cannot remove `glusterfs-3.0.5/extras/volgen': Directory not empty&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;The fix for this is to recognize such directories and remove the extended attribute trusted.gfid on the backend and run stat from the mount point. Make sure no other clients are accessing these directories at the same time.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;A illustration of how it looks:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;b style="font-family: verdana; "&gt;root@odin:/mnt/distribute1# rm -rf glusterfs-3.2.0qa8/&lt;/b&gt;&lt;br /&gt;&lt;b style="font-family: verdana; "&gt;rm: cannot remove `glusterfs-3.2.0qa8/: Directory not empty&lt;/b&gt;&lt;br /&gt;&lt;b style="font-family: verdana; "&gt;root@odin:/mnt/distribute1#&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;Examining the backend I see libglusterfs is a directory within glusterfs-3.2.0qa8/ examining further you see...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;&lt;b&gt;root@odin:/media# find /media/ -type d -name 'libglusterfs' | \&lt;/b&gt;&lt;b&gt;&lt;br /&gt;xargs -d'\n' getfattr -d -m trusted.gfid -e hex&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;&lt;i&gt;&lt;span class="Apple-style-span"&gt;getfattr: Removing leading '/' from absolute path names&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;# file: media/5/glusterfs-3.2.0qa8/libglusterfs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;trusted.gfid=0x9c3986db772d413a97ba79549b57370f&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;# file: media/4/glusterfs-3.2.0qa8/libglusterfs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;trusted.gfid=0x8ae60902d0894c7ea52ad1061ee1e158&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;# file: media/1/glusterfs-3.2.0qa8/libglusterfs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;trusted.gfid=0x8ae60902d0894c7ea52ad1061ee1e158&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;# file: media/3/glusterfs-3.2.0qa8/libglusterfs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;trusted.gfid=0x8ae60902d0894c7ea52ad1061ee1e158&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;# file: media/2/glusterfs-3.2.0qa8/libglusterfs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;trusted.gfid=0x9c3986db772d413a97ba79549b57370f&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;Notice that the gfids are not same on all the backends, which is a requirement.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;Solution:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;On the backend remove the extended attribute trusted.gfid for the problem directory:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;&lt;b&gt;root@odin:/media# find /media/ -type d -name 'libglusterfs' | \&lt;/b&gt;&lt;b&gt;&lt;br /&gt;xargs -d'\n' setfattr -x trusted.gfid&lt;br /&gt;root@odin:/media# find /media/ -type d -name 'libglusterfs' | \&lt;br /&gt;xargs -d'\n' getfattr -d -m trusted.gfid -e hex&lt;br /&gt;root@odin:/media#&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;No attributes all right. Now run a stat on the mount point to fix the gfid.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;b&gt;root@odin:/mnt/distribute1# stat glusterfs-3.2.0qa8/libglusterfs&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;i&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;File: `glusterfs-3.2.0qa8/libglusterfs'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;Size: 20480 Blocks: 80 IO Block: 131072 directory&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;Device: 16h/22d Inode: 39460 Links: 2&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;Access: 2011-04-11 17:25:52.000000000 +0530&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;Modify: 2011-04-11 16:50:33.000000000 +0530&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;Change: 2011-04-11 17:27:00.000000000 +0530&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"&gt;&lt;b&gt;root@odin:/mnt/distribute1#&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;On the backend the directory should now have same gfid for the directory on all the nodes.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;b&gt;root@odin:/media# find /media/ -type d -name 'libglusterfs' | \&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;xargs -d'\n' getfattr -d -m trusted.gfid -e hex&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;i&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;getfattr: Removing leading '/' from absolute path names&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;# file: media/5/glusterfs-3.2.0qa8/libglusterfs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;trusted.gfid=0xcfeeacae15b54738b8fc6d60bd1ff05c&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;# file: media/4/glusterfs-3.2.0qa8/libglusterfs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;trusted.gfid=0xcfeeacae15b54738b8fc6d60bd1ff05c&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;# file: media/1/glusterfs-3.2.0qa8/libglusterfs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;trusted.gfid=0xcfeeacae15b54738b8fc6d60bd1ff05c&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;# file: media/3/glusterfs-3.2.0qa8/libglusterfs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;trusted.gfid=0xcfeeacae15b54738b8fc6d60bd1ff05c&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;# file: media/2/glusterfs-3.2.0qa8/libglusterfs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;trusted.gfid=0xcfeeacae15b54738b8fc6d60bd1ff05c&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;root@odin:/mnt/distribute1# rm -rf glusterfs-3.2.0qa8/&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;root@odin:/mnt/distribute1#&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;The the directory can be removed from the mount point provided we have fixed the layouts of the directory and its sub-directories.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;This problem was first spotted on one of our customers and thanks to Avati for extensive debugging and figuring out the root cause and the solution. &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-589387092352839291?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/589387092352839291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2011/04/gluster-30x-to-31x-migration.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/589387092352839291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/589387092352839291'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2011/04/gluster-30x-to-31x-migration.html' title='Gluster 3.0.x to 3.1.x migration'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-7859652956545337264</id><published>2010-09-23T00:59:00.000-07:00</published><updated>2011-05-03T01:01:19.474-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Damn Bollywood</title><content type='html'>&lt;span class="Apple-style-span" &gt;I was recently reading the article &lt;a href="http://en.wikipedia.org/wiki/Films_considered_the_greatest_ever"&gt;Films considered the greatest ever&lt;/a&gt; on Wikipedia. Being a fan of Korean movies (of course I have watched only 4!), I got hold of the movie `Old Boy'. And in the midway of watching it, I realized that Bollywood has a remake in the name of Zinda.&lt;br /&gt;&lt;br /&gt; Wikipedia `Zinda' entry says:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Most reviewers considered it to be a rip-off of the South Korean film Oldboy. Show East, the producers of Oldboy, initially expressed concerns but took no legal action as the studio had shut down.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt; Looks like these guys haven't paid for the rights, damn you. And you talk about piracy.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-7859652956545337264?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/7859652956545337264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2010/09/damn-bollywood.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/7859652956545337264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/7859652956545337264'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2010/09/damn-bollywood.html' title='Damn Bollywood'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-6802499609201060859</id><published>2010-09-20T06:37:00.000-07:00</published><updated>2011-05-11T07:33:35.253-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NetBSD'/><category scheme='http://www.blogger.com/atom/ns#' term='*BSD'/><title type='text'>NetBSD drops down to single user mode after etcupdate?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-family: courier new;"&gt;The reason for this is carelessness. The comments in /etc/rc.conf  clearly states:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;i style="font-family: courier new;"&gt; # If this is not set to YES, the system will drop into single-user mode.&lt;br /&gt;#&lt;br /&gt;rc_configured=YES&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;span style="font-family: courier new;"&gt;  This is a common symptom of carelessness which can be attributed to the  large number of questions&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;asked by the etcupdate program. After carefully answering first few questions, I resorted to answering &lt;/span&gt;&lt;i style="font-family: courier new;"&gt;&lt;b&gt;i&lt;/b&gt;&lt;/i&gt; &lt;span style="font-family: courier new;"&gt;to all the other questions.And etcupdate promptly  replaced  all my other configuration files including rc.conf&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;and overwrote:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;i style="font-family: courier new;"&gt;&lt;b&gt;rc_configured=YES&lt;/b&gt;&lt;/i&gt;&lt;span style="font-family: courier new;"&gt; with &lt;/span&gt;&lt;i style="font-family: courier new;"&gt;&lt;b&gt;rc_configured=NO&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; I paid for my carelessness by googling for next fifteen minutes, thank  you. &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-6802499609201060859?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/6802499609201060859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2010/09/netbsd-drops-down-to-single-user-mode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/6802499609201060859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/6802499609201060859'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2010/09/netbsd-drops-down-to-single-user-mode.html' title='NetBSD drops down to single user mode after etcupdate?'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-2212450935150276486</id><published>2010-09-04T06:41:00.000-07:00</published><updated>2011-05-03T06:45:37.245-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='*BSD'/><title type='text'>Dual booting *BSD with the new GRUB</title><content type='html'>&lt;span style="font-family:courier new;"&gt;With the new version of GRUB (1.98) there have been a lot of changes in  the way things work. &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;In the earlier versions of GRUB, the following entry  was added to /boot/grub/menu.lst to boot into &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;OpenBSD &lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;i  style="font-family:courier new;"&gt; &lt;span style="font-weight: bold;"&gt;title           OpenBSD 3.0 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; root            (hd0,0)     &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; makeactive                  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; chainloader     +1          &lt;/span&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; The newer versions of Grub do not have the menu.lst anymore but are  replaced by /boot/grub/grub.cfg. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;Unlike menu.lst this file is never hand edited  but gets auto-generated by the /usr/sbin/grub-mkconfig &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;using templates from  /etc/grub.d and settings from /etc/default/grub. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  To add entries for other operating systems, the entries are made in /etc/grub.d/40_custom file and  &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;grub-mkconfig is run, which  generates /boot/grub/grub.cfg &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  One change that has to be noticed is the partition entry numbering start  from 1.&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;First partition in hd0 is (hd0, 1) which was (hd0, 0) in earlier  versions.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  To dual boot the *BSD systems, the following entries have to be added to /etc/grub.d/40_custom and run &lt;/span&gt;&lt;b style="font-family: courier new;"&gt;grub-mkconfig -o  /boot/grub/grub.cfg&lt;/b&gt;&lt;span style="font-family:courier new;"&gt;,  by default grub-mkconfig outputs to stdout. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;i style="font-family: courier new;"&gt; menuentry "NetBSD 5.0.2" {&lt;br /&gt;  set root=(hd0,1)     &lt;br /&gt;  parttool (hd0,1) boot+&lt;br /&gt;  chainloader +1       &lt;br /&gt;}                        &lt;br /&gt;&lt;br /&gt;menuentry "FreeBSD 8.0" {&lt;br /&gt;  set root=(hd0,2)     &lt;br /&gt;  parttool (hd0,2) boot+&lt;br /&gt;  chainloader +1       &lt;br /&gt;}                        &lt;br /&gt;&lt;br /&gt;menuentry "OpenBSD 4.7" {&lt;br /&gt;  set root=(hd0,3)     &lt;br /&gt;  parttool (hd0,3) boot+&lt;br /&gt;  chainloader +1       &lt;br /&gt;}                           &lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-2212450935150276486?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/2212450935150276486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2010/09/dual-booting-bsd-with-new-grub.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/2212450935150276486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/2212450935150276486'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2010/09/dual-booting-bsd-with-new-grub.html' title='Dual booting *BSD with the new GRUB'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-3096494482977299961</id><published>2010-06-10T01:46:00.000-07:00</published><updated>2011-05-11T07:34:23.889-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><title type='text'>Building and publishing a package on launchpad</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-family: courier new;"&gt;This is a short how-to on creating packages for launchpad. Launchpad has  more detail and in-depth documentation on almost all the required topics to  create a package. I've compiled the topics into a short how-to for my  convenience, read it &lt;/span&gt;&lt;a href="http://thegaul.org/README_ppa.txt" style="font-family: courier new;" target="_blank"&gt;here&lt;/a&gt;&lt;span style="font-family: courier new;"&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-3096494482977299961?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/3096494482977299961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2010/06/building-and-publishing-package-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/3096494482977299961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/3096494482977299961'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2010/06/building-and-publishing-package-on.html' title='Building and publishing a package on launchpad'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-8153436947974270221</id><published>2010-06-09T06:51:00.000-07:00</published><updated>2011-05-11T07:35:08.274-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><title type='text'>Installing and running UCARP on Solaris</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-family: courier new;"&gt;I was surprised to see that there was not much documentation on how to  install and run &lt;/span&gt;&lt;a href="http://www.ucarp.org/project/ucarp" style="font-family: courier new;" target="_blank"&gt;UCARP&lt;/a&gt;&lt;span style="font-family: courier new;"&gt; on a Solaris machine. I found a couple of blogs listing the startup and  shutdown scripts but didn't mention about how to run UCARP itself. I am  documenting about how to install and run it, for details on CARP and UCARP refer OpenBSD  faq page and UCARP official website respectively. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  UCARP has a dependency on libpcap, so you need to install the libpcap  from &lt;/span&gt;&lt;a href="http://www.tcpdump.org/" style="font-family: courier new;" target="_blank"&gt;here&lt;/a&gt; before trying  to install ucarp itself. Else you will see errors like &lt;i style="font-family: courier new;"&gt; ucarp.h:63:18:  pcap.h: No such file or directory &lt;/i&gt;&lt;span style="font-family: courier new;"&gt; while installing.  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  Use version 1.5.1 or earlier, 1.5.2 has linking issues and wouldn't compile. Once compiled and installed, running UCARP should be easy, all  you have to do is create two simple scripts to bring up the interface and  shutdown the  interface.  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;code style="font-family: courier new;"&gt; Listing if_up.sh:&lt;br /&gt;----------------------------------&lt;br /&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;ifconfig e1000g0:1 192.168.1.102 netmask 255.255.255.0&lt;br /&gt;ifconfig e1000g0:1 up&lt;br /&gt;----------------------------------&lt;br /&gt;&lt;br /&gt;Listing if_down.sh:&lt;br /&gt;----------------------------------&lt;br /&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;ifconfig e1000g0:1 down unplumb&lt;br /&gt;----------------------------------&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;span style="font-family: courier new;"&gt; Make the scripts executable, also you can find more generic scripts &lt;/span&gt;&lt;a href="http://www.sysadmin-fr.org/en/network/ucarp%20solaris" style="font-family: courier new;" target="_blank"&gt;here&lt;/a&gt;&lt;span style="font-family: courier new;"&gt;. &lt;/span&gt;&lt;span style="font-family: courier new;"&gt;The ip 192.168.1.102 is the virtual ip address shared by both the  machines. Once the scripts are setup run the below command on both the machines on  which you want to setup UCARP. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; Machine 1 whose ip is 192.168.1.81: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;code style="font-family: courier new;"&gt; /opt/ucarp1.5/sbin/ucarp --interface=e1000g0 --srcip=192.168.1.81  --vhid=42 \&lt;br /&gt;--pass=word --preempt --neutral --addr=192.168.1.102 \&lt;br /&gt;--upscript=/etc/ucarp/if_up.sh --downscript=/etc/ucarp/if_down.sh  --shutdown &amp;amp;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;span style="font-family: courier new;"&gt; Machine 2 whose ip is 192.168.1.82: &lt;/span&gt;&lt;code style="font-family: courier new;"&gt;&lt;br /&gt;&lt;br /&gt;/opt/ucarp1.5/sbin/ucarp --interface=e1000g0 --srcip=192.168.1.82  --vhid=42 \&lt;br /&gt;--pass=word --preempt --neutral --addr=192.168.1.102 \&lt;br /&gt;--upscript=/etc/ucarp/if_up.sh --downscript=/etc/ucarp/if_down.sh  --shutdown &amp;amp;  &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; This should be it. Note that the long options are somewhat necessary,  since the shorter version of the options cause core dump. &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-8153436947974270221?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/8153436947974270221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2010/06/installing-and-running-ucarp-on-solaris.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/8153436947974270221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/8153436947974270221'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2010/06/installing-and-running-ucarp-on-solaris.html' title='Installing and running UCARP on Solaris'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-686052747553296167.post-8335705054421151439</id><published>2010-06-07T00:47:00.000-07:00</published><updated>2011-05-15T09:03:36.669-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='GlusterFS'/><title type='text'>Redistribution of files to new nodes on a Gluster file system</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-family: 'courier new';"&gt;I happened to write a short HOWTO about redistribution of data on &lt;/span&gt;&lt;a href="http://www.gluster.com/" style="font-family: courier new;" target="_blank"&gt;GlusterFS&lt;/a&gt;&lt;span style="font-family: 'courier new';"&gt; when new  nodes are added to a existing distribute setup. The text version of the tutorial  can be found &lt;/span&gt;&lt;a href="http://thegaul.org/README_defrag.txt" style="font-family: courier new;" target="_blank"&gt;here&lt;/a&gt;&lt;span style="font-family: 'courier new';"&gt;.  The tutorial will appear somewhere in the official website after internal review. &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/686052747553296167-8335705054421151439?l=sacurs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sacurs.blogspot.com/feeds/8335705054421151439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sacurs.blogspot.com/2010/06/redistribution-of-files-to-new-nodes-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/8335705054421151439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/686052747553296167/posts/default/8335705054421151439'/><link rel='alternate' type='text/html' href='http://sacurs.blogspot.com/2010/06/redistribution-of-files-to-new-nodes-on.html' title='Redistribution of files to new nodes on a Gluster file system'/><author><name>sac</name><uri>http://www.blogger.com/profile/07755157008095733405</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-VhKVHPf7xdg/TcAKyV9HYSI/AAAAAAAACGM/L2i7MJgKg2o/s220/sac.jpg'/></author><thr:total>0</thr:total></entry></feed>
