<?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-7119076004819787314</id><updated>2012-02-16T04:53:41.943-05:00</updated><category term='linux-iscsi'/><category term='no luns detected'/><category term='case study'/><category term='SUSE linux'/><category term='open source software'/><category term='sharing users'/><category term='fetchyahoo'/><category term='uninstalle'/><category term='logical volume'/><category term='network attached storage'/><category term='volume group'/><category term='enabled'/><category term='contact form'/><category term='NAT Host only'/><category term='windows network share'/><category term='module'/><category term='awk'/><category term='appinventor'/><category term='spam'/><category term='mailman'/><category term='email'/><category term='email ids'/><category term='OPen source'/><category term='sharing files from windows to linux'/><category term='dmesg'/><category term='cforms'/><category term='LUN'/><category term='email scraping'/><category term='internal networking'/><category term='kitchen sink'/><category term='rich text editing'/><category term='Editing tools'/><category term='CSS'/><category term='CRM'/><category term='open source CRM'/><category term='tips and tricks'/><category term='cifs'/><category term='virtualbox vmware NAT TAP windows adapter media disconn'/><category term='wp_capabilities'/><category term='themes'/><category term='networking'/><category term='yahoo2mbox'/><category term='wordpress'/><category term='common user'/><category term='SDK emulator'/><category term='USB external hard disk'/><category term='android'/><category term='smbfs'/><category term='wordpress themes'/><category term='iscsi'/><category term='session'/><category term='editing'/><category term='windows vista host'/><category term='widget'/><category term='DHCP'/><category term='initiator'/><category term='host only networking'/><category term='moseasymedia joomla 1.5 video google youtube'/><category term='online repository yast'/><category term='organization'/><category term='google group'/><category term='perl'/><category term='sugarcrm'/><category term='civicrm'/><category term='open-iscsi'/><category term='detect'/><category term='vmware server'/><category term='samba file system'/><category term='scraping'/><category term='node'/><category term='rich text editor buttons'/><category term='smbmount'/><category term='shared folder'/><category term='debian'/><category term='windows'/><category term='virtual machine'/><category term='Virtualization'/><category term='scsi'/><category term='video content'/><category term='linux'/><category term='harvesting'/><category term='shell script'/><category term='iscsi target'/><category term='opensuse'/><category term='usb'/><category term='cpanplus'/><category term='static'/><category term='openfiler'/><category term='mount'/><category term='adb'/><category term='content creation'/><category term='target'/><category term='emai id'/><category term='host only'/><category term='shell scripts'/><category term='free themes'/><category term='/var/log/messages'/><category term='3 column themes'/><category term='3 column'/><category term='iscsi initiator'/><category term='non profit'/><category term='message archive'/><category term='/dev/sda'/><category term='opensuse 10.3 virtualbox guest addition installation in'/><category term='fdisk -l'/><category term='scrape'/><category term='unix'/><category term='USB device'/><category term='external hard disk'/><category term='mount vboxsf shared folder virtualbox opensuse modprobe'/><category term='multiple wordpress installation'/><category term='samba'/><category term='vboxmanage modifyvm'/><category term='SAN'/><category term='Ubuntu'/><category term='Virtualbox'/><category term='file sharing'/><category term='word formatting'/><category term='table_prefix'/><category term='windows host'/><title type='text'>My experiments in Open Source Technologies</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-7193561523021977156</id><published>2011-08-26T23:31:00.001-04:00</published><updated>2011-08-26T23:32:17.726-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='google group'/><category scheme='http://www.blogger.com/atom/ns#' term='SDK emulator'/><category scheme='http://www.blogger.com/atom/ns#' term='appinventor'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><category scheme='http://www.blogger.com/atom/ns#' term='adb'/><title type='text'>error: more than one device and emulator while trying to install APK on Android SDK Emulator</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;I &lt;/span&gt;was trying to take some screen shots of a new android app that I had made using &lt;a href="http://www.appinventorbeta.com/"&gt;AppInventor&lt;/a&gt;&amp;nbsp;today, but for that I had to install the app first on the SDK emulator. With the&amp;nbsp;&lt;a href="http://www.appinventorbeta.com/"&gt;AppInventor&lt;/a&gt;,&amp;nbsp;It only took me a 3-4 hours to make this simple app that shows 12 images with previous/next buttons, and mind you, it was my first Android Application. A shoutout to&amp;nbsp;&lt;a href="http://www.appinventorbeta.com/"&gt;AppInventor&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;c:\eclipse\android-sdk-windows\tools&amp;gt;adb install BrahmaSamhita_new_zipAlign.apk&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;b&gt;error: more than one device and emulator&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is when I started searching and found a post which recommended doing this:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;c:\eclipse\android-sdk-windows\tools&amp;gt;adb kill-server&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;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;c:\eclipse\android-sdk-windows\tools&amp;gt;adb devices&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;* daemon not running. starting it now on port 5037 *&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;* daemon started successfully *&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;List of devices attached&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;emulator-5554 &amp;nbsp; device&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And this is when it actually worked:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;c:\eclipse\android-sdk-windows\tools&amp;gt;adb install BrahmaSamhita_new_zipAlign.apk&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;78 KB/s (1775740 bytes in 22.061s)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pkg: /data/local/tmp/BrahmaSamhita_new_zipAlign.apk&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Success&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;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;c:\eclipse\android-sdk-windows\tools&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After this, I could see my new application in the emulator screen. Hope this helps someone else.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-7193561523021977156?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/7193561523021977156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2011/08/error-more-than-one-device-and-emulator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/7193561523021977156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/7193561523021977156'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2011/08/error-more-than-one-device-and-emulator.html' title='error: more than one device and emulator while trying to install APK on Android SDK Emulator'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-8787813970372390510</id><published>2009-03-29T12:07:00.000-04:00</published><updated>2010-12-30T22:41:35.381-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='yahoo2mbox'/><category scheme='http://www.blogger.com/atom/ns#' term='message archive'/><category scheme='http://www.blogger.com/atom/ns#' term='OPen source'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>yahoo2mbox.pl error: Unexpected title page format</title><content type='html'>&lt;h2&gt;The problem&lt;/h2&gt;&lt;br/&gt;&lt;pre&gt;c:\emails\yahoo2mbox-0.24&amp;gt;perl yahoo2mbox.pl --user=pooja13pandey --pass=&amp;lt;password&amp;gt;&lt;br/&gt;1 --delay=5 desimasala&lt;br/&gt;Logging in as pooja13pandey... ok.&lt;br/&gt;Getting number of messages in group desimasala...&lt;br/&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;Unexpected title page format (DesiMasala).&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;The solution&lt;/h2&gt;&lt;br/&gt;This simply means that the user with which we are trying to archive the yahoo group's messages locally, is not part of the yahoo group yet. So now I make pooja13pandey user a part of the desimasala yahoo group.&lt;br/&gt;&lt;pre&gt;c:\emails\yahoo2mbox-0.24&amp;gt;perl yahoo2mbox.pl --user=pooja13pandey --pass=&amp;lt;password&amp;gt;&lt;br/&gt;1 --delay=5 desimasala&lt;br/&gt;Logging in as pooja13pandey... ok.&lt;br/&gt;Getting number of messages in group desimasala...&lt;br/&gt;Retrieving messages 1..12389:&lt;br/&gt;Endless redirect loop detected while retrieving message 1.&lt;br/&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;This error is often due to using incorrect case in the group name.&lt;br/&gt;Saved 0 message(s) in desimasala.&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;br/&gt;Hmm, so there is still some problem. Although, there is a yahoo group called Desimasala, Im not able to login to it through yahoo2mbox.pl script for some reason. On closer look, one can see that the group name is case-sensitive. It needs to be DesiMasala, instead of Desimasala or desiMasala or desimasala.&lt;br/&gt;&lt;br/&gt;So, lets make that correction and try again.&lt;br/&gt;&lt;pre&gt;c:\emails\yahoo2mbox-0.24&amp;gt;perl yahoo2mbox.pl --user=pooja13pandey --pass=&amp;lt;password&amp;gt;&lt;br/&gt;1 --delay=5 DesiMasala&lt;br/&gt;Will resume at message 1&lt;br/&gt;Logging in as pooja13pandey... ok.&lt;br/&gt;Getting number of messages in group DesiMasala...&lt;br/&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;Retrieving messages 1..12389:&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br/&gt;.. And, Bingo! It worked.&lt;br/&gt;&lt;pre&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-8787813970372390510?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/8787813970372390510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/yahoo2mboxpl-error-unexpected-title.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/8787813970372390510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/8787813970372390510'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/yahoo2mboxpl-error-unexpected-title.html' title='yahoo2mbox.pl error: Unexpected title page format'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-7610482372323897219</id><published>2009-03-28T16:18:00.000-04:00</published><updated>2010-12-30T22:41:35.367-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='email scraping'/><category scheme='http://www.blogger.com/atom/ns#' term='awk'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='emai id'/><title type='text'>quick script to extract email ids from a detailed mail header</title><content type='html'>Since my creative juices are flowing so much today, I thought of posting the simple, yet effective awk script to extract sender's email ids from a detailed mail message (even though if the mail id be ecrypted).&lt;br/&gt;&lt;br/&gt;&lt;em&gt;A word of caution is that the file being processed should have a line with "EOF" value (without strings) ONLY at the end of file, otherwise the awk script will hang.&lt;br/&gt;&lt;/em&gt;&lt;br/&gt;&lt;pre&gt;BEGIN { print FILENAME | "wc -l |cut -f1 -d' '" ; }&lt;br/&gt;/^X-Sender:/ || /^From / { #print NR, $0;&lt;br/&gt;           #&lt;br/&gt;           # get the real userid from where the email came&lt;br/&gt;           #&lt;br/&gt;           m=split($0,b,"@");&lt;br/&gt;           from=b[1];&lt;br/&gt;           #print from;&lt;br/&gt;           x=split(from,c," ");&lt;br/&gt;           realfrom=c[x];&lt;br/&gt;           gsub("&amp;lt;","",realfrom);&lt;br/&gt;           #print realfrom;&lt;br/&gt;           #&lt;br/&gt;           # get the domain name of the smtp server now&lt;br/&gt;           #&lt;br/&gt;           while ($0 !~ /HELO/ &amp;amp;&amp;amp; $0 != "EOF") getline;&lt;br/&gt;           if ($0 == "EOF") exit;&lt;br/&gt;           domain=$5; gsub(")","",domain); n=split(domain,a,".")&lt;br/&gt;           #print n, domain;&lt;br/&gt;           realdomain=a[n-1]"."a[n];&lt;br/&gt;           if (n&amp;gt;1) print realfrom"@"realdomain;&lt;br/&gt;           next;&lt;br/&gt;         }&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-7610482372323897219?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/7610482372323897219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/quick-script-to-extract-email-ids-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/7610482372323897219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/7610482372323897219'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/quick-script-to-extract-email-ids-from.html' title='quick script to extract email ids from a detailed mail header'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-6792143772440815140</id><published>2009-03-28T15:45:00.000-04:00</published><updated>2010-12-30T22:41:35.303-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='uninstalle'/><category scheme='http://www.blogger.com/atom/ns#' term='OPen source'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='cpanplus'/><category scheme='http://www.blogger.com/atom/ns#' term='module'/><title type='text'>How to uninstall a CPAN module ?</title><content type='html'>CPAN module does not have the option of un-installing a perl module as of now. This can be especially frustrating for newbies (as it was for me). I struggled quite a bit on google and found this solution. For this, you need the CPANPLUS module, which needs to be first installed through CPAN.&lt;br/&gt;&lt;pre&gt;C:\Users\Pooja Verma&amp;gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;perl -MCPAN -e shell&lt;br/&gt;&lt;br/&gt;cpan&amp;gt; install CPANPLUS&lt;br/&gt;&lt;br/&gt;cpan&amp;gt; exit&lt;br/&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;br/&gt;Unlike CPAN, you cannot invoke CPANPLUS by typing &lt;strong&gt;cpanplus &lt;/strong&gt;on command prompt, even if its installed.&lt;br/&gt;&lt;pre&gt;C:\Users\Pooja Verma&amp;gt;cpanplus&lt;br/&gt;'cpanplus' is not recognized as an internal or external command,&lt;br/&gt;operable program or batch file.&lt;br/&gt;&lt;br/&gt;C:\Users\Pooja Verma&amp;gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;perl -MCPANPLUS -e shell&lt;/span&gt;&lt;/strong&gt;&lt;br/&gt;CPANPLUS::Shell::Default -- CPAN exploration and module installation (v0.84)&lt;br/&gt;*** Please report bugs to &amp;lt;bug-cpanplus@rt.cpan.org&amp;gt;.&lt;br/&gt;*** Using CPANPLUS::Backend v0.84.  ReadLine support disabled.&lt;br/&gt;&lt;br/&gt;*** Type 'p' now to show start up log&lt;br/&gt;&lt;br/&gt;Did you know...&lt;br/&gt;    The documentation in CPANPLUS::Module and CPANPLUS::Backend is very useful&lt;br/&gt;CPAN Terminal&amp;gt; help&lt;br/&gt;&lt;br/&gt;[General]&lt;br/&gt;    h | ?                  # display help&lt;br/&gt;    q                      # exit&lt;br/&gt;    v                      # version information&lt;br/&gt;[Search]&lt;br/&gt;    a AUTHOR ...           # search by author(s)&lt;br/&gt;    m MODULE ...           # search by module(s)&lt;br/&gt;    f MODULE ...           # list all releases of a module&lt;br/&gt;    o [ MODULE ... ]       # list installed module(s) that aren't up to date&lt;br/&gt;    w                      # display the result of your last search again&lt;br/&gt;[Operations]&lt;br/&gt;    i MODULE | NUMBER ...  # install module(s), by name or by search number&lt;br/&gt;    i URI | ...            # install module(s), by URI (ie http://foo.com/X.tgz)&lt;br/&gt;    t MODULE | NUMBER ...  # test module(s), by name or by search number&lt;br/&gt;    u MODULE | NUMBER ...  # uninstall module(s), by name or by search number&lt;br/&gt;    d MODULE | NUMBER ...  # download module(s)&lt;br/&gt;    l MODULE | NUMBER ...  # display detailed information about module(s)&lt;br/&gt;    r MODULE | NUMBER ...  # display README files of module(s)&lt;br/&gt;    c MODULE | NUMBER ...  # check for module report(s) from cpan-testers&lt;br/&gt;    z MODULE | NUMBER ...  # extract module(s) and open command prompt in it&lt;br/&gt;[Local Administration]&lt;br/&gt;    b                      # write a bundle file for your configuration&lt;br/&gt;    s program [OPT VALUE]  # set program locations for this session&lt;br/&gt;    s conf    [OPT VALUE]  # set config options for this session&lt;br/&gt;    s mirrors              # show currently selected mirrors&lt;/pre&gt;&lt;br/&gt;Now you can uninstall the module that you want to. If needed, you can use the --verbose and --force option with it.&lt;br/&gt;&lt;pre&gt;CPAN Terminal&amp;gt; &lt;strong&gt;&lt;span style="color:#0000ff;"&gt;u MIME::Head --force --verbose&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-6792143772440815140?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/6792143772440815140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/how-to-uninstall-cpan-module.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/6792143772440815140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/6792143772440815140'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/how-to-uninstall-cpan-module.html' title='How to uninstall a CPAN module ?'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-3301167014054684670</id><published>2009-03-28T15:21:00.000-04:00</published><updated>2010-12-30T22:41:35.282-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='harvesting'/><category scheme='http://www.blogger.com/atom/ns#' term='shell scripts'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='google group'/><category scheme='http://www.blogger.com/atom/ns#' term='tips and tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='spam'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='email ids'/><category scheme='http://www.blogger.com/atom/ns#' term='email scraping'/><category scheme='http://www.blogger.com/atom/ns#' term='fetchyahoo'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='scraping'/><category scheme='http://www.blogger.com/atom/ns#' term='OPen source'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='scrape'/><title type='text'>How to scrape emails for online marketing? -- for free</title><content type='html'>&lt;h2&gt;Prologue - Is harmless marketing always Spam?&lt;/h2&gt;&lt;br/&gt;&lt;img class="alignleft size-full wp-image-219" title="spam" src="http://opensourceexperiments.files.wordpress.com/2009/03/spam.jpg" alt="spam" width="119" height="109" /&gt;&lt;br/&gt;&lt;br/&gt;Ok, so I had started a website and wanted to promote it. At some point, you might be in the same boat too.&lt;br/&gt;&lt;br/&gt;Unfortunately, I did not have a while lot of contacts for sending emails to. Well, the website was not really spammy (it was actually a community related website for open source audio resources), and I was not going to solicit for money, so I did not have a lot of compunctions in telling people about it. If they wanted to listen to some audios, they could stick around, otherwise they could do anything else they pleased to.&lt;br/&gt;&lt;br/&gt;I knew some owners of yahoo groups that had heavy audience. I thought maybe it was worth a shot explaining about the website and asking if they might be willing to share emails for targeted promotion. The results were quite disappointing, and somewhat expected.&lt;br/&gt;&lt;blockquote&gt;After talking to a few of them, my general observation seemed that most group owners think that as long as they dont give out member emails to others, those emails would &lt;em&gt;&lt;strong&gt;always be&lt;/strong&gt;&lt;/em&gt; protected from spam. They tend to think of other groups/email distributions as spam! (&lt;em&gt;as if those people WONT get any other SPAM in the future at all, huh?&lt;/em&gt;)&lt;/blockquote&gt;&lt;br/&gt;Whatever, I thought. As long as my intentions were pure, I did not need to have second thoughts.&lt;br/&gt;&lt;h2&gt;So what are my options?&lt;/h2&gt;&lt;br/&gt;&lt;img class="alignleft size-full wp-image-220" title="q-man-thinking-21" src="http://opensourceexperiments.files.wordpress.com/2009/03/q-man-thinking-21.gif" alt="q-man-thinking-21" width="190" height="221" /&gt;&lt;br/&gt;&lt;br/&gt;Hmph! What a Bummer. How long could I depend on google to make the website more popular? It was basically a deadlock.&lt;br/&gt;&lt;br/&gt;So one fine day, I started thinking about how ELSE I could approach this problem. For example, could I not use a unix utility like &lt;em&gt;&lt;strong&gt;&lt;a href="http://gnuwin32.sourceforge.net/packages/wget.htm" target="_blank"&gt;wget&lt;/a&gt; &lt;/strong&gt;&lt;/em&gt;or perl to simulate web clicks or use some robot utility to do clicks, web navigation and download information?&lt;br/&gt;&lt;br/&gt;Then another thought was -- could I not get emailids from specific yahoo groups or gmail groups that I was subscribed to, and whose target audience might be interested in knowing about a website? After further digging on google, I found that there IS a perl module called &lt;strong&gt;&lt;a href="http://search.cpan.org/dist/WWW-Yahoo-Groups/" target="_blank"&gt;WWW::Yahoo::Groups&lt;/a&gt; &lt;/strong&gt;that can programmatically fetch group messages to local PC drive.&lt;br/&gt;&lt;h2&gt;&lt;strong&gt;WWW::Yahoo::Groups -- &lt;/strong&gt;Easier said than done..&lt;/h2&gt;&lt;br/&gt;I tried installing &lt;strong&gt;&lt;a href="http://search.cpan.org/dist/WWW-Yahoo-Groups/" target="_blank"&gt;WWW::Yahoo::Groups&lt;/a&gt; &lt;/strong&gt;on a unix box I had access to, but it seems that its easier said than done. It had a ton of dependent modules that wouln't install properly (even with the force option) -- I specifically had a lot of trouble with the &lt;strong&gt;Crypt::SSLeay &lt;/strong&gt;module.&lt;br/&gt;&lt;h2&gt;So what next?&lt;/h2&gt;&lt;br/&gt;This failure forced me to look for other options. And boy, there are quite a few of them available. &lt;a href="http://fetchyahoo.twizzler.org/" target="_blank"&gt;fetchyahoo &lt;/a&gt;is one, then you have &lt;strong&gt;yahoo2mbox&lt;/strong&gt;.&lt;br/&gt;&lt;blockquote&gt;Now, An interesting point about yahoo2mbox is that there are a couple places where you can find it. Apparently, TT solutions has their own version at &lt;a href="http://www.tt-solutions.com/en/Products/yahoo2mbox" target="_blank"&gt;http://www.tt-solutions.com/en/Products/yahoo2mbox&lt;/a&gt;, while there is a debian version available at &lt;a href="http://packages.debian.org/lenny/yahoo2mbox" target="_blank"&gt;http://packages.debian.org/lenny/yahoo2mbox&lt;/a&gt;. I had problems with the debian version on Ubuntu and tried using the one from tt-solutions, which worked better.&lt;/blockquote&gt;&lt;br/&gt;So while fetchyahoo can fetch the contents of a single yahoo user, yahoo2mbox can do the same for a yahoogroup.&lt;br/&gt;&lt;br/&gt;Fine, I thought, lets go for the jugular and get yahoo2mbox to work. The results were inconsistent: if you are a moderator of the group or if the group has really loose security setting for not masking email ids, only then can you see the email ids in the downloaded messages. Also, you get weird messages/errors if the group home page has photo and text (got some tag related errors with a yahoo group FHRS_USA).&lt;br/&gt;&lt;h2&gt;Email masking on Yahoogroups and Google groups..&lt;/h2&gt;&lt;br/&gt;Anyway, I realized that both yahoogroups and google groups had elaborate email masking on. True, without it, the online world would NOT be a safe place to be in. Email harvesters would retrieve emails left, right and center and make big bucks.&lt;br/&gt;&lt;br/&gt;This is an example from yahoo groups content fetched through yahoo2mbox:&lt;br/&gt;&lt;br/&gt;...&lt;br/&gt;&lt;br/&gt;...&lt;br/&gt;&lt;pre&gt;From &lt;span style="color:#ff0000;"&gt;devendra999@8_ZAVFsOGj8FjcpG8_oA372HgMSEAl6ol8NKeUSx7VKOtZW8QZCRKJGqiqzqMU-GwjIpYZBzGXe2JmZrjCeniA.yahoo.invalid Sat Aug 05 14:41:35 2000&lt;/span&gt;&lt;br/&gt;Return-Path: &amp;lt;&lt;span style="color:#ff0000;"&gt;devendra999@8_ZAVFsOGj8FjcpG8_oA372HgMSEAl6ol8NKeUSx7VKOtZW8QZCRKJGqiqzqMU-GwjIpYZBzGXe2JmZrjCeniA.yahoo.invalid&lt;/span&gt;&amp;gt;&lt;br/&gt;Received: (qmail 6062 invoked from network); 5 Aug 2000 21:41:35 -0000&lt;/pre&gt;&lt;br/&gt;...&lt;br/&gt;&lt;br/&gt;...&lt;br/&gt;&lt;br/&gt;This is an example of detailed header fetched using a similar utility called &lt;a href="http://home.comcast.net/~mikeruelle/pub/gmail/gmail2mbox.html" target="_blank"&gt;gmail2mbox.pl&lt;/a&gt;:&lt;br/&gt;&lt;pre&gt;Received: by 10.90.81.11 with SMTP id e11mr6036070agb.27.1237961013457;&lt;br/&gt;        Tue, 24 Mar 2009 23:03:33 -0700 (PDT)&lt;br/&gt;&lt;span style="color:#ff0000;"&gt;Return-Path: &amp;lt;raviraj.pe...@gmail.com&amp;gt;&lt;br/&gt;&lt;/span&gt;Received: from mail-gx0-f164.google.com (mail-gx0-f164.google.com [209.85.217.164])&lt;br/&gt;        by gmr-mx.google.com with ESMTP id 15si1362316gxk.4.2009.03.24.23.03.32;&lt;br/&gt;        Tue, 24 Mar 2009 23:03:32 -0700 (PDT)&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;Again, what are my options?&lt;/h2&gt;&lt;br/&gt;So a couple days into the quest and no clear solution yet. Water, water everywhere and not a drop to drink. What an irony.&lt;br/&gt;&lt;br/&gt;With these thoughts in mind, I was looking at individual emails (of the yahoo group that I was interested in) in my Yahoo! inbox. Quite absent mindedly, I opened one of the messages a view source and realized that it did not have email masking turned on. In fact, I realized, it could be on, because what would the reply-to address be then? In other words, the From Email id HAD to be available in the mail header of yahoo group email in my inbox.&lt;br/&gt;&lt;h2&gt;Aha!&lt;/h2&gt;&lt;br/&gt;&lt;img class="aligncenter size-full wp-image-225" title="aha_moment" src="http://opensourceexperiments.files.wordpress.com/2009/03/aha_moment.gif" alt="aha_moment" width="110" height="145" /&gt;&lt;br/&gt;&lt;br/&gt;So then, the solution was plain and simple. I would extract the individual email messages for a yahoo group and then extract the email ids from there. Theoritically, it should work. In practice too, it did. Here is an example:&lt;br/&gt;&lt;pre&gt;From &lt;span style="color:#0000ff;"&gt;v_ramesh00001@yahoo.com &lt;/span&gt;Thu Feb 10 16:59:16 2005&lt;br/&gt;Return-Path: &amp;lt;&lt;span style="color:#0000ff;"&gt;v_ramesh00001@yahoo.com&lt;/span&gt;&amp;gt;&lt;br/&gt;X-Sender: &lt;span style="color:#0000ff;"&gt;v_ramesh00001@yahoo.com&lt;/span&gt;&lt;br/&gt;X-Apparently-To: sewausa_atl@yahoogroups.com&lt;br/&gt;Received: (qmail 45652 invoked from network); 11 Feb 2005 00:59:15 -0000&lt;/pre&gt;&lt;br/&gt;So this meant that one would just need to be part of email distribution of a particular yahoo group that one is interested in. It is easier to extract emails if all yahoo group related emails are filtered into a specific folder (then you can utilize &lt;strong&gt;--folder &lt;/strong&gt;option of &lt;em&gt;fetchyahoo&lt;/em&gt;).&lt;br/&gt;&lt;h2&gt;The quirks of making 'fetchyahoo' work..&lt;/h2&gt;&lt;br/&gt;For using perl, there are a couple options available, but the best option, in my humble opinion, seems to be Active Perl on windows, available at &lt;a href="http://www.activestate.com/activeperl/" target="_blank"&gt;http://www.activestate.com/activeperl/&lt;/a&gt; . The "other" options on windows are &lt;a href="http://cygwin.com/" target="_blank"&gt;Cygwin&lt;/a&gt; or &lt;a href="http://www.virtualbox.org/" target="_blank"&gt;Virtualbox &lt;/a&gt;to simulate a unix environment in windows.&lt;br/&gt;&lt;br/&gt;If you want to use Virtualbox, the easiest option is to install &lt;a href="http://www.ubuntu.com/getubuntu/download" target="_blank"&gt;Ubuntu&lt;/a&gt;. You can find a lot of &lt;a href="http://www.virtualbox.org/wiki/User_HOWTOS" target="_blank"&gt;Virtualbox How to &lt;/a&gt;articles here. Another option is &lt;a href="http://wubi-installer.org/" target="_blank"&gt;http://wubi-installer.org&lt;/a&gt;. Look at &lt;a href="http://www.technobuzz.net/how-to-install-ubuntu-in-windows-with-wubi/" target="_blank"&gt;http://www.technobuzz.net/how-to-install-ubuntu-in-windows-with-wubi/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;While Cygwin mostly works for simple unix stuff, I found that most of the perl package dependencies do not work out and you end up getting frustrated (I found that &lt;strong&gt;Crypt::SSLeay &lt;/strong&gt;module had problems).&lt;br/&gt;&lt;h2&gt;Installing ActivePerl and required modules for fetchyahoo&lt;/h2&gt;&lt;br/&gt;So activeperl .msi is installed, the perl executable is automatically aded to the windows PATH:&lt;br/&gt;&lt;pre&gt;c:\emails\fetchyahoo-2.13.3&amp;gt;perl -version&lt;br/&gt;&lt;br/&gt;This is perl, v5.10.0 built for MSWin32-x86-multi-thread&lt;br/&gt;(with 5 registered patches, see perl -V for more detail)&lt;br/&gt;..&lt;br/&gt;..&lt;/pre&gt;&lt;br/&gt;Also, we will assume that the latest version of fetchyahoo is downloaded and extracted to c:\emails\fetchyahoo-2.13.3 folder:&lt;br/&gt;&lt;pre&gt;c:\emails\fetchyahoo-2.13.3&amp;gt;dir&lt;br/&gt; Volume in drive C has no label.&lt;br/&gt; Volume Serial Number is DA07-A231&lt;br/&gt;&lt;br/&gt; Directory of c:\emails\fetchyahoo-2.13.3&lt;br/&gt;&lt;br/&gt;03/27/2009  09:48 PM    &amp;lt;DIR&amp;gt;          .&lt;br/&gt;03/27/2009  09:48 PM    &amp;lt;DIR&amp;gt;          ..&lt;br/&gt;03/09/2009  12:09 PM            15,182 ChangeLog&lt;br/&gt;03/09/2009  12:09 PM            17,992 COPYING&lt;br/&gt;03/09/2009  12:09 PM             2,747 Credits&lt;br/&gt;03/09/2009  12:09 PM           107,289 fetchyahoo&lt;br/&gt;03/09/2009  12:09 PM             5,359 fetchyahoo.1&lt;br/&gt;03/09/2009  12:09 PM             2,287 fetchyahoo.spec&lt;br/&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;03/09/2009  12:09 PM             4,907 fetchyahoorc&lt;/strong&gt;&lt;/span&gt;&lt;br/&gt;03/09/2009  12:09 PM             6,314 index.html&lt;br/&gt;03/09/2009  12:09 PM            19,380 INSTALL&lt;br/&gt;03/09/2009  12:09 PM               966 TODO&lt;br/&gt;              10 File(s)        182,423 bytes&lt;br/&gt;               2 Dir(s)  147,889,139,712 bytes free&lt;/pre&gt;&lt;br/&gt;You should now try to run it. it gave me this error initially:&lt;br/&gt;&lt;pre&gt;c:\emails\fetchyahoo-2.13.3&amp;gt;perl fetchyahoo&lt;br/&gt;Can't locate MIME/Head.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .&lt;br/&gt;) at fetchyahoo line 59.&lt;br/&gt;BEGIN failed--compilation aborted at fetchyahoo line 59.&lt;/pre&gt;&lt;br/&gt;Basically, it needs the &lt;strong&gt;MIME::Head&lt;/strong&gt; module installed. For this, we will use CPAN module. You can also use the CPANPLUS module, which is more advanced and has the option of un-installing PERL modules too. CPAN module cannot un-install modules.&lt;br/&gt;&lt;br/&gt;This is how you invoke CPAN (you can also just type &lt;strong&gt;c:/&amp;gt; cpan&lt;/strong&gt;). Note that the overwriting the lockfile message might come if a previous session did not terminate properly:&lt;br/&gt;&lt;pre&gt;c:\emails\fetchyahoo-2.13.3&amp;gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;perl -MCPAN -e shell&lt;/span&gt;&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;There seems to be running another CPAN process (pid 5220).  Contacting...&lt;br/&gt;Other job not responding. Shall I overwrite the lockfile 'C:\Perl\cpan\.lock'? (&lt;br/&gt;Y/n) [y]&lt;br/&gt;&lt;br/&gt;cpan shell -- CPAN exploration and modules installation (v1.9205)&lt;br/&gt;ReadLine support enabled&lt;br/&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;&lt;br/&gt;cpan&amp;gt; install MIME::Head&lt;/strong&gt;&lt;/span&gt;&lt;br/&gt;Going to read C:\Perl\cpan\Metadata&lt;br/&gt;  Database was generated on Thu, 26 Mar 2009 10:26:54 GMT&lt;br/&gt;Running install for module 'MIME::Head'&lt;br/&gt;Running make for D/DO/DONEILL/MIME-tools-5.427.tar.gz&lt;br/&gt;Fetching with LWP:&lt;br/&gt;  http://ppm.activestate.com/CPAN/authors/id/D/DO/DONEILL/MIME-tools-5.427.tar.g&lt;br/&gt;z&lt;br/&gt;Fetching with LWP:&lt;br/&gt;  http://ppm.activestate.com/CPAN/authors/id/D/DO/DONEILL/CHECKSUMS&lt;br/&gt;Checksum for C:\Perl\cpan\sources\authors\id\D\DO\DONEILL\MIME-tools-5.427.tar.g&lt;br/&gt;z ok&lt;br/&gt;Scanning cache C:\Perl/cpan/build for sizes&lt;br/&gt;DONE&lt;br/&gt;MIME-tools-5.427/&lt;br/&gt;MIME-tools-5.427/testin/&lt;br/&gt;MIME-tools-5.427/testin/multi-simple.msg&lt;br/&gt;MIME-tools-5.427/testin/andreas-1296.uu&lt;br/&gt;MIME-tools-5.427/testin/ak-0696.msg&lt;br/&gt;MIME-tools-5.427/testin/short.txt&lt;br/&gt;MIME-tools-5.427/testin/words.txt&lt;br/&gt;..&lt;br/&gt;..&lt;br/&gt;..&lt;br/&gt;&lt;br/&gt;  CPAN.pm: Going to build D/DO/DONEILL/MIME-tools-5.427.tar.gz&lt;br/&gt;&lt;br/&gt;*** Module::AutoInstall version 1.03&lt;br/&gt;*** Checking for Perl dependencies...&lt;br/&gt;[Core Features]&lt;br/&gt;- Test::More     ...loaded. (0.72)&lt;br/&gt;- Mail::Header   ...missing. (would need 1.01)&lt;br/&gt;- Mail::Internet ...missing. (would need 1.0203)&lt;br/&gt;- Mail::Field    ...missing. (would need 1.05)&lt;br/&gt;- MIME::Base64   ...loaded. (3.07_01 &amp;gt;= 2.2)&lt;br/&gt;- IO::File       ...loaded. (1.14 &amp;gt;= 1.13)&lt;br/&gt;- IO::Handle     ...loaded. (1.27)&lt;br/&gt;- IO::Stringy    ...missing. (would need 2.11)&lt;br/&gt;- File::Spec     ...loaded. (3.2501 &amp;gt;= 0.6)&lt;br/&gt;- File::Path     ...loaded. (2.04 &amp;gt;= 1)&lt;br/&gt;- File::Temp     ...loaded. (0.18 &amp;gt;= 0.18)&lt;br/&gt;==&amp;gt; Auto-install the 4 mandatory module(s) from CPAN? [y]&lt;br/&gt;...&lt;br/&gt;...&lt;br/&gt;Appending installation info to C:\Perl\lib/perllocal.pod&lt;br/&gt;  GBARR/TimeDate-1.16.tar.gz&lt;br/&gt;  nmake install  -- OK&lt;br/&gt;Running install for module 'Test::Pod'&lt;br/&gt;Running make for P/PE/PETDANCE/Test-Pod-1.26.tar.gz&lt;br/&gt;Fetching with LWP:&lt;br/&gt;  http://ppm.activestate.com/CPAN/authors/id/P/PE/PETDANCE/Test-Pod-1.26.tar.gz&lt;br/&gt;Fetching with LWP:&lt;br/&gt;  http://ppm.activestate.com/CPAN/authors/id/P/PE/PETDANCE/CHECKSUMS&lt;br/&gt;Checksum for C:\Perl\cpan\sources\authors\id\P\PE\PETDANCE\Test-Pod-1.26.tar.gz&lt;br/&gt;ok&lt;br/&gt;..&lt;br/&gt;..&lt;br/&gt;t/require.....ok&lt;br/&gt;t/send........ok&lt;br/&gt;All tests successful.&lt;br/&gt;Files=8, Tests=127,  2 wallclock secs ( 0.00 cusr +  0.00 csys =  0.00 CPU)&lt;br/&gt;  MARKOV/MailTools-2.04.tar.gz&lt;br/&gt;  nmake test -- OK&lt;br/&gt;Running make install&lt;br/&gt;Prepending C:\Perl\cpan\build\MailTools-2.04-fCc9N7/blib/arch C:\Perl\cpan\build&lt;br/&gt;\MailTools-2.04-fCc9N7/blib/lib to PERL5LIB for 'install'&lt;br/&gt;...&lt;br/&gt;...&lt;strong&gt;&lt;br/&gt;Module 'MIME::Head' installed successfully&lt;/strong&gt;&lt;br/&gt;No errors installing all modules&lt;/pre&gt;&lt;br/&gt;Interestingly, you can also check this using Perl Package Manager GUI Utility (invoked by typing ppm on the windows command prompt). It just takes lot of time to load the GUI's data:&lt;br/&gt;&lt;br/&gt;&lt;img class="aligncenter size-full wp-image-222" title="perl-package-manager-screenshot" src="http://opensourceexperiments.files.wordpress.com/2009/03/perl-package-manager-screenshot.png" alt="perl-package-manager-screenshot" width="468" height="472" /&gt;&lt;br/&gt;&lt;br/&gt;Now, let us check if it works:&lt;br/&gt;&lt;pre&gt;c:\emails\fetchyahoo-2.13.3&amp;gt;perl fetchyahoo --nodownload&lt;br/&gt;No username specified.&lt;br/&gt;Please enter your Yahoo! username: pooja33pandey&lt;br/&gt;Please enter your Yahoo! password:&lt;br/&gt;No mailbox or mailspool specified.&lt;br/&gt;Please enter the path to and name of your mail spool or mailbox (eg /var/spool/m&lt;br/&gt;ail/username): pooja33pandey.mbox&lt;br/&gt;Logging in securely via SSL as poojagverma on Fri Mar 27 22:29:50 2009&lt;br/&gt;Failed: Invalid ID or password entered (username: pooja33pandey )&lt;/pre&gt;&lt;br/&gt;If you are running Vista, you might see this infamous pop-up window, which you will need to unblock:&lt;br/&gt;&lt;pre&gt;&lt;img class="size-full wp-image-221 aligncenter" title="vista-perl-block-dialog" src="http://opensourceexperiments.files.wordpress.com/2009/03/vista-perl-block-dialog.png" alt="vista-perl-block-dialog" width="468" height="312" /&gt;&lt;/pre&gt;&lt;br/&gt;All right! So it works. Now, lets try a more comprehensive example:&lt;br/&gt;&lt;pre&gt;c:\emails\fetchyahoo-2.13.3&amp;gt;perl fetchyahoo --onlylistmessages --username=pooja1&lt;br/&gt;3pandey --password=&amp;lt;pwd&amp;gt; --spoolfile=pooja.mbox --logout&lt;br/&gt;Use of uninitialized value $ENV{"HOME"} in concatenation (.) or string at fetchy&lt;br/&gt;ahoo line 1992.&lt;br/&gt;Logging in securely via SSL as pooja13pandey on Fri Mar 27 22:45:49 2009&lt;br/&gt;Country Code 'in' not found. We will try the translation for 'us'.&lt;br/&gt;Country code : in       FetchYahoo! Version: 2.13.3&lt;br/&gt;Successfully logged in as pooja13pandey.&lt;br/&gt;Marking messages read on the server&lt;br/&gt;&lt;br/&gt;Fetching mail from folder: Inbox&lt;br/&gt;Getting Message ID(s) for message(s) 1 - 25.&lt;br/&gt;1. new "Public Records " - Locate anyone. Search public records. 7:46 AM 6KB&lt;br/&gt;2. new "Pooja Pandey &amp;lt;p" - online skype number (678) 534-2725 2:47 AM 3KB&lt;br/&gt;3. old "Nimesh Bhuva &amp;lt;b" - Re: [GHPCSB_MCA_2k] Re: Happy Holi 27/3/09 35KB&lt;br/&gt;4. old "Nimesh Bhuva &amp;lt;b" - Re: [GHPCSB_MCA_2k] Happy Holi 27/3/09 32KB&lt;br/&gt;5. old "Birthday Remind" - First Reminder for Vibha Deshmukh's Birthday 26/3/09&lt;br/&gt;4KB&lt;br/&gt;6. old "Sharma, Ashish " - RE: [LIKELY JUNK]RE: [LIKELY JUNK]Re: So it 25/3/09 6&lt;br/&gt;0KB&lt;br/&gt;....&lt;br/&gt;....&lt;br/&gt;Got 90 Message IDs&lt;br/&gt;Not downloading messages&lt;br/&gt;Messages have not been deleted.&lt;br/&gt;Logged out.&lt;/pre&gt;&lt;br/&gt;&lt;blockquote&gt;Note that fetchyahoo limits the messages fetched to 90 by default, because there is a download limit of 65mb per hour per user per IP address that is set by yahoo. You can use --safedownload option to give a gap of 5-10 seconds between each message fetch. This way, you can run a single command for a long time, without hitting the yahoo imposed download limit (per user, per IP).&lt;/blockquote&gt;&lt;br/&gt;Note that once you download the messages locally, they will be marked as read. If you want to terminate the download in between, you can do so and resume it later with the &lt;strong&gt;--newonly &lt;/strong&gt;and &lt;strong&gt;--msgidarchivefile&lt;/strong&gt; option. By defeault, the messages are appended to the archive/spool file:&lt;br/&gt;&lt;pre&gt;D:\emails\fetchyahoo-2.13.3&amp;gt;perl fetchyahoo --folder=&amp;lt;foldername&amp;gt;  \&lt;br/&gt;--username=&amp;lt;username&amp;gt; --password=&amp;lt;password&amp;gt;                        \&lt;br/&gt;--safedownload  --spoolfile=&amp;lt;foldername&amp;gt;.mbox                      \&lt;br/&gt;&lt;strong&gt;--msgidarchivefile=&amp;lt;foldername&amp;gt;_msgids  --newonly&lt;/strong&gt;&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;Conclusion: The strategy in a nutshell&lt;/h2&gt;&lt;br/&gt;So there you have it. A simple mechanism to get targeted email ids for making your online marketing campaign successful:&lt;br/&gt;&lt;br/&gt;1) Identify the Yahoo Group that you are interested in. This is a strategic decision. You want to limit your focus to people who would be interested in your idea. The demographics are important for high return on interest.&lt;br/&gt;&lt;br/&gt;2) Become a member of the group and subscribe to individual emails.&lt;br/&gt;&lt;br/&gt;3) Setup a filter to direct all Group emails to a specific folder. Free Yahoo account allows for 100 such filters now. Make sure the traffic is flowing in.&lt;br/&gt;&lt;br/&gt;4) Sit on your ass for 6 months to 1 year to allow of significant volume of emails. If it is high activity/volume group, then your wait time would be lesser.&lt;br/&gt;&lt;br/&gt;5) Fetch the Yahoo folder contents to your local PC. Now you are sitting on the goldmine.&lt;br/&gt;&lt;br/&gt;6) Filter out the email ids using simple shell script &lt;a href="http://opensourceexperiments.wordpress.com/2009/03/21/quick-script-for-extracting-emails-from-unformatted-text/" target="_blank"&gt;provided here&lt;/a&gt;. Feel free to extent it to your needs. Always manually check the email ids retrieved.&lt;br/&gt;&lt;br/&gt;7) Last, but not the least, input the contacts gathered to your mail broadcast software and reap the benefits by inviting them to your newsletter/broadcast.&lt;br/&gt;&lt;br/&gt;Remember, the golden rule of thumb to retain the interest of your audience -- Do not send too many similar mails in too short a period of time. Start very moderately and hope that most of them would join your newsletter.&lt;br/&gt;&lt;h2&gt;Conclusion - With great power comes great responsbility..&lt;/h2&gt;&lt;br/&gt;Well, I hope that this article was helpful to you, if your intentions are true and pure. I DO NOT support mis-use of this method for spamming people's inboxes and for immoral or lucrative purposes (that is NOT the intention with which this article has been written).&lt;br/&gt;&lt;br/&gt;If you find this article useful or would like to discuss it further, please leave a comment here. Have a great day and Good luck.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-3301167014054684670?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/3301167014054684670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/how-to-scrape-emails-for-online.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/3301167014054684670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/3301167014054684670'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/how-to-scrape-emails-for-online.html' title='How to scrape emails for online marketing? -- for free'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-7962465556539760974</id><published>2009-03-21T14:52:00.000-04:00</published><updated>2010-12-30T22:41:35.250-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell scripts'/><category scheme='http://www.blogger.com/atom/ns#' term='mailman'/><category scheme='http://www.blogger.com/atom/ns#' term='email'/><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>Quick script for extracting emails from unformatted text</title><content type='html'>Often, we face a need of extracting emails from some un-formatted text like or html tags etc. For this, the following script can come handy for extracting emails into simple text file, which can be uploaded to mailman or other mailing software contact lists:&lt;br/&gt;&lt;pre&gt;$ more xtract_emails.sh&lt;br/&gt;#/bin/ksh&lt;br/&gt;sed -e 's/\,/\n/g' -e 's/ /\n/g' $1 |   \&lt;br/&gt;                             grep '@' | \&lt;br/&gt;sed -e "s/[&amp;lt;&amp;gt;();]//g" -e 's/mailto://g' \&lt;br/&gt;                              | sort -u &amp;gt; ${1}.extracted.txt&lt;br/&gt;&lt;br/&gt;wc -l ${1}.extracted.txt&lt;br/&gt;&lt;br/&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Example:&lt;br/&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br/&gt;$ ./xtract.sh emails_unformatted.txt&lt;br/&gt;&lt;br/&gt;131 emails_formatted.extracted.txt&lt;/pre&gt;&lt;br/&gt;Hope it is useful for someone else for extracting emails in a single shot. Otherwise, it takes a lot of time for doing several passes by examining the post-processed output. Even with the above heuristic rules, the output  may not have 100% proper email, so some proof reading would be needed.&lt;br/&gt;&lt;br/&gt;If this is useful to you, please leave a comment here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-7962465556539760974?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/7962465556539760974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/quick-script-for-extracting-emails-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/7962465556539760974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/7962465556539760974'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/quick-script-for-extracting-emails-from.html' title='Quick script for extracting emails from unformatted text'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-3177851751027195399</id><published>2009-03-19T14:43:00.000-04:00</published><updated>2010-12-30T22:41:35.228-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wordpress'/><category scheme='http://www.blogger.com/atom/ns#' term='cforms'/><category scheme='http://www.blogger.com/atom/ns#' term='OPen source'/><category scheme='http://www.blogger.com/atom/ns#' term='widget'/><category scheme='http://www.blogger.com/atom/ns#' term='contact form'/><title type='text'>Failed opening required 'wp-blog-header.php' while using cformsII
wordpress plugin</title><content type='html'>&lt;h2&gt;Problem&lt;/h2&gt;&lt;br/&gt;All right, so I was trying to insert a cforms II contact form in Wordpress 2.7.0 Installation and was facing this error in a pop-up dialog box:&lt;br/&gt;&lt;blockquote&gt;Warning: require_once(wp-blog-header.php) [function.require-once]: failed to open stream: No such file or directory in /home/wisdom/public_html/prashna/wp-content/plugins/cforms/js/insertdialog25.php on line 9&lt;br/&gt;&lt;br/&gt;Fatal error: require_once() [function.require]: Failed opening required 'wp-blog-header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/wisdom/public_html/prashna/wp-content/plugins/cforms/js/insertdialog25.php on line 9&lt;/blockquote&gt;&lt;br/&gt;I ignored it for a little while, but a point came when I had to really get it going. As everyone else, I googled it. The first 3-5 pages of it are sheer nonsensical links of websites facing the same error, but without solution. Then finally, I hit upon a support forum of cforms II, which suggested many things.&lt;br/&gt;&lt;h2&gt;Solution&lt;/h2&gt;&lt;br/&gt;This is what worked for me. Apparently, the abspath.php was MISSING from the cforms plugin directory:&lt;br/&gt;&lt;pre&gt;wisdom@wisdomspeak.org [~]# find . -name abspath.php&lt;br/&gt;./public_html/mantra/wp-content/plugins/cforms/abspath.php&lt;br/&gt;&lt;br/&gt;wisdom@wisdomspeak.org [~]# find . -name cforms&lt;br/&gt;./public_html/mantra/wp-content/plugins/cforms&lt;br/&gt;./public_html/gita/wp-content/plugins/cforms&lt;br/&gt;./public_html/prashna/wp-content/plugins/cforms&lt;br/&gt;./public_html/vedvaani/wp-content/plugins/cforms&lt;br/&gt;&lt;br/&gt;# cp ./public_html/mantra/wp-content/plugins/cforms/abspath.php \&lt;br/&gt;./public_html/prashna/wp-content/plugins/cforms&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;And everything was golden..&lt;/h2&gt;&lt;br/&gt;Thanks to that, I was able to have a contact form like this in the wordpress page:&lt;br/&gt;&lt;br/&gt;&lt;img class="alignleft size-full wp-image-198" title="cforms1" src="http://opensourceexperiments.files.wordpress.com/2009/03/cforms1.png" alt="cforms1" width="468" height="412" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-3177851751027195399?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/3177851751027195399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/failed-opening-required-while-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/3177851751027195399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/3177851751027195399'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2009/03/failed-opening-required-while-using.html' title='Failed opening required &amp;#39;wp-blog-header.php&amp;#39; while using cformsII&#xA;wordpress plugin'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-728023576484344991</id><published>2009-02-01T04:20:00.000-05:00</published><updated>2010-12-30T22:41:35.009-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wordpress'/><category scheme='http://www.blogger.com/atom/ns#' term='sharing users'/><category scheme='http://www.blogger.com/atom/ns#' term='table_prefix'/><category scheme='http://www.blogger.com/atom/ns#' term='OPen source'/><category scheme='http://www.blogger.com/atom/ns#' term='tips and tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='wp_capabilities'/><category scheme='http://www.blogger.com/atom/ns#' term='common user'/><category scheme='http://www.blogger.com/atom/ns#' term='open source software'/><category scheme='http://www.blogger.com/atom/ns#' term='multiple wordpress installation'/><title type='text'>Setting up a common login across multiple wordpress installations</title><content type='html'>&lt;h2&gt;A pre-requisite for promoting interaction across sub-domains..&lt;/h2&gt;&lt;br/&gt;After setting up wisdomspeak.org/mantra, wisdomspeak.org/vedictalks and wisdomspeak.org/gita, i realized that the only way the parent website, wisdomspeak.org, was going to get popular were through inviting user interaction on discussion boards. But for this, users would need to be logged into different sub-domains through a single login (like a global single sign-on feature of Oracle applications).&lt;br/&gt;&lt;h2&gt;Assumptions:&lt;/h2&gt;&lt;br/&gt;First and foremost, the version of wordpress installed on the multiple sub-domains was version 2.7. Also, the wordpress installations were done in the same database, with different table prefixes.&lt;br/&gt;&lt;br/&gt;The table_prefix of the first wordpress installation (wisdomspeak.org/mantra) was "wp_", whereas the table prefix of the other wordpress installation &lt;strong&gt;with which&lt;/strong&gt; I wanted to share the userbase of wisdomspeak.org/mantra, was "gita_".&lt;br/&gt;&lt;br/&gt;Now I had to make wisdomspeak.org/gita use the same users/roles as wisdomspeak.org/mantra.&lt;br/&gt;&lt;h2&gt;What worked finally..&lt;/h2&gt;&lt;br/&gt;Once you try googling it yourself, this is probably the most straightforward and common response that you would see:&lt;br/&gt;&lt;br/&gt;In the wp-config.php of the 2nd wordpress installation, after this line:&lt;br/&gt;&lt;pre&gt;/* That's all, stop editing! Happy blogging. */&lt;/pre&gt;&lt;br/&gt;..add the following:&lt;br/&gt;&lt;pre&gt;define('COOKIE_DOMAIN', '.wisdomspeak.org');&lt;br/&gt;define('COOKIEPATH', '/');&lt;br/&gt;define('CUSTOM_USER_TABLE', 'wp_users');&lt;br/&gt;define('CUSTOM_USER_META_TABLE', 'wp_usermeta');&lt;/pre&gt;&lt;br/&gt;But when I was going to wisdomspeak.org/gita/wp-login.php and trying to login as admin user, I was getting you do not have " &lt;em&gt;You do not have sufficient permissions to access this page.&lt;/em&gt;" error message while using firefox browser, while IE just gave up with a page not found error.&lt;br/&gt;&lt;blockquote&gt;Interestingly, this error is also encountered a log while people upgrade wordpress installations, so there is a lot of scope of mixing up resolutions while trying to solve this. Better be wary of mixing different recipes.&lt;/blockquote&gt;&lt;br/&gt;And so, in desperation, I searched for more options/resolutions and came across a post that suggested changing the prefix values of meta_key column in the &lt;em&gt;&amp;lt;table_prefix&amp;gt;_usermeta&lt;/em&gt; table of the 2nd word press installation. Using this hint, I did some more tweaking by opening the phpMyAdmin interface of the gita_metadata, but the permissions error was still coming.&lt;br/&gt;&lt;br/&gt;So, i searched a bit more and came across a posting in which a user was not able to make it work, in spite of manually the prefix of &amp;lt;table_prefix&amp;gt;_capabilities table referred in $WORDPRESS_HOME/wp-includes/capabilities.php to the table_prefix of the earlier wordpress installation (which was &lt;strong&gt;wp_&lt;/strong&gt; in my case).  The change is actually quite simple: you are fixing the name of  the capabilities table for a user to be wp_capabilities.&lt;br/&gt;&lt;pre&gt;function _init_caps() {&lt;br/&gt;global $wpdb;&lt;br/&gt;&lt;span style="color:#ff0000;"&gt;/* $this-&amp;gt;cap_key = $wpdb-&amp;gt;prefix . 'capabilities';  -- the earlier entry*/&lt;/span&gt;&lt;br/&gt;&lt;span style="color:#0000ff;"&gt;$this-&amp;gt;cap_key = 'wp_capabilities';  /* the new entry */&lt;/span&gt;&lt;br/&gt;$this-&amp;gt;caps = &amp;amp;$this-&amp;gt;{$this-&amp;gt;cap_key};&lt;/pre&gt;&lt;br/&gt;And when I tried with this, not only was I able to login with the admin user's password for wordpress installation 1 in wordpress installation 2, but when I changed the URL from wisdomspeak.org/gita/wp-admin/ to  wisdomspeak.org/mantra/wp-admin/, i was not redicted to a login page again, which meant that the same user was shared across different wordpress installation. (It did ask me the login once for wisdomspeak.org/mantra/wp-admin/, so perhaps the cookie was not shared really, but that is something I need to doublecheck).&lt;br/&gt;&lt;h2&gt;Extending this concept to roles?&lt;/h2&gt;&lt;br/&gt;While going across capabilities.php, I came across a similar looking entry for user_roles and thought that logically speaking, a similar fix would be needed in capabilities.php to re-use the user roles :&lt;br/&gt;&lt;pre&gt;function _init () {&lt;br/&gt;global $wpdb;&lt;br/&gt;global $wp_user_roles;&lt;br/&gt;&lt;span style="color:#0000ff;"&gt;&lt;span style="color:#ff0000;"&gt; /* $this-&amp;gt;role_key = $wpdb-&amp;gt;prefix . 'user_roles';&lt;/span&gt;&lt;br/&gt;$this-&amp;gt;role_key = 'wp_user_roles';&lt;/span&gt;&lt;/pre&gt;&lt;br/&gt;&lt;span style="color:#000000;"&gt;But when I tried this, i started getting the &lt;/span&gt;"&lt;em&gt;You do not have sufficient permissions to access this page.&lt;/em&gt;" error again. On reverting it back like this, the login started working again:&lt;br/&gt;&lt;pre&gt;function _init () {&lt;br/&gt;global $wpdb;&lt;br/&gt;global $wp_user_roles;&lt;br/&gt;&lt;span style="color:#0000ff;"&gt;&lt;span style="color:#0000ff;"&gt; $this-&amp;gt;role_key = $wpdb-&amp;gt;prefix . 'user_roles';&lt;br/&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;/* $this-&amp;gt;role_key = 'wp_user_roles'; */&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;So was it really needed..&lt;/h2&gt;&lt;br/&gt;Looking back, changing the meta_key column's entries in gita_usermeta table did not make any sense, since I was never going to use that table.  To prove this point, i changed the prefix values for meta_key column back to gita_ and the admin user was still shared across wisdomspeak.org/mantra nad wisdomspeak.org/gita.&lt;br/&gt;&lt;h2&gt;How to share cookies across wp installs in a common domain?&lt;/h2&gt;&lt;br/&gt;Thanks to Ben (whose comment can be seen below) for sharing the secret for making cookies work across wordpress installs in a common domain:&lt;br/&gt;&lt;br/&gt;1) Use the same auth_salt, logged_in_salt, secret key in /wp-admin/options.php page for each sub-domain blog&lt;br/&gt;&lt;br/&gt;2) Install Root-cookie plugin ( by LINICKX )&lt;br/&gt;&lt;br/&gt;* http://www.linickx.com/archives/831/root-cookie-path-14-an-update-for-wordpress-27&lt;br/&gt;&lt;br/&gt;1. Upload root-cookie.php to the /wp-content/plugins/ directory&lt;br/&gt;2. Activate the plugin through the 'Plugins' menu in WordPress&lt;br/&gt;3. Log out&lt;br/&gt;4. Log in&lt;br/&gt;5. Done :o)&lt;br/&gt;&lt;br/&gt;3) And in: wp-settings.php&lt;br/&gt;&lt;br/&gt;Change this source code like this:&lt;br/&gt;&lt;br/&gt;351 - define('COOKIEHASH', md5(get_option('siteurl')));&lt;br/&gt;&lt;br/&gt;to:&lt;br/&gt;&lt;br/&gt;351 -  define('COOKIEHASH', md5(get_option('http://www.mysite.com')));&lt;br/&gt;&lt;h2&gt;Yippee!&lt;/h2&gt;&lt;br/&gt;All right, so that was a good learning on an early Sunday morning; All in 1 hour of googling and trying out options. Dont they say that early mornings are the most productive of times.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-728023576484344991?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/728023576484344991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2009/02/setting-up-common-login-across-multiple.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/728023576484344991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/728023576484344991'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2009/02/setting-up-common-login-across-multiple.html' title='Setting up a common login across multiple wordpress installations'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-2985921478150150641</id><published>2009-01-30T11:10:00.000-05:00</published><updated>2010-12-30T22:41:34.958-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wordpress themes'/><category scheme='http://www.blogger.com/atom/ns#' term='wordpress'/><category scheme='http://www.blogger.com/atom/ns#' term='free themes'/><category scheme='http://www.blogger.com/atom/ns#' term='3 column'/><category scheme='http://www.blogger.com/atom/ns#' term='OPen source'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='3 column themes'/><category scheme='http://www.blogger.com/atom/ns#' term='themes'/><title type='text'>My first Aesthetic wordpress theme: Modifed Lotus Flower Theme for 3
columns</title><content type='html'>&lt;h2&gt;A big Leap..&lt;/h2&gt;&lt;br/&gt;The past few days have been a big leap for me. Thanks to Google's search engine, tons of prolific writers across the world, and &lt;em&gt;Tanvi Chanchalani&lt;/em&gt;, I learnt something about wordpress and css, which enabled me to modify a beautifully aesthetic 2-column wordpress theme called &lt;a href="http://www.freewpthemes.net/preview/lotusflower" target="_blank"&gt;Lotus Flower&lt;/a&gt; into a 3-column wordpress theme. Not only this, using it, I was able to quickly make two websites on my newly purchased domain, &lt;a href="wisdomspeak.org" target="_blank"&gt;wisdomspeak.org&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;The purpose of this post is to recount my learning experience in slow motion for my own benefit and also for the benefit of those thousands of budding wordpress theme creators. Honestly, there is so much creativity out there. People get great ideas all the time. It would be a pity &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;not&lt;/strong&gt;&lt;/span&gt; to be of any service to them, so that they could help humanity. Well, seriously, I just want to help.&lt;br/&gt;&lt;h2&gt;I Love you!.. but...&lt;/h2&gt;&lt;br/&gt;Ok, back to the mission.&lt;br/&gt;&lt;br/&gt;When I initially saw the Lotus Flower theme on &lt;a href="http://www.freewpthemes.net"&gt;http://www.freewpthemes.net&lt;/a&gt;, I was so impressed (bowled over might be the right term) that it immediately struck me "the" one. And I used it very well, feeling happy.&lt;br/&gt;&lt;br/&gt;But soon, I realized that to encourage the community to adopt the audio resources website that I was planning to build, Im going to need people to donate as well, which meant that they needed to see the &lt;em&gt;&lt;strong&gt;Donate through Paypal plugin&lt;/strong&gt;&lt;/em&gt; on the sidebar WITHOUT scrolling down.&lt;br/&gt;&lt;h2&gt;Necessity is the mother of Invention..&lt;/h2&gt;&lt;br/&gt;The &lt;em&gt;&lt;strong&gt;Support us &lt;/strong&gt;&lt;/em&gt;plugin simply &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;had&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt; &lt;/strong&gt;to catch the attention of the person browsing the website, or else the idea would be buried in the annals of .. uhm.. the sidebar. So I had this really urging need of bringing it on the right hand side, along with some more visible links to related websites. Cmon now, I had to make it easy on the users, right, or else I wouldn't be doing my marketing homework right.&lt;br/&gt;&lt;br/&gt;And so, i started looking around for means to add another sidebar. But there was this ONE problem. I didn't know squat about PHP or wordpress themes or CSS !&lt;br/&gt;&lt;br/&gt;Hmm, but I had a couple of big factor on my side. I had the fire in the belly to make it work and I had TIME. Did anyone tell you that time is also a big resource? (The Capitalist says: Time is Money. In Hindi they say, समय बड़ा बलवान - time is very powerful).&lt;br/&gt;&lt;h2&gt;And so, the hunt begins..&lt;/h2&gt;&lt;br/&gt;Ok, so the first thing to understand for customizing a wordpress theme is that the heart of the Look/Feel/User Interface is the style.css (cascading style sheet) file, which is usually in the home directory of the Wordpress theme ($WORDPRESS_HOME/wp-content/themes/&amp;lt;themename&amp;gt;). The directives given in style.css regulate the placement and cosmetics of the elements that make up the website.&lt;br/&gt;&lt;br/&gt;The contents or elements themselves come from Wordpress's infrastructure (content entered through .../wp-admin.php console) and have got &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;nothing to do&lt;/strong&gt;&lt;/span&gt; with a style.css file. You could simply modify the sytle.css and achieve visually very different results. For example, check out &lt;a href="wisdomspeak.org/vedictalks" target="_blank"&gt;wisdomspeak.org/vedictalks&lt;/a&gt; and &lt;a href="wisdomspeak.org/mantra" target="_blank"&gt;wisdomspeak.org/mantra&lt;/a&gt;. They are both using the SAME theme, but just slightly different style.css  etc.&lt;br/&gt;&lt;h2&gt;A different path of hit and trial..&lt;/h2&gt;&lt;br/&gt;But thats not how it played out for me. The paragraph above me is just me talking in retrospect.&lt;br/&gt;&lt;br/&gt;First, I tried adding a second sidebar to the &lt;strong&gt;Lotus Flower&lt;/strong&gt; theme. After googling a lot of pages, I could finally see sidebar2 in the Configure Widgets Page (through the Dashboard link):&lt;br/&gt;&lt;br/&gt;1) Prefixed an argument "2," as the first argument to the register_sidebars() function in functions.php. Earlier, the function call was for register_&lt;em&gt;sidebar&lt;/em&gt;() -- notice the singular case.&lt;br/&gt;&lt;pre&gt;register_sidebars(&lt;span style="color:#0000ff;"&gt;&lt;span style="font-weight:bold;text-decoration:underline;"&gt;2,&lt;/span&gt; &lt;/span&gt;array(&lt;br/&gt;'before_widget' =&amp;gt; '&amp;lt;li id="%1$s" class="widget %2$s"&amp;gt;',&lt;br/&gt;'after_widget' =&amp;gt;  '&amp;lt;/li&amp;gt;',&lt;br/&gt;'before_title' =&amp;gt; '&amp;lt;h2 class="widgettitle"&amp;gt;',&lt;br/&gt;'after_title' =&amp;gt; '&amp;lt;/h2&amp;gt;',&lt;br/&gt;));&lt;/pre&gt;&lt;br/&gt;2) Copied $WORDPRESS_HOME/wp-content/themes/&amp;lt;themename&amp;gt;/sidebar.php to $WORDPRESS_HOME/wp-content/themes/&amp;lt;themename&amp;gt;/sidebar2.php and made the following changes in sidebar.php and sidebar2.php:&lt;br/&gt;&lt;pre&gt;# diff sidebar.php sidebar2.php&lt;br/&gt;1c1&lt;br/&gt;&amp;lt; &amp;lt;div id="sidebar&lt;span style="text-decoration:underline;"&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;-left&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;"&amp;gt;&lt;br/&gt;---&lt;br/&gt;&amp;gt; &amp;lt;div id="sidebar&lt;span style="color:#0000ff;"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;-right&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;"&amp;gt;&lt;br/&gt;3c3&lt;br/&gt;&amp;lt;               &amp;lt;?php if (!function_exists('dynamic_sidebar')&lt;br/&gt;|| !dynamic_sidebar(&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;1&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;)): ?&amp;gt;&lt;br/&gt;---&lt;br/&gt;&amp;gt;               &amp;lt;?php if (!function_exists('dynamic_sidebar')&lt;br/&gt;|| !dynamic_sidebar(&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;2&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;)): ?&amp;gt;&lt;/pre&gt;&lt;br/&gt;&lt;blockquote&gt;Earlier, the function call inside sidebar.php was only for &lt;em&gt;dynamic_sidebar()&lt;/em&gt;. It wasn't working without it. Also, the &amp;lt;div id..&amp;gt; tag value was made more specific to -left or -right.&lt;br/&gt;&lt;br/&gt;Later on, I realized that the advantage of this was that I could influence the look and feel of each sidebar individually.&lt;/blockquote&gt;&lt;br/&gt;3) Included &lt;span style="font-weight:bold;"&gt;&amp;lt;?php include( "sidebar2.php"); ?&amp;gt; &lt;/span&gt;in  page.php and index.php like this:&lt;br/&gt;&lt;pre&gt;&amp;lt;?php get_header(); ?&amp;gt;&lt;br/&gt;&lt;span style="color:#0000ff;"&gt;&lt;span style="font-weight:bold;"&gt;&amp;lt;?php include( "sidebar2.php"); ?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br/&gt;Then did the same for $WORDPRESS_HOME/wp-content/themes/&amp;lt;themename&amp;gt;/404.php, archive.php, search.php, single.php. The really dumb rule of thumb that I followed was: if there is a &lt;strong&gt;&amp;lt;?php get_sidebar(); ?&amp;gt;&lt;/strong&gt; in the php file, it needs the 2nd sidebar too.  Common sense, eh?&lt;br/&gt;4) At this point, lo and behold, I COULD see the 2nd sidebar in the Configured widgets page on Wordpress admin console and happily assigned the PayPal widget to the right sidebar. At least, I was getting &lt;em&gt;somewhere.&lt;/em&gt;&lt;br/&gt;&lt;br/&gt;5)  When I tried previewing the website live, it WAS showing the right sidebar, but the left sidebar was pushed way down on the left. So the content was very much there, but the UI/cosmetics was not displaying it right. This is where we need to brush up our CSS skills.&lt;br/&gt;&lt;h2&gt;learning basic CSS..&lt;/h2&gt;&lt;br/&gt;Now, it was down to manipulating the style.css for accommodating the extra sidebar.This is where &lt;a href="http://www.html.net/tutorials/css/" target="_blank"&gt;these tutorials from html.net&lt;/a&gt; really helped me understand the overall scheme of css. I still don't understand that much about how floating works. My approach to making the theme work was .. change one property, preview it and if it wasn't working, revert it back. Pretty much hit and trial based.&lt;br/&gt;&lt;br/&gt;From common sense, I could reason that there was a need to play with a lot of width values width/padding/marging values for various elements in style.css, because ultimately that's what was causing the mis-adjustment.&lt;br/&gt;&lt;br/&gt;Changed the style.css a bit to accomodate the 2nd sidebar to the right. I had to play with a lot of width values. I just guessed that some of those width/padding/marging values were infuencing the display. But I didn't understand the overall structure properly yet.&lt;br/&gt;&lt;blockquote&gt;It was actually at &lt;a href="http://www.html.net/tutorials/css/lesson13.asp" target="_blank"&gt;http://www.html.net/tutorials/css/lesson13.asp&lt;/a&gt; that a lightbulb lit up in my mind. The example had used &lt;code&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;width: 33%;.&lt;/strong&gt;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Ok, I thought, if this directive can be used for columns in a list, then why cant it be used for any other element? Or in other words, it should be possible to use a similar % directive for other elements in css too.&lt;/blockquote&gt;&lt;br/&gt;&lt;h2&gt;First blood..&lt;/h2&gt;&lt;br/&gt;This is where &lt;em&gt;Tanvi &lt;/em&gt;helped me a lot in advising which sections and their properties to be changed. I wanted to cover more width on the screen (800x600 resolution is history). Keeping this in mind, she not only widened some settings, but also sent me widened images to go along with the new theme.&lt;br/&gt;&lt;br/&gt;When I initially replaced the style.css for theme, its working on firefox, but not on IE: The left sidebar was not able to adjust on the top somehow, and was pushed down below. Also, the header and top navigation pane were not centered.  Thats when I realized that the new widened images had not been overlaid. After copying them, the screen is much wider, finally! However, there seems to be some sort of an adjustment issue with the radio widget's size or floating adjustment for IE. From googling, it seems that there are some CSS bugs for IE, especially around wrapping or floating.&lt;br/&gt;&lt;blockquote&gt;After playing with &lt;em&gt;&lt;span style="text-decoration:underline;"&gt;width: &amp;lt;number&amp;gt;%&lt;/span&gt; &lt;/em&gt;directives for &lt;em&gt;content, sidebar-left, sidebar-right &lt;/em&gt;sections of style.css (&lt;em&gt;I identified them with the background image tag -- compared the filenames to the theme's images visually.&lt;/em&gt;), I was able to bring all the contents under a very uniformly formatted pattern.&lt;/blockquote&gt;&lt;br/&gt;I was experimenting with % values for width on top of the css and  this seems to be setting up the alignment very well for sidebars and the top! It almost like what is needed. But there was still a gap between the left sidebar and the main content box. It seems to be related to some margin setting for the content element. This is what worked out for me:&lt;br/&gt;&lt;pre&gt;#sidebar-left {&lt;br/&gt;        FLOAT: left; WIDTH: &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;20%&lt;/strong&gt;&lt;/span&gt;&lt;br/&gt;}&lt;br/&gt;#sidebar-right {&lt;br/&gt;        FLOAT: right; WIDTH: &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;20%&lt;/strong&gt;&lt;/span&gt;&lt;br/&gt;}&lt;br/&gt;#content {&lt;br/&gt;        BACKGROUND: url(images/img10.jpg) no-repeat left top;&lt;br/&gt; FLOAT: right ; WIDTH: &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;58%&lt;/strong&gt;&lt;/span&gt;&lt;br/&gt;}&lt;/pre&gt;&lt;br/&gt;In an effort to center and widen the header &amp;amp; logo and remove extra padding between header/logo, I kept playing with the properties of their sections:&lt;br/&gt;&lt;pre&gt;#header {&lt;br/&gt;        BACKGROUND: url(images/img02.jpg) no-repeat &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;center center&lt;/strong&gt;&lt;/span&gt;;&lt;br/&gt;MARGIN: 0px auto; WIDTH: &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;1200px&lt;/strong&gt;;&lt;/span&gt; HEIGHT: 60px&lt;br/&gt;}&lt;br/&gt;#logo-wrap&lt;br/&gt; {&lt;br/&gt;       PADDING-RIGHT: 0px; PADDING-LEFT: 0px;&lt;br/&gt;BACKGROUND: url(images/img03.jpg) no-repeat left top;&lt;br/&gt;PADDING-BOTTOM: &lt;strong&gt;&lt;span style="color:#0000ff;"&gt;20px;&lt;/span&gt;&lt;/strong&gt; MARGIN: 0px auto;&lt;br/&gt;WIDTH: &lt;strong&gt;&lt;span style="color:#0000ff;"&gt;1200px&lt;/span&gt;;&lt;/strong&gt; PADDING-TOP: &lt;strong&gt;&lt;span style="color:#0000ff;"&gt;10px&lt;/span&gt;&lt;/strong&gt;&lt;br/&gt;}&lt;/pre&gt;&lt;br/&gt;Now the top alignment was perfect, but the menu links at the top (links to the Wordpress "Pages") were aligned to the very left. Once again, &lt;em&gt;Tanvi &lt;/em&gt;came to the rescue and said that the answer was to change the left padding for menu UL section:&lt;br/&gt;&lt;pre&gt;#menu UL {&lt;br/&gt;    PADDING-RIGHT: 0px; PADDING-LEFT: &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;145px&lt;/strong&gt;;&lt;/span&gt;&lt;br/&gt;PADDING-BOTTOM: 0px; MARGIN:0px; LINE-HEIGHT: normal;&lt;br/&gt;PADDING-TOP: 0px; LIST-STYLE-TYPE: none&lt;br/&gt;}&lt;/pre&gt;&lt;br/&gt;This is when It was very much like what I wanted it to be. I was elated and thankful to have been able to achieve my goal.&lt;br/&gt;&lt;blockquote&gt;Later that night, I saw that the padding for the elements in the right sidebar was off, not uniform. It was related to the left-padding pixel value being somewhat different for the list and element. I wouldn't say that even now all the left/right padding values for left/right sidebar's units/lists elements are uniform at 0px or 5px or 10px, but its just that the combination of hits and trial without a particular scheme worked out. You should take a more methodical approach and keep a uniform pixel side to make things easier.&lt;/blockquote&gt;&lt;br/&gt;&lt;h2&gt;The Modified theme ..&lt;/h2&gt;&lt;br/&gt;&lt;img class="aligncenter size-full wp-image-171" title="screenshot" src="http://opensourceexperiments.files.wordpress.com/2009/01/screenshot.png" alt="screenshot" width="334" height="176" /&gt;&lt;br/&gt;&lt;br/&gt;The theme is &lt;a href="http://www.wisdomspeak.org/mantra/wp-content/themes/lotusflower_3columns.zip" target="_blank"&gt;available here&lt;/a&gt; for your download and further modification. The &lt;a href="http://www.wisdomspeak.org/vedictalks/wp-content/themes/lotusflower.zip" target="_blank"&gt;original theme's zip file&lt;/a&gt; is available here.&lt;br/&gt;&lt;br/&gt;Later on, I modified the following two things to make a different theme for &lt;a href="wisdomspeak.org/vedictalks" target="_blank"&gt;wisdomspeak.org/vedictalks&lt;/a&gt; (the new one is style.css):&lt;br/&gt;&lt;pre&gt;# diff style.css.gold1 style.css&lt;br/&gt;2c2&lt;br/&gt;&amp;lt;       PADDING-RIGHT: 0px; MARGIN-TOP: 10px; PADDING-LEFT: 0px; FONT-SIZE: 13px;&lt;br/&gt;BACKGROUND: url(images/img01.jpg) repeat-x left top; PADDING-BOTTOM: 0px; COLOR: #333333;&lt;br/&gt;PADDING-TOP: 0px; FONT-FAMILY: "Trebuchet MS", Arial, Helvetica, sans-serif&lt;br/&gt;---&lt;br/&gt;&amp;gt;       PADDING-RIGHT: 0px; MARGIN-TOP: 10px; PADDING-LEFT: 0px; FONT-SIZE: 13px; &lt;strong&gt;&lt;span style="color:#0000ff;"&gt;&lt;br/&gt;BACKGROUND-COLOR: #FFF380;&lt;/span&gt;&lt;/strong&gt; PADDING-BOTTOM: 0px; COLOR: #333333;&lt;br/&gt;PADDING-TOP: 0px; FONT-FAMILY: "Trebuchet MS", Arial, Helvetica, sans-serif&lt;br/&gt;98c98&lt;br/&gt;&amp;lt;       BACKGROUND: url(images/img05.jpg) no-repeat left top;MARGIN-LEFT: 4px;&lt;br/&gt;MARGIN: 0px auto; WIDTH: 950px; HEIGHT: 200px;&lt;br/&gt;---&lt;br/&gt;&amp;gt;       BACKGROUND: url(images/img05.jpg) no-repeat left top;MARGIN-LEFT: 4px;&lt;br/&gt;MARGIN: 0px auto; WIDTH: 950px; &lt;strong&gt;&lt;span style="color:#0000ff;"&gt;HEIGHT: 20.3em;&lt;/span&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;br/&gt;The beauty of  &lt;em&gt;HEIGHT: &amp;lt;number&amp;gt;em&lt;/em&gt; property is that it can scale up the image very well.&lt;br/&gt;&lt;br/&gt;The new theme looks like this:&lt;br/&gt;&lt;br/&gt;&lt;img class="aligncenter size-medium wp-image-172" title="vedictalks-snap" src="http://opensourceexperiments.files.wordpress.com/2009/01/vedictalks-snap.png?w=300" alt="vedictalks-snap" width="300" height="143" /&gt;&lt;br/&gt;&lt;h2&gt;Feedback..&lt;/h2&gt;&lt;br/&gt;I know this is not the best of the tutorials out there on the internet, but I would appreciate feedback/validation from you, whatever your level of expertise. I am still learning CSS and would love to try new things like scalable flash images in a wordpress blog.  So please leave a comment here. Thanks for your consideration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-2985921478150150641?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/2985921478150150641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2009/01/my-first-aesthetic-wordpress-theme.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/2985921478150150641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/2985921478150150641'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2009/01/my-first-aesthetic-wordpress-theme.html' title='My first Aesthetic wordpress theme: Modifed Lotus Flower Theme for 3&#xA;columns'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-8719395790862338099</id><published>2009-01-07T14:20:00.000-05:00</published><updated>2010-12-30T22:41:37.950-05:00</updated><title type='text'></title><content type='html'>&lt;h2&gt;Preface - Joining the Android revolution&lt;/h2&gt;&lt;br/&gt;Last year, I joined the Android open source revolution as a user. I took a difficult and controversial decision. I bought the G1 phone. Many people call it the T-mobile G1 phone, but I like to call it the HTC G1 phone, to give credit to the  actual phone manufacturer. Agreed, it couldn't have happened without Google sponsoring the Android platform and  creating the Open Handset Alliance. T-mobile got exclusive rights to the marketing of the very First device to run the Open source android platform and got a sweet deal for itself. It even convinced many people to buy the data plan.&lt;br/&gt;&lt;br/&gt;I am sure a lot of people thought that they had to get the data plan to make the phone even work. Well, that was true, but only for the very first power up of the phone. Once it had registered the google account for the phone, it didn't really care if it had the data plan or not.&lt;br/&gt;&lt;br/&gt;I bought the G1 through Ebay (unlocked). After utilizing &lt;a href="http://pages.ebay.com/help/buy/questions/cashback.html" target="_blank"&gt;Microsoft Cashback&lt;/a&gt; Livesearch feature with Ebay, I got a sweet deal for $375, including some accessories. Back in Nov 2008, I got a 25% cashback! A week later, Microsoft announced that they would give instant rebates, instead of delaying the cashback for 2 months via Paypal, as originally announced.&lt;br/&gt;&lt;blockquote&gt;Later, I learnt that Tmobile also sells the unlocked handset to customers for $399 without contract, although its not openly said so. So if you are thinking of getting it from ebay/amazon, try hammering a Tmobile representative at a store. It might be worth getting it from Tmobile and make them liable (just in case the handset develops some issues).&lt;/blockquote&gt;&lt;br/&gt;After playing with the G1 Phone for a while, I thought it was a worthwhile investment for me, as I was able to get on the internet anywhere with the data plan. K-9 Email (just released a more stable version yesterday) and AIM IM (continuously improving) work well on this RC30 revision of the platform now, and honestly, that was all I needed to work efficiently; effectively, I had bought my independence.&lt;br/&gt;&lt;h2&gt;The Android Market/Application Store&lt;/h2&gt;&lt;br/&gt;One of the most fascinating selling points of the android platform is the Market, which is in Beta stage till 15th Jan 2009, which effectively means that all applications are free on it. (The Pacman game is the lone exception, I guess). There are some very creative people out there who are developing applications left and right. I remember that when I got hooked to the market, I would check out the market almost every night and try out new programs.&lt;br/&gt;&lt;blockquote&gt;This was also the time when I logged a lot of bugs/enhancements through &lt;a href="http://code.google.com/p/android/issues/entry" target="_blank"&gt;http://code.google.com/p/android/issues/entry&lt;/a&gt; website. It was quite concerning to see that this website was not very much publicized, though. I guess Google wanted to keep it quiet till the Beta stage was over.&lt;/blockquote&gt;&lt;br/&gt;&lt;h2&gt;Streamfurious - Great potential&lt;/h2&gt;&lt;br/&gt;When I first played the StreamFurious application, I was fascinated at the various radio stations that I could play. It also set me thinking as to what was shoutcast/icecast in the first place.&lt;br/&gt;&lt;blockquote&gt;On doing a bit of Googling, I came across some posts and youtube videos of how to build a shoutcast server, which seemed lucid enough.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.frihost.com/forums/vt-15354.html" target="_blank"&gt;&lt;span class="yshortcuts"&gt;http://www.frihost.com/forums/vt-15354.html&lt;/span&gt;&lt;/a&gt;&lt;span class="yshortcuts"&gt; - This is the one I used for my shoutcast server&lt;/span&gt;&lt;br/&gt;&lt;a href="http://wizardskeep.org/mainhall/tutor/shbroad.html" target="_blank"&gt;&lt;span class="yshortcuts"&gt;http://wizardskeep.org/mainhall/tutor/shbroad.html&lt;/span&gt;&lt;/a&gt; -- this one has screenshots&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.youtube.com/watch?v=c1leou1vqE4" target="_blank"&gt;http://www.youtube.com/watch?v=c1leou1vqE4&lt;/a&gt; - This is a good video for Linux installation (recommended for stability)&lt;/blockquote&gt;&lt;br/&gt;&lt;span style="font-size:x-small;"&gt; &lt;/span&gt;&lt;span class="yshortcuts"&gt;This morning, I had some free time on my hands and decided to look into creating my radio station. I only used the first link, &lt;/span&gt;&lt;a href="http://www.frihost.com/forums/vt-15354.html" target="_blank"&gt;&lt;span class="yshortcuts"&gt;http://www.frihost.com/forums/vt-15354.html&lt;/span&gt;&lt;/a&gt;&lt;span class="yshortcuts"&gt;, and I was up and running with my station within 1+ hour (includes discovery and trial/error time). Now thats really OPEN technology.&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class="yshortcuts"&gt;Apparently, there are a &lt;a href="http://search.brothersoft.com/shoutcast-streaming-for-free" target="_blank"&gt;lot of FREE shoutcast servers&lt;/a&gt; on the internet, and the most popular of them seem to be WINAMP's shoutcast plugin (from winamp.com) and the shoutcast server from shoutcast.com. &lt;/span&gt;&lt;br/&gt;&lt;h2&gt;&lt;span class="yshortcuts"&gt;How does it work..&lt;/span&gt;&lt;/h2&gt;&lt;br/&gt;&lt;span class="yshortcuts"&gt;Come to think of it, the technology itself is quite simple, after all the abstractions and implementations. &lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class="yshortcuts"&gt;The actual audio track is played in Winamp. Winamp, in turn, has a plugin, which talks to another Shoutcast streaming service (installed through the Shoutcast server). The Shoutcast service talks to the shoutcast.com servers for registration/status etc. and makes the audio available to internet users. &lt;/span&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;span class="yshortcuts"&gt;The entire flow could be depicted as:&lt;br/&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;Winamp (play audio here) --&amp;gt; Winamp shoutcast Plugin --&amp;gt; Your Shoutcast Server &amp;lt;--&amp;gt; Shoutcast.com&lt;br/&gt;&lt;br/&gt;/\&lt;br/&gt;&lt;br/&gt;|&lt;br/&gt;&lt;br/&gt;Internet users (Shoutcast clients)&lt;/blockquote&gt;&lt;br/&gt;&lt;span class="yshortcuts"&gt;In addition, I had to enable port forwarding in my home router for port 8001 for 192.168.0.2 IP, so that external users could talk to my shoutcast streaming server.&lt;/span&gt;&lt;br/&gt;&lt;h2&gt;&lt;span class="yshortcuts"&gt;Some Setup considerations..&lt;br/&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br/&gt;&lt;span class="yshortcuts"&gt;One thing to note here is that I had to wait for an hour or so before my station actually got registered with shoutcast.com and was showing up in the search. &lt;/span&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;span class="yshortcuts"&gt;It seems that when the shoutcast server log shows this message, the registration can be assumed to done:&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;I think this is the right log message to look for the station registration..&lt;br/&gt;&lt;br/&gt;&amp;lt;&lt;span class="yshortcuts" style="border-bottom:1px dashed #0066cc;cursor:pointer;"&gt;01/07/09@12:09:28&lt;/span&gt;&amp;gt; [yp_tch] &lt;a href="http://yp.shoutcast.com/" target="_blank"&gt;&lt;span class="yshortcuts"&gt;yp.shoutcast.com&lt;/span&gt;&lt;/a&gt; touched!&lt;br/&gt;&amp;lt;&lt;span class="yshortcuts" style="border-bottom:1px dashed #0066cc;cursor:pointer;"&gt;01/07/09@12:19:37&lt;/span&gt;&amp;gt; [yp_tch] yp.shoutcast.com touched!&lt;/blockquote&gt;&lt;br/&gt;Another thing to mention here is that the upload speed of the internet connection on your shoutcast server matters and would be key to decide what encoder setting you would use. If you expect N concurrent users and you arebroadcasting at 24kbps encoder setting, then your overall upload requirement is (N x 24) kbps at any time.&lt;br/&gt;&lt;br/&gt;&lt;img class="aligncenter size-full wp-image-134" title="shoutcast-log" src="http://opensourceexperiments.files.wordpress.com/2009/01/shoutcast-log.gif" alt="shoutcast-log" width="468" height="371" /&gt;&lt;br/&gt;&lt;br/&gt;You got to make sure you can sustain that upload bandwidth. Even with 24 or 48 kbps, you get pretty good results. The default number of maximum users is 32, which is not bad for experimentation over cable modem internet speeds.&lt;br/&gt;&lt;br/&gt;&lt;img class="aligncenter size-full wp-image-131" title="shoutcast-encoder-freq" src="http://opensourceexperiments.files.wordpress.com/2009/01/shoutcast-encoder-freq.gif" alt="shoutcast-encoder-freq" width="290" height="490" /&gt;&lt;br/&gt;&lt;br/&gt;Also, remember that the lower your encoder settings, the more people can connect to your radio station. Know that BBC UK streams audio at 24kbps, so its not bad to use smaller settings. (but then they must be having a cluster of shoutcast servers and multiple relay server too, I'm guessing).&lt;br/&gt;&lt;br/&gt;I started off with 24kbps first, but later switched to 64kbps to experiment with downloading speeds for StreamFurious. Also, I was using Comcast High speed Internet with download speed of 3.5mbps and upload speed of 1.5mpbs (speedtest.net would tell you).&lt;br/&gt;&lt;h2&gt;Mantra Pushpam @ Atlanta - My Radio Station&lt;/h2&gt;&lt;br/&gt;&lt;img class="aligncenter size-full wp-image-135" title="mantra-pushpam" src="http://opensourceexperiments.files.wordpress.com/2009/01/mantra-pushpam.gif" alt="mantra-pushpam" width="468" height="342" /&gt;&lt;br/&gt;&lt;br/&gt;I always wanted to listen to Vedic Mantras/Chants whenever I wanted to. Thanks to Open source technology (shoutcast), Google,  HTC, Tmobile and ebay, now I am able to play Vedic chants/Mantras on the &lt;span class="yshortcuts" style="background:transparent none repeat scroll 0 50%;cursor:pointer;"&gt;G1 phone&lt;/span&gt; through StreamFurious client.&lt;br/&gt;&lt;br/&gt;&lt;img class="aligncenter size-full wp-image-133" title="shoutcast-server-running" src="http://opensourceexperiments.files.wordpress.com/2009/01/shoutcast-server-running.gif" alt="shoutcast-server-running" width="468" height="255" /&gt;&lt;br/&gt;&lt;br/&gt;All I had to do was click on &lt;span class="yshortcuts"&gt;&lt;a href="http://71.204.14.23:8000/" target="_blank"&gt;http://71.204.14.23:8000&lt;/a&gt;,&lt;/span&gt;&lt;a rel="nofollow" href="http://71.204.14.23:8000/listen.pls" target="_blank"&gt;&lt;span class="yshortcuts"&gt; &lt;/span&gt;&lt;/a&gt; click on &lt;strong&gt;Listen &lt;/strong&gt;tab and the browser redirected the request to Streamfurious, which then added the station through the listen.pls file and buffered media upto 2mb before playing the streaming audio. Now, I was on an EDGE connection, so it took a while for the buffering to happen. On 3g Networks, it should be even faster.&lt;br/&gt;&lt;blockquote&gt;Note that Streamfurious does not have the capability to add a radio station manually as of now, but if you go to the source URL of a streamcast server and click on Listen, the default browser is smart enough to redirect the request to Streamfurious. That's how I'm getting around it for now.&lt;/blockquote&gt;&lt;br/&gt;&lt;h2&gt;For the iPhone users..&lt;/h2&gt;&lt;br/&gt;For the iPhone users, there are FlyCast (FREE! Very cool article here: &lt;a href="http://cybernetnews.com/2008/09/16/free-iphone-app-streams-music-in-the-background/" target="_blank"&gt;http://cybernetnews.com/2008/09/16/free-iphone-app-streams-music-in-the-background/&lt;/a&gt;) , iRadio and Shoutcast radio applications that came out in the market. I am still having my iPhone friends try this out.&lt;br/&gt;&lt;blockquote&gt;Here is a very good article on how to listen to Shoutcast radio stations using iTunes.. &lt;a href="http://cybernetnews.com/2008/10/23/cybernotes-add-shoutcast-radio-streams-to-itunes/" target="_blank"&gt;http://cybernetnews.com/2008/10/23/cybernotes-add-shoutcast-radio-streams-to-itunes/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Another good article with Video review is at &lt;a href="http://www.appvee.com/t/shoutcast-radio" target="_blank"&gt;http://www.appvee.com/t/shoutcast-radio&lt;/a&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;h2&gt;For them BlackBerry users..&lt;/h2&gt;&lt;br/&gt;For the Blackberry power users, FlyCast works well for them. Information on how to download and install FlyCast is available at &lt;a href="http://www.blackberryforums.com/aftermarket-software/158658-flycast-download-links.html" target="_blank"&gt;http://www.blackberryforums.com/aftermarket-software/158658-flycast-download-links.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;When the installation dialog comes up, click "Set Application Permissions" and then click "Download". On the configuration screen, change the "Connections" and "Interactions" settings from "Custom" to "Allow". Press "Back" and then "Save". The application will download and install. If you have a Bold - Run "FlyCast" from the Downloads folder&lt;br/&gt;&lt;br/&gt;If you have a Curve - Run "FlyCast" from the general "Ribbon"&lt;br/&gt;&lt;br/&gt;You have have to register here - &lt;a href="http://flycast.fm/External/Registration/Default.aspx" target="_blank"&gt;FlyCast - Now your smartphone is complete&lt;/a&gt;, then  log in from your BB.&lt;br/&gt;&lt;br/&gt;FlyCast has set up a support site for &lt;span class="yshortcuts"&gt;iPhone&lt;/span&gt; and BlackBerry users. Please visit &lt;a rel="nofollow" href="http://forums.flycast.fm/" target="_blank"&gt;FlyCast Forums Index page&lt;/a&gt; for tips on getting the most from FlyCast on your BlackBerry.&lt;br/&gt;&lt;blockquote&gt;Additionally, You can also run audio streaming through the &lt;strong&gt;Slacker &lt;/strong&gt;application, as seen here : &lt;a href="http://blog.laptopmag.com/video-hands-on-with-slacker-application-for-blackberry" target="_blank"&gt;http://blog.laptopmag.com/video-hands-on-with-slacker-application-for-blackberry&lt;/a&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;h2&gt;StreamFurious Vs AntPlayer&lt;/h2&gt;&lt;br/&gt;When I tried running the station again later today with StreamFurious (version 0.0.6), it started deleting the buffer first (which it was not recycling -- seemed like a bug for sure. I wrote to feedback@streamfurious.com about this and did not get any response from them). The deletion of the buffer resulted in timeouts and not a very good user experience. This forced me to look for more alternatives in the android market for playing shoutcast streams.&lt;br/&gt;&lt;br/&gt;Through &lt;a href="http://www.howardforums.com/showthread.php?t=1468651" target="_blank"&gt;http://www.howardforums.com/showthread.php?t=1468651&lt;/a&gt;, I found AntPlayer, which seems to be more mature in terms of finding stations (the search feature actually works) and also a good buffer recycling mechanism.&lt;br/&gt;&lt;br/&gt;On day 1, I had better success with AntPlayer for some reason. However, on the subsequent days, at random times, StreamFurious seemed to work better than AntPlayer. Actually, AntPlayer seemed to hang while buffering totally, while StreamFurious did not seem to repeat the buffer deletion syndrome anymore. (It COULD have to do with the fact that I had restarted the shoutcast server a couple times on the first day itself).&lt;br/&gt;&lt;br/&gt;A caveat with StreamFurious seems to be that it uses up the battery very quickly. Also, it seems StreamFurious is getting more publicity in the market due to the keyword Stream in its application name.&lt;br/&gt;&lt;h2&gt;&lt;a href="http://mantra.podzone.org:8000/listen.pls" target="_blank"&gt;http://mantra.podzone.org:8000/listen.pls&lt;/a&gt; - Making the radio station URL  user friendly and Pnemonic to memory&lt;/h2&gt;&lt;br/&gt;Since I am running this station from my home on a regular Dell latitude D630 laptop on Windows XP and Comcast Cable internet (behind a Netgear router), the actual external IP would change from time to time. I wondered: How could I make the radio station's URL independent of the IP?&lt;br/&gt;&lt;br/&gt;Then I remembered that a long while back, I had used free DNS services provided by dyndns.com. DynDNS has many paid services, but you can associate an IP to some predetermined domains (you get to choose the sub-domain though) for FREE.&lt;br/&gt;&lt;br/&gt;So I created a free account on dyndns.com and associated my shoutcast server's external IP 71.204.14.23 (got through &lt;a href="http://www.Whatismyip.com" target="_blank"&gt;http://www.Whatismyip.com&lt;/a&gt;) with mantra.podzone.org.&lt;br/&gt;&lt;br/&gt;&lt;img class="aligncenter size-full wp-image-157" title="update-for-mantra-podzone-org1" src="http://opensourceexperiments.files.wordpress.com/2009/01/update-for-mantra-podzone-org1.jpg" alt="update-for-mantra-podzone-org1" width="468" height="350" /&gt;&lt;br/&gt;&lt;br/&gt;Whenever I would have to reset the internet connection or restart Windows, the external IP would change. To re-associate the latest external IP, I would simply go to &lt;a href="https://www.dyndns.com/account/services/hosts/" target="_blank"&gt;https://www.dyndns.com/account/services/hosts/&lt;/a&gt; and assign the latest IP (it detects the external IP auto-matically) to mantra.podzone.org. This way, the users do not have to remember anything, but  &lt;a href="http://mantra.podzone.org:8000/index.html" target="_blank"&gt;http://mantra.podzone.org:8000/index.html&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;If you click on the &lt;strong&gt;Listen &lt;/strong&gt;subtab, the browser should be able to open the listen.pls (playlist) file with a suitable application on the mobile OS.&lt;br/&gt;&lt;br/&gt;You've got to utilize the power of free stuff on the internet.&lt;br/&gt;&lt;h2&gt;Network utilization Stats..&lt;/h2&gt;&lt;br/&gt;Now, I was also interested in the network utilization stats on my wireless network due to shoutcast broadcast per user. When I played the station through streamfurious on my G1 phone, i monitored the local wireless network interface's bandwidth usage (11mpbs maximum bandwidth) and got this graph:&lt;br/&gt;&lt;br/&gt;&lt;img class="aligncenter size-full wp-image-159" title="wireless-bandwidth-usage-from-task-manager" src="http://opensourceexperiments.files.wordpress.com/2009/01/wireless-bandwidth-usage-from-task-manager.jpg" alt="wireless-bandwidth-usage-from-task-manager" width="468" height="218" /&gt;&lt;br/&gt;&lt;br/&gt;As you can see, it was using less than 1% of 11mbps bandwidth per mobile user.&lt;br/&gt;&lt;h2&gt;Feedback welcome&lt;/h2&gt;&lt;br/&gt;If you found this article helpful and would like to discuss/express your views, please do leave a comment and we can discuss over web/email.&lt;br/&gt;&lt;br/&gt;Thanks a lot for your time to read this article!&lt;br/&gt;&lt;br/&gt;&lt;span class="yshortcuts"&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-8719395790862338099?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/8719395790862338099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2009/01/preface-joining-android-revolution-last.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/8719395790862338099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/8719395790862338099'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2009/01/preface-joining-android-revolution-last.html' title=''/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-4363032705829570951</id><published>2008-08-11T16:11:00.000-04:00</published><updated>2010-12-30T22:41:34.792-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SUSE linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='shared folder'/><category scheme='http://www.blogger.com/atom/ns#' term='mount vboxsf shared folder virtualbox opensuse modprobe'/><category scheme='http://www.blogger.com/atom/ns#' term='windows host'/><title type='text'>Virtualbox shared folder mounting issue: Missing module on opensuse 10.3</title><content type='html'>&lt;h2&gt;The Version combination for this scenario..&lt;/h2&gt;&lt;br/&gt;This problem was encountered with the following combination:&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt;Virtualbox 1.6.4&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Host OS: windows XP service pack 2&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Guest OS: OpenSuSE 10.3&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;A shared virtual folder was defined for the opensuse virtual machine like this:&lt;br/&gt;&lt;pre&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/08/ddrive-shared-folder.png"&gt;&lt;img class="aligncenter size-full wp-image-122" src="http://opensourceexperiments.files.wordpress.com/2008/08/ddrive-shared-folder.png" alt="" width="455" height="330" /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;br/&gt;In the guest OS, a mount point was defined like this:&lt;br/&gt;&lt;pre&gt;linux-jo4o:~ # mkdir -p /ddrive&lt;/pre&gt;&lt;br/&gt;Now when the mount of the shared folder was attempted, this error was received:&lt;br/&gt;&lt;pre&gt;inux-jo4o:~ # mount -t vboxsf d_drive /ddrive&lt;br/&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;/sbin/mount.vboxsf: mounting failed with the error: No such device&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;An unlikely solution...&lt;/h2&gt;&lt;br/&gt;It seems that a critical module required for shared mount points was not loaded in memory. Here, we can see that only one module with the vbox pattern in it's name is loaded:&lt;br/&gt;&lt;pre&gt;linux-jo4o:~ # lsmod | grep vbox&lt;br/&gt;vboxadd                56232  3&lt;/pre&gt;&lt;br/&gt;So lets load the vboxsvfs module into memory:&lt;br/&gt;&lt;pre&gt;linux-jo4o:~ # modprobe vboxvfs&lt;/pre&gt;&lt;br/&gt;After that, we can verify that it is really loaded:&lt;br/&gt;&lt;pre&gt;linux-jo4o:~ # lsmod | grep vbox&lt;br/&gt;vboxvfs                38184  0&lt;br/&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;vboxadd                56232  4 vboxvfs&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br/&gt;Now, let us mount the shared folder:&lt;br/&gt;&lt;pre&gt;linux-jo4o:~ #  mount -t vboxsf d_drive /ddrive&lt;/pre&gt;&lt;br/&gt;Awesome! That was smooth. Lets check if the shared folder really got mounted or not:&lt;br/&gt;&lt;pre&gt;linux-jo4o:~ # mount&lt;br/&gt;/dev/sda2 on / type ext3 (rw,acl,user_xattr)&lt;br/&gt;proc on /proc type proc (rw)&lt;br/&gt;sysfs on /sys type sysfs (rw)&lt;br/&gt;debugfs on /sys/kernel/debug type debugfs (rw)&lt;br/&gt;udev on /dev type tmpfs (rw)&lt;br/&gt;devpts on /dev/pts type devpts (rw,mode=0620,gid=5)&lt;br/&gt;/dev/sda3 on /home type ext3 (rw,acl,user_xattr)&lt;br/&gt;/dev/sr0 on /media/VBOXADDITIONS_1.6.4_33808 type iso9660 (ro,nosuid,nodev,uid=0)&lt;br/&gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;d_drive on /ddrive type vboxsf (rw)&lt;/span&gt;&lt;br/&gt;&lt;/strong&gt;linux-jo4o:~ #&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;Yippee!&lt;/h2&gt;&lt;br/&gt;I can share files with my windows laptop now. Now that was some adventure, eh :)&lt;br/&gt;&lt;br/&gt;To make this more permanent, there has to be a way of loading this module automatically. Maybe I can put the modprobe command in &lt;strong&gt;/etc/rc.d/boot.local&lt;/strong&gt; file, but then maybe there is a better way. I leave that to you to figure out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-4363032705829570951?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/4363032705829570951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/08/virtualbox-shared-folder-mounting-issue.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/4363032705829570951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/4363032705829570951'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/08/virtualbox-shared-folder-mounting-issue.html' title='Virtualbox shared folder mounting issue: Missing module on opensuse 10.3'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-8420966971933479975</id><published>2008-08-11T15:19:00.000-04:00</published><updated>2010-12-30T22:41:34.764-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SUSE linux'/><category scheme='http://www.blogger.com/atom/ns#' term='opensuse 10.3 virtualbox guest addition installation in'/><category scheme='http://www.blogger.com/atom/ns#' term='online repository yast'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='opensuse'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualization'/><title type='text'>Package dependency for installing virtualbox guest additions on Open
SuSE 10.3</title><content type='html'>&lt;h2&gt;The problem at hand..&lt;/h2&gt;&lt;br/&gt;Well, I had to get the shared folder feature working on Open SuSE 10.3 virtual machine for a variety of reasons, and in turn, I had to install guest additions on virtualbox 1.6.4. There were a bunch of package dependencies even before coming to this error, and unfortunately, I dont have the entire series of command that I issued, but in this posting, I will attempt to present the solution of the immediate error that I was facing.&lt;br/&gt;&lt;br/&gt;The KERN_INCL variable had to be set to the /usr/include directory:&lt;br/&gt;&lt;pre&gt;linux-jo4o:/usr/src/linux # env | grep KER&lt;br/&gt;KERN_INCL=/usr/include&lt;/pre&gt;&lt;br/&gt;After mounting the guest additions CD and running the &lt;strong&gt;VboxAdditions.run&lt;/strong&gt; command as root, the kernel was not able to be compiled and this was visible in the install log:&lt;br/&gt;&lt;pre&gt;linux-jo4o:~/addons # more /var/log/vboxadd-install.log&lt;br/&gt;&lt;br/&gt;Installing VirtualBox 1.6.4 Guest &lt;span class="yshortcuts"&gt;Additions&lt;/span&gt;, built Tue Jul 29 20:13:59 CEST 2008&lt;br/&gt;&lt;br/&gt;Testing the setup of the guest system&lt;br/&gt;&lt;br/&gt;Building a test kernel module...&lt;br/&gt;&lt;br/&gt;make KBUILD_VERBOSE=1 -C /lib/modules/&lt;span class="yshortcuts" style="border-bottom:1px dashed #0066cc;cursor:pointer;"&gt;2.6.22&lt;/span&gt;.5-31-default/build SUBDIRS=/tmp/sel&lt;br/&gt;fgz1883915647/module/test SRCROOT=/tmp/selfgz1883915647/module/test modules&lt;br/&gt;make[1]: *** No rule to make target `modules'.  Stop.&lt;br/&gt;make: *** [vboxadd_test] Error 2&lt;br/&gt;&lt;br/&gt;Building the test kernel module failed.&lt;br/&gt;Giving up due to the problems mentioned above.&lt;br/&gt;linux-jo4o:~/addons #&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;Initial thoughts and a potential solution&lt;/h2&gt;&lt;br/&gt;Initially, I thought that maybe it was a problem due to missing symbolic link to the modules directory (??), but when I posted this question on the &lt;strong&gt;vbox-users&lt;/strong&gt; mailing list (which I think is more effective than the forums  at times), I got a response saying that maybe I should check if the &lt;strong&gt;kernel-source &lt;/strong&gt;package was installed or not.&lt;br/&gt;&lt;br/&gt;To even find the package, we needed the main SOURCE repository added in the YAST setup. This is what the installed online repositories looked like:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/08/online-repositories.png"&gt;&lt;img class="aligncenter size-full wp-image-119" src="http://opensourceexperiments.files.wordpress.com/2008/08/online-repositories.png" alt="" width="468" height="436" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;When I ran the following command as root, it was clear that this &lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;was&lt;/span&gt;&lt;/strong&gt; the missing link:&lt;br/&gt;&lt;pre&gt;linux-jo4o:~ # zypper install kernel-source&lt;br/&gt;* Reading repository 'Main Repository (NON-OSS)' cache&lt;br/&gt;* Reading repository 'openSUSE-10.3-OSS-KDE 10.3' cache&lt;br/&gt;* Reading repository 'Main Repository (Sources)' cache&lt;br/&gt;* Reading repository 'Main Repository (OSS)' cache&lt;br/&gt;* Reading installed packages [100%]&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;The following NEW package is going to be installed:&lt;/strong&gt;&lt;br/&gt;&lt;strong&gt;  kernel-source &lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Overall download size: 49.2 M. After the operation, additional 243.4 M will be used.&lt;br/&gt;Continue? [yes/no]: yes&lt;br/&gt;Downloading package kernel-source-2.6.22.5-31.i586, 49.2 M (243.4 M unpacked)&lt;br/&gt;Downloading: media&lt;br/&gt;* Downloading [100%]&lt;br/&gt;Downloading: kernel-source-2.6.22.5-31.i586.rpm&lt;br/&gt;* Downloading [100%]&lt;br/&gt;* Installing: kernel-source-2.6.22.5-31 [100%]&lt;br/&gt;linux-jo4o:~ #&lt;/pre&gt;&lt;br/&gt;Now, when I tried installing the guest additions, it was able to install them and recompile the kernel JUST fine. Sweet!&lt;br/&gt;&lt;pre&gt;linux-jo4o:~ # /media/VBOXADDITIONS_1.6.4_33808/VboxAdditions.run&lt;br/&gt;Verifying archive integrity... All good.&lt;br/&gt;Uncompressing&lt;br/&gt;VirtualBox 1.6.4 Guest Additions for Linux&lt;br/&gt;installation.............................................................................................................................................................................&lt;br/&gt;VirtualBox 1.6.4 Guest Additions installation&lt;br/&gt;Building the VirtualBox Guest Additions kernel module...&lt;br/&gt;Building the shared folder support kernel module...&lt;br/&gt;Installing the VirtualBox Guest Additions...&lt;br/&gt;&lt;br/&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;Successfully installed the VirtualBox Guest Additions.&lt;/strong&gt;&lt;/span&gt;&lt;br/&gt;You must restart your guest system in order to complete the installation.&lt;br/&gt;linux-jo4o:~ #&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-8420966971933479975?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/8420966971933479975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/08/package-dependency-for-installing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/8420966971933479975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/8420966971933479975'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/08/package-dependency-for-installing.html' title='Package dependency for installing virtualbox guest additions on Open&#xA;SuSE 10.3'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-3362021190078782686</id><published>2008-08-01T10:43:00.000-04:00</published><updated>2010-12-30T22:41:34.736-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wordpress'/><category scheme='http://www.blogger.com/atom/ns#' term='word formatting'/><category scheme='http://www.blogger.com/atom/ns#' term='kitchen sink'/><category scheme='http://www.blogger.com/atom/ns#' term='rich text editing'/><category scheme='http://www.blogger.com/atom/ns#' term='Editing tools'/><category scheme='http://www.blogger.com/atom/ns#' term='editing'/><category scheme='http://www.blogger.com/atom/ns#' term='rich text editor buttons'/><title type='text'>How to get the enhanced Rich text editing buttons in wordpress.com
editor?</title><content type='html'>&lt;h2&gt;The why -- Bloggers need Rich text editing..&lt;/h2&gt;&lt;br/&gt;If you are a newbie wordpress.com blogger, chances are that at some point you would have pulled your hair out trying to figure out how the heck to display the rich text editing buttons that would give you the MS word like editing features. I definitely remember doing that, it was an uphill experience. Believe me, I had "seriously" tried to look for it in Google and wordpress forums -- only to be told that you are probably mistaking wordpress.com for wordpress.org (arrgh!) and that its not part of the free wordpress.com blog (that was support talking -- can you believe that?).&lt;br/&gt;&lt;br/&gt;I am posting this in the hope that a fellow newbie like me would not be in the same boat and gets productive right off the bat.&lt;br/&gt;&lt;h2&gt;This is what you might originally see when you write a new post..&lt;/h2&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/08/initial-editor-button-palette.png"&gt;&lt;img class="aligncenter size-full wp-image-101" src="http://opensourceexperiments.files.wordpress.com/2008/08/initial-editor-button-palette.png" alt="" width="468" height="41" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Life was difficult with this kind of editor. To put heading tags, I had to use the HTML editor and put these tags in manually, which was a royal pain:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/08/life-with-the-html-editor.png"&gt;&lt;img class="aligncenter size-full wp-image-102" src="http://opensourceexperiments.files.wordpress.com/2008/08/life-with-the-html-editor.png" alt="" width="468" height="107" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;h2&gt;Then one fine day...&lt;/h2&gt;&lt;br/&gt;It was Serendipity. Nothing less. While editing a post, I hit a key by mistake, and Viola!, there it was, the rich text palette, right in front of it. I had really no idea what had caused the second half of rich text editing buttons to come up, but I could see that it was not disappearing even after many shutdown and startups of my laptop.&lt;br/&gt;&lt;br/&gt;Strangely, it would not come up on my other computers even though I was logged into the same wordpress account.&lt;br/&gt;&lt;h2&gt;Its the kitchen sink, silly..&lt;/h2&gt;&lt;br/&gt;Serendipity - Part 2. God has his ways of revealing his glories. This fine day, I accidently clicked on the color palette icon on the extreme right end in the hope of getting some colors, but instead, I got the rich text editing buttons in the editor! The so called color palette was called the Kitchen sink. Duh! How ignorant of me.  Thank you Almighty, for delivering me from ignorance.&lt;br/&gt;&lt;br/&gt;So this is how it looked now:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/08/kitchen-sink.png"&gt;&lt;img class="aligncenter size-full wp-image-103" src="http://opensourceexperiments.files.wordpress.com/2008/08/kitchen-sink.png" alt="" width="468" height="57" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;h2&gt;Life was beautiful now...&lt;/h2&gt;&lt;br/&gt;I could do different kind of formatting, underlining, paste from word, erase, indenting, undo, redo, heading, color change etc.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/08/different-formatting-possible.png"&gt;&lt;img class="aligncenter size-full wp-image-105" src="http://opensourceexperiments.files.wordpress.com/2008/08/different-formatting-possible.png" alt="" width="468" height="216" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Hope you find this useful too. Do leave me a message if you do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-3362021190078782686?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/3362021190078782686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/08/how-to-get-enhanced-rich-text-editing.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/3362021190078782686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/3362021190078782686'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/08/how-to-get-enhanced-rich-text-editing.html' title='How to get the enhanced Rich text editing buttons in wordpress.com&#xA;editor?'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-4556496517519951667</id><published>2008-07-24T17:48:00.000-04:00</published><updated>2010-12-30T22:41:34.669-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='civicrm'/><category scheme='http://www.blogger.com/atom/ns#' term='non profit'/><category scheme='http://www.blogger.com/atom/ns#' term='sugarcrm'/><category scheme='http://www.blogger.com/atom/ns#' term='open source CRM'/><category scheme='http://www.blogger.com/atom/ns#' term='organization'/><category scheme='http://www.blogger.com/atom/ns#' term='CRM'/><title type='text'>An assessment of CiviCRM for non-profits</title><content type='html'>&lt;h2&gt;Introduction&lt;/h2&gt;&lt;br/&gt;Lately, we have been evaluating open source CRM softwares that are available in the market. Remarkably speaking, the CRM software market seems to really on the move with SugarCRM and CiviCRM being some of the most popular and widely used open source softwares.&lt;br/&gt;&lt;h2&gt;Our Requirements in a nutshell&lt;/h2&gt;&lt;br/&gt;We are a small non profit service organization and have the need of maintaining contacts ( volunteers, donors, media contacts, partner organizations, NGOs etc), accounting/donor/fund raising information and potentially a document knowledge base and project management/event planning  functionality. In addition, we needed mass personalized mailing functionality as well and an ability to define internal hierarchy or relationship between volunteers or organizations.&lt;br/&gt;&lt;br/&gt;Till now, we were maintaining all our information in Yahoo! groups Files section or not even that in some cases. Contacts were kept in different forms, most of the times misplaced and rarely followed up on properly. Out of sight is out of mind and thats what happened.&lt;br/&gt;&lt;h2&gt;CiviCRM&lt;/h2&gt;&lt;br/&gt;Well, I was looking at online articles and blogs about similar non-profit organizations who may implemented open source CRM softwares, and that's when I came to know about &lt;a href="http://civicrm.org" target="_blank"&gt;Civicrm&lt;/a&gt;. I spent about a day installing it on Drupal 5.x (civicrm 2.0 does not work with Drupal 6.x yet) and exploring it.&lt;br/&gt;&lt;br/&gt;The scope of this article is limited to CiviCRM and observations around it. But as all things, there is good news and there is bad news. Let me start with the good news.&lt;br/&gt;&lt;h3&gt;Good features:&lt;/h3&gt;&lt;br/&gt;1) The GUI is quite simple and intuitive for administrators. Most of the features and projected functionality can be figured out easily.&lt;br/&gt;&lt;br/&gt;2) Contact management and defining different kinds of relationships is simple. You can define relationships between individuals, groups and organizations, which is quite extensible. For a contact, you can define associated grants, notes, meetings, groups, memberships, relationships, mails etc, kind of like a central view.&lt;br/&gt;&lt;br/&gt;3) Contribute and Grants module are good for Integration with online payment system like Googlc checking or Paypal and for tracking and pre-scheduling donations&lt;br/&gt;&lt;br/&gt;4) CiviMail can do personalized mailings. Attachments dont seem to be possible (at least I could not see it work). Messages can be tracked etc, but the reporting interface does not compare with SugarCRM (more evolved). For actually triggering the mail delivery a cron job has to be run and for bounce processing, some extra unix utilies (e.g. AMaViS,postfix) have to be configured&lt;br/&gt;&lt;br/&gt;5) Customization to current forms or tables is easy. When we upgrade to a newer version of CiviCRM, the Custom Data Fields and Custom Data Groups will be maintained.  Specialized customizations using the PHP programming language will need to be re-created when you upgrade, however.&lt;br/&gt;&lt;br/&gt;6) The data model is simpler and easy to understand. The entity relationship diagram is available at&lt;br/&gt;&lt;a href="http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+ERD+2.0" target="_blank"&gt; http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+ERD+2.0&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;7) It has a planner features too -- activities, meetings etc (types can be defined).&lt;br/&gt;&lt;br/&gt;8) Good user integration/sync with Drupal and Joomla&lt;br/&gt;&lt;br/&gt;9) Although there is no menu link for CiviReports, the reports are available through &lt;a href="http://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport" target="_blank"&gt;http://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport&lt;/a&gt;. There are a lot of sql queries also that are available online on &lt;a href="wiki.civicrm.org" target="_blank"&gt;wiki.civicrm.org&lt;/a&gt;&lt;br/&gt;&lt;h3&gt;Some other features -- but not essential for us:&lt;/h3&gt;&lt;br/&gt;1) CiviEvent is useful for putting signup pages for events. I thought it was kind of interesting though. Its good for promoting events and signing up people into your contact database.&lt;br/&gt;&lt;br/&gt;2) CiviMember module can be used for tracking memberships to the organization (e.g. lifemember, goldmember etc). We did not need this functionality as we do not charge anything for membership, but it could be used at some point of time.&lt;br/&gt;&lt;br/&gt;3) Can Configure Google or Yahoo Maps to work with CiviCRM. This is actually kind of cool. I always wanted to implement something like for our website wherein a project's location in the world could be shown through yahoo or google map.&lt;br/&gt;&lt;br/&gt;4) The CitizenSpeak module allows the creation of email petition campaign nodes. Users enter the email recipients and the a message to create a campaign. When someone visits the node, they see a form that displays a preview of the message and allows them to enter their contact information and a personal statement. When they submit the form, the target of the campaign is notified. The version currently in CVS is built against Drupal 4.6. (&lt;a href="http://drupal.org/project/citizenspeak" target="_blank"&gt;http://drupal.org/project/citizenspeak&lt;/a&gt;)&lt;br/&gt;&lt;h3&gt;Features lacking:&lt;/h3&gt;&lt;br/&gt;1) project Management -- This feature is present in sugarcrm Community Edition and we though we could use it for managing events (their tasks) and sharing event templates between chapters&lt;br/&gt;&lt;br/&gt;2) Document management -- This feature would have been done to implement a knowledge base system for our volunteers and organization in general.&lt;br/&gt;&lt;br/&gt;3) Can't create a new module through GUI, but APIs are published.&lt;br/&gt;&lt;br/&gt;4) Leads and Opportunity Management are not present and not differentiated&lt;br/&gt;&lt;h3&gt;Some Interesting Facts:&lt;/h3&gt;&lt;br/&gt;Amnesty International uses CiviCRM to collect website registration data and process online donations&lt;br/&gt;&lt;h2&gt;Overall thoughts&lt;/h2&gt;&lt;br/&gt;I felt that the civicrm product is in initial stages and will see a lot of change or value addition in the near future. There are a lot of things coming and they will come slowly. From the &lt;a href="http://civicrm.org/architecture" target="_blank"&gt;http://civicrm.org/architecture&lt;/a&gt;, I could see that there was already talk of more performance or caching features in 2.1 version.&lt;br/&gt;&lt;br/&gt;All in all, It still has some ways to go before it can catch up with sugarCRM. But then, civicrm is focused exclusively on non-profit organizations and is designed for them. It will have its own growth path: one that would may be less spectacular than sugarcrm for a little while, but it sure packs a lot of potential in it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-4556496517519951667?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/4556496517519951667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/07/assessment-of-civicrm-for-non-profits.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/4556496517519951667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/4556496517519951667'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/07/assessment-of-civicrm-for-non-profits.html' title='An assessment of CiviCRM for non-profits'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-7123509449661350667</id><published>2008-05-28T16:49:00.000-04:00</published><updated>2010-12-30T22:41:34.623-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='external hard disk'/><category scheme='http://www.blogger.com/atom/ns#' term='sharing files from windows to linux'/><category scheme='http://www.blogger.com/atom/ns#' term='smbfs'/><category scheme='http://www.blogger.com/atom/ns#' term='cifs'/><category scheme='http://www.blogger.com/atom/ns#' term='windows network share'/><category scheme='http://www.blogger.com/atom/ns#' term='samba'/><category scheme='http://www.blogger.com/atom/ns#' term='file sharing'/><category scheme='http://www.blogger.com/atom/ns#' term='mount'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='windows host'/><category scheme='http://www.blogger.com/atom/ns#' term='windows vista host'/><category scheme='http://www.blogger.com/atom/ns#' term='host only networking'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='smbmount'/><category scheme='http://www.blogger.com/atom/ns#' term='samba file system'/><title type='text'>Sharing windows folders on unix hosts using samba filesystem (smbfs)
using virtualbox</title><content type='html'>&lt;h3&gt;The need for windows sharing..&lt;/h3&gt;&lt;br/&gt;A few days ago, I wanted to do a Oracle 12i installation on a x86 linux distribution using virtualbox. The media was available on an external hard disk, but I thought that instead of copying the 30+ G of media on unix virtual machine, why not just make it shared between the windows host OS and unix guest OS.&lt;br/&gt;&lt;h3&gt;The quest for sharing..&lt;/h3&gt;&lt;br/&gt;And so began my quest for sharing files between windows and virtualbox unix OS (SuSE linux). I discovered that for sharing folders using virtualbox, the guest OS additions have to be installed.&lt;br/&gt;&lt;blockquote&gt;I have seen that upgrading the kernel breaks the guest OS additions at times. After upgrading the guest OS from SuSE linux 9 to SuSE linux 9.3, the guest additions stopped working. The same problem also exists with vmware tools.&lt;/blockquote&gt;&lt;br/&gt;So first, I created a shared folder in the virtual machine's definition:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/shared-folder1.png" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/shared-folder1.png"&gt;&lt;img class="alignnone size-full wp-image-94" src="http://opensourceexperiments.files.wordpress.com/2008/05/shared-folder1.png" alt="" width="468" height="490" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;After starting the Guest OS (Ubuntu),&lt;br/&gt;&lt;pre&gt;root@gverma-laptop:/home/gverma# mkdir /mnt/winshare&lt;br/&gt;&lt;br/&gt;root@gverma-laptop:/home/gverma# mount -t vboxsf public /mnt/winshare&lt;/pre&gt;&lt;br/&gt;&lt;blockquote&gt;Mind you, the filesystem type is NOT vboxfs, it is vboxsf (s and f are interchanged). If you do not take note of this, you might end up wasting your time for nothing.&lt;/blockquote&gt;&lt;br/&gt;Now, we can check that the shared folder did indeed mount:&lt;br/&gt;&lt;pre&gt;root@gverma-laptop:/home/gverma# mount | grep vbox&lt;br/&gt;public on /mnt/winshare type vboxsf (rw)&lt;br/&gt;&lt;br/&gt;root@gverma-laptop:/home/gverma# ls /mnt/winshare&lt;br/&gt;CyberLink  desktop.ini  Downloads  Music     Recorded TV         Videos&lt;br/&gt;Desktop    Documents    Favorites  Pictures  StarzEntertainment  Vongo&lt;/pre&gt;&lt;br/&gt;Let it be mentioned here that the vboxadd and vboxvfs (note that it has vfs after vbox) modules needed to be loaded for this to work:&lt;br/&gt;&lt;pre&gt;root@gverma-laptop:/home/gverma# lsmod | grep vb&lt;br/&gt;vboxvfs                 42432  1&lt;br/&gt;vboxadd                 24872  9 vboxvfs&lt;/pre&gt;&lt;br/&gt;&lt;h3&gt;The Caveat..&lt;/h3&gt;&lt;br/&gt;But, as every cloud has a silver lining, there was a caveat here for my problem.&lt;br/&gt;&lt;br/&gt;The above case was just a demonstration of how the shared folder &lt;strong&gt;could have&lt;/strong&gt; worked fine. I actually then went on to mount some linux media for Oracle Applications 12i for x86 intel platform. After the directory mounted all right, I had a really hard time adding the execute permissions to the rapidwiz files. Even after doing persistent # chmod -R +x commands, the shell scripts under the media were not showing the "x" execute flag.&lt;br/&gt;&lt;br/&gt;This was very frustrating. It was probably just another virtualbox bug.&lt;br/&gt;&lt;br/&gt;So, then I started looking around for more options. I had heard that many people had used samba with success and hence I started scouring the internet (&lt;em&gt;Google Zindabaad!&lt;/em&gt; - Long live, Google!). Came across a link that explained how to do it in a succinct manner.&lt;br/&gt;&lt;blockquote&gt;The good thing about sharing files from windows to unix using samba file system (smbfs) was that was that I did not need to run samba on unix at all.&lt;/blockquote&gt;&lt;br/&gt;&lt;h3&gt;Doing it using samba filesystem..&lt;/h3&gt;&lt;br/&gt;So here are some quick and easy steps for sharing a windows share using smbfs:&lt;br/&gt;&lt;br/&gt;First things first. You need to create a network share for the folder that you want to share. In my case, I wanted to share an external hard disk that had the media for Oracle Applications 12i. So, I did a network share of windows folder (e.g. \\GAURAV-PC\media)&lt;br/&gt;&lt;br/&gt;On the guest OS (Ubuntu), did the following:&lt;br/&gt;&lt;pre&gt;# mkdir -p /mnt/media&lt;br/&gt;&lt;br/&gt;# smbmount //GAURAV-PC/media /mnt/media -o username=gaurav,password=welcome&lt;/pre&gt;&lt;br/&gt;&lt;blockquote&gt;Please note that // (forward slashes) worked for me. Some guides on the internet say that you need to use \\ (back slashes)&lt;/blockquote&gt;&lt;br/&gt;Note here that GAURAV-PC hostname was defined in the local hosts file to a resolvable IP address in the LAN. The Ubuntu Virtual machine was connected to the windows Host through a host only networking type interface, that allowed the host and guest OS to talk to each other.&lt;br/&gt;&lt;pre&gt;# more /etc/hosts&lt;br/&gt;GAURAV-PC 192.168.0.2&lt;/pre&gt;&lt;br/&gt;&lt;blockquote&gt;Please note here that a ping to GAURAV-PC &lt;strong&gt;HAS TO&lt;/strong&gt; work when you give the smbmount command. I wasted many hours trying to run &lt;strong&gt;strace &lt;/strong&gt;on this command, just because it was hanging. The issue was that due to some strange happenstance, the ping to GAURAV-PC (windows host) was hanging.&lt;br/&gt;&lt;br/&gt;The workaround was to ping the Ubuntu virtual machine (say 192.168.0.7) first from the host OS (windows), after which the ping to GAURAV-PC 192.168.0.2 started working from Ubuntu Guest OS. Strange, strange, I agree, but I am just a guy looking for solutions! I have seen this behaviour in Windows Vista home premium edition - host OS.&lt;/blockquote&gt;&lt;br/&gt;Make sure the smbfs module is loaded in the guest OS. If not, then load it using # modprobe smbfs:&lt;br/&gt;&lt;pre&gt;root@gverma-laptop:/mnt/media/oracle_12.0.4/startCD/Disk1/rapidwiz# lsmod | grep smbfs&lt;br/&gt;smbfs                  66296  0&lt;/pre&gt;&lt;br/&gt;Note that the Samba server &lt;strong&gt;does not&lt;/strong&gt; need to run:&lt;br/&gt;&lt;pre&gt;root@gverma-laptop:/mnt/media/oracle_12.0.4/startCD/Disk1/rapidwiz# ps -ef | grep smb&lt;br/&gt;root      6116  5616  0 00:00:00 grep smb&lt;/pre&gt;&lt;br/&gt;This was my samba configuration file:&lt;br/&gt;&lt;pre&gt;root@gverma-laptop:/mnt/media/oracle_12.0.4/startCD/Disk1/rapidwiz# more /usr/share/samba/smb.conf&lt;br/&gt;[global]&lt;br/&gt;workgroup = WORKGROUP&lt;br/&gt;security = share&lt;br/&gt;usershare path =  /var/lib/samba/usershare&lt;br/&gt;usershare max shares = 100&lt;br/&gt;usershare allow guests = yes&lt;br/&gt;usershare owner only = yes&lt;br/&gt;wins support = no&lt;br/&gt;&lt;strong&gt;netbios name = GAURAV-PC&lt;/strong&gt;&lt;/pre&gt;&lt;br/&gt;&lt;blockquote&gt;I am not exactly sure if setting the netbios name parameter was a major factor in making it work or not, but I guess it certainly did not hurt.&lt;/blockquote&gt;&lt;br/&gt;Now when I run mount command, the windows network share was showing up there just fine:&lt;br/&gt;&lt;pre&gt;root@gverma-laptop:/mnt/media/oracle_12.0.4/startCD/Disk1/rapidwiz# mount&lt;br/&gt;/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)&lt;br/&gt;proc on /proc type proc (rw,noexec,nosuid,nodev)&lt;br/&gt;/sys on /sys type sysfs (rw,noexec,nosuid,nodev)&lt;br/&gt;varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)&lt;br/&gt;varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)&lt;br/&gt;udev on /dev type tmpfs (rw,mode=0755)&lt;br/&gt;devshm on /dev/shm type tmpfs (rw)&lt;br/&gt;devpts on /dev/pts type devpts (rw,gid=5,mode=620)&lt;br/&gt;lrm on /lib/modules/&lt;span class="yshortcuts" style="border-bottom:1px dashed #0066cc;cursor:pointer;"&gt;2.6.24&lt;/span&gt;-16-generic/volatile type tmpfs (rw)&lt;br/&gt;securityfs on /sys/kernel/security type securityfs (rw)&lt;br/&gt;rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)&lt;br/&gt;nfsd on /proc/fs/nfsd type nfsd (rw)&lt;br/&gt;gvfs-fuse-daemon on /home/gverma/.gvfs type  fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=gverma)&lt;br/&gt;&lt;strong&gt;//GAURAV-PC/media on /mnt/media type cifs (rw,mand)&lt;/strong&gt;&lt;/pre&gt;&lt;br/&gt;Thankfully, I was able to make the unix shell scripts executable after doing this and launch the rapid wizard for 12i installation. That's all I wanted.&lt;br/&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;&lt;br/&gt;Well, so there you have it. If you are using windows host OS and you upgraded your guest OS kernel, the guest additions may not work due to compilation errors. In such a case, you are better off using the samba file system as its much easier to deal with and not too much of a pain to setup.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-7123509449661350667?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/7123509449661350667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/05/sharing-windows-folders-on-unix-hosts.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/7123509449661350667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/7123509449661350667'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/05/sharing-windows-folders-on-unix-hosts.html' title='Sharing windows folders on unix hosts using samba filesystem (smbfs)&#xA;using virtualbox'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-1484529807463286944</id><published>2008-05-03T18:28:00.000-04:00</published><updated>2010-12-30T23:28:56.773-05:00</updated><title type='text'>A poor man's guide for creating iscsi targets without using external USB hard disks</title><content type='html'>&lt;h2&gt;A special need..&lt;/h2&gt;&lt;br /&gt;Those of you who have a need for exposing iscsi targets to other machines for discovery, but who do not want to invest in an external USB hard disk  OR who do not want to have a USB external hard disk connected to a desktop 24x7, there is a better way of creating and exposing iscsi target logical volumes.&lt;br /&gt;&lt;br /&gt;This method does not need installing openfiler either as noted in my earlier article &lt;a href="http://www.blogger.com/2008/04/21/combining-openfiler-and-virtualbox-ubuntu-guest-os-on-windows-host/"&gt;Combining Openfiler and Virtualbox (Ubuntu guest OS on windows host).&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;A simple solution..&lt;/h2&gt;&lt;br /&gt;The method is simple: create logical volumes based on SCSI devices on a Ubuntu Hardy Heron 8.04 installation using virtualbox.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;The advantage of using Ubuntu is that it creates the hard disk devices as scsi devices (with the naming convention /dev/sd*, instead of /dev/hd*). I have seen that in other unix OS like SuSE linux, the local disks are listed as /dev/hd* (IDE). Ubuntu seems to have better disk drivers.&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;If you use Hardy Heron 8.04 Ubuntu, it is *really* easy to get iscsitarget package working. If you try to make the iscsi-target package work with Gutsy Gibbon 7.x release of Ubuntu, there is a very good chance that you will run into lot of compilation issues. I went down this path myself and later realized that a lot of bugs existed for Gutsy Gibbon release. (e.g. &lt;a href="https://bugs.launchpad.net/ubuntu/gutsy/+source/iscsitarget/+bug/160104" target="_blank"&gt;https://bugs.launchpad.net/ubuntu/gutsy/+source/iscsitarget/+bug/160104&lt;/a&gt;, &lt;a href="http://ubuntuforums.org/showthread.php?t=692651" target="_blank"&gt;http://ubuntuforums.org/showthread.php?t=692651&lt;/a&gt;) and eventually found &lt;a href="https://bugs.launchpad.net/ubuntu/+source/iscsitarget/+bug/145539" target="_blank"&gt;https://bugs.launchpad.net/ubuntu/+source/iscsitarget/+bug/145539&lt;/a&gt; which said that the module was fixed in Hardy Heron 8.04.&lt;br /&gt;&lt;br /&gt;So instead of breaking my head over making iscsi-target package work in Gutsy Gibbon 2.6.22, I decided to give Hardy Heron 8.04 (still beta) a try.&lt;br /&gt;&lt;br /&gt;Thankfully, with a little effort, I was able to make it work. In this article, I present a simplistic scenario in which we create three logical volumes that can be easily discovered by another virtualbox iscsi initiator machine(s) using open-iscsi package. This is the beauty of the entire approach.&lt;br /&gt;&lt;br /&gt;Here is a block diagram of the end configuration:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/block-dagram.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/block-dagram.jpg"&gt;&lt;img alt="" class="alignnone size-full wp-image-91" height="337" src="http://opensourceexperiments.files.wordpress.com/2008/05/block-dagram.jpg" width="468" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;Iscsi support in Hardy Heron 8.04 Ubuntu..&lt;/h2&gt;&lt;br /&gt;The first thing to understand is that as per the published features of Hardy Heron 8.04 Ubuntu at  &lt;a href="https://wiki.ubuntu.com/HardyHeron/Beta#head-da07b62e1e43afd0bef06ab8b60d2502c734a0f9" target="_blank"&gt;https://wiki.ubuntu.com/HardyHeron/Beta#head-da07b62e1e43afd0bef06ab8b60d2502c734a0f9&lt;/a&gt;, the iscsi support is enabled out of the box if we add &lt;strong&gt;iscsi=true&lt;/strong&gt; in the boot options during the installation.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/Click%20here%20for%20a%20bigger%20view" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/hardy-iscsi-support.jpg"&gt;&lt;img alt="" class="alignnone size-full wp-image-84" height="96" src="http://opensourceexperiments.files.wordpress.com/2008/05/hardy-iscsi-support.jpg" width="707" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;While installing Hardy 8.04 OS using virtualbox or any other virtualization software being used, remember to add &lt;strong&gt;iscsi=true&lt;/strong&gt; in the boot options (after pressing F6)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/install-with-iscsitrue-option.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/install-with-iscsitrue-option.jpg"&gt;&lt;img alt="" class="alignnone size-full wp-image-85" height="442" src="http://opensourceexperiments.files.wordpress.com/2008/05/install-with-iscsitrue-option.jpg" width="540" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;Configuring iscsi targets..&lt;/h2&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;I would like to give credit to a really awesome  link I found through google: &lt;a href="http://www.linuxconfig.org/Linux_lvm_-_Logical_Volume_Manager" target="_blank"&gt;http://www.linuxconfig.org/Linux_lvm_-_Logical_Volume_Manager&lt;/a&gt;, which I rate as a one of the best article s for doing this!&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Some other relevant links are:&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;a href="https://help.ubuntu.com/community/SettingUpLVM-WithoutACleanInstall" target="_blank"&gt;https://help.ubuntu.com/community/SettingUpLVM-WithoutACleanInstall&lt;/a&gt;&lt;br /&gt;&lt;a href="http://t3flyers.wordpress.com/2007/04/24/logical-volume-manager-on-ubuntu-feisty-704/" target="_blank"&gt;http://t3flyers.wordpress.com/2007/04/24/logical-volume-manager-on-ubuntu-feisty-704/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.howtoforge.com/linux_lvm" target="_blank"&gt;http://www.howtoforge.com/linux_lvm&lt;/a&gt;&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;After Ubuntu installation, the output of uname -a looks like this:&lt;br /&gt;&lt;pre&gt;HARDY# uname -a&lt;br /&gt;Linux gverma-laptop 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 GNU/Linux&lt;/pre&gt;&lt;br /&gt;And the output of fdisk -l looks like this:&lt;br /&gt;&lt;pre&gt;HARDY# fdisk -l&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 16.5 GB, 16592666624 bytes&lt;br /&gt;255 heads, 63 sectors/track, 2017 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;Disk identifier: 0x0004ccc2&lt;br /&gt;Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1   *           1        1927    15478596   83  Linux&lt;br /&gt;/dev/sda2            1928        2017      722925    5  Extended&lt;br /&gt;/dev/sda5            1928        2017      722893+  82  Linux swap / Solaris&lt;/pre&gt;&lt;br /&gt;At this point, I added two more hard disks to the virtualbox virtual machine. Virtualbox 1.5.6 allows upto three hard disk devices to be attached to a machine.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/add-2-more-hard-disks.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/add-2-more-hard-disks.jpg"&gt;&lt;img alt="" class="alignnone size-full wp-image-89" height="490" src="http://opensourceexperiments.files.wordpress.com/2008/05/add-2-more-hard-disks.jpg" width="468" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After booting up HARDY again, /dev/sdb and /dev/sdc were also visible in the output of fdisk -l. Using fdisk, I created a single partition in both devices that spanned the entire device, resulting in /dev/sdb1 and /dev/sdc1:&lt;br /&gt;&lt;pre&gt;HARDY# fdisk -l&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;Disk /dev/sdb: 21.4 GB, 21474836480 bytes&lt;br /&gt;255 heads, 63 sectors/track, 2610 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;Disk identifier: 0xd310045f&lt;br /&gt;&lt;br /&gt;Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sdb1               1        2610    20964793+  83  Linux&lt;br /&gt;&lt;br /&gt;Disk /dev/sdc: 21.4 GB, 21474836480 bytes&lt;br /&gt;255 heads, 63 sectors/track, 2610 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;Disk identifier: 0x93d4c692&lt;br /&gt;&lt;br /&gt;Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sdc1               1        2610    20964793+  83  Linux&lt;/pre&gt;&lt;br /&gt;Also make sure that you configure host only networking so that other virtual machines (scsi initiators) are able to ssh/telnet into HARDY. Please look at article to understand how host only networking can be setup:  &lt;a href="http://www.blogger.com/2008/04/18/virtualbox-case-study-making-host-only-networking-work-between-two-ubuntu-guest-os-virtual-machine-on-windows-vista-host/"&gt;Virtualbox Case Study: Making host only networking work between two Ubuntu Guest OS (virtual machine) on Windows Vista host&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/host-only-interface.jpg"&gt;&lt;img alt="" class="alignnone size-full wp-image-90" height="493" src="http://opensourceexperiments.files.wordpress.com/2008/05/host-only-interface.jpg" width="468" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;Getting the right packages installed..&lt;/h2&gt;&lt;br /&gt;Now, we need to create the target physical volume, virtual group, and logical volume, in that order. These logical volumes will serve as SCSI targets that can be discovered by other iscsi initiator machines or virtual machines as per your configuration.&lt;br /&gt;&lt;br /&gt;Make sure you reload the package definitions from the configured repositories (get the latest packages that are published from the ubuntu repositories). You can do this from the Synaptic Package Manager:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/reload-repositories.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/reload-repositories.jpg"&gt;&lt;img alt="" class="alignnone size-full wp-image-87" height="189" src="http://opensourceexperiments.files.wordpress.com/2008/05/reload-repositories.jpg" width="659" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, you should install the lvm2 package in Synaptic Package Manager:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/screenshot3.png" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/screenshot3.png"&gt;&lt;img alt="" class="alignnone size-full wp-image-88" height="544" src="http://opensourceexperiments.files.wordpress.com/2008/05/screenshot3.png" width="659" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Create the physical volumes:&lt;/h3&gt;&lt;br /&gt;&lt;pre&gt;HARDY# lvm&lt;br /&gt;&lt;br /&gt;lvm&amp;gt; pvcreate /dev/sdb1&lt;br /&gt;Physical volume "/dev/sdb1" successfully created&lt;br /&gt;lvm&amp;gt; pvcreate /dev/sdc1&lt;br /&gt;Physical volume "/dev/sdc1" successfully created&lt;br /&gt;lvm&amp;gt; pvdisplay&lt;br /&gt;--- NEW Physical volume ---&lt;br /&gt;PV Name               /dev/sdb1&lt;br /&gt;VG Name&lt;br /&gt;PV Size               19.99 GB&lt;br /&gt;Allocatable           NO&lt;br /&gt;PE Size (KByte)       0&lt;br /&gt;Total PE              0&lt;br /&gt;Free PE               0&lt;br /&gt;Allocated PE          0&lt;br /&gt;PV UUID               OHKhOq-AMG7-XtYz-7CrP-q2VH-2b53-tW0yMO&lt;br /&gt;&lt;br /&gt;--- NEW Physical volume ---&lt;br /&gt;PV Name               /dev/sdc1&lt;br /&gt;VG Name&lt;br /&gt;PV Size               19.99 GB&lt;br /&gt;Allocatable           NO&lt;br /&gt;PE Size (KByte)       0&lt;br /&gt;Total PE              0&lt;br /&gt;Free PE               0&lt;br /&gt;Allocated PE          0&lt;br /&gt;PV UUID               M9qXXB-GVxC-FZjI-9Zb7-IhcH-rbhb-vQ3aek&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Create the virtual group:&lt;/h3&gt;&lt;br /&gt;&lt;pre&gt;lvm&amp;gt; vgcreate vg /dev/sdb1 /dev/sdc1&lt;br /&gt;Volume group "vg" successfully created&lt;br /&gt;lvm&amp;gt; vgdisplay&lt;br /&gt;--- Volume group ---&lt;br /&gt;VG Name               vg&lt;br /&gt;System ID&lt;br /&gt;Format                lvm2&lt;br /&gt;Metadata Areas        2&lt;br /&gt;Metadata Sequence No  1&lt;br /&gt;VG Access             read/write&lt;br /&gt;VG Status             resizable&lt;br /&gt;MAX LV                0&lt;br /&gt;Cur LV                0&lt;br /&gt;Open LV               0&lt;br /&gt;Max PV                0&lt;br /&gt;Cur PV                2&lt;br /&gt;Act PV                2&lt;br /&gt;VG Size               39.98 GB&lt;br /&gt;PE Size               4.00 MB&lt;br /&gt;Total PE              10236&lt;br /&gt;Alloc PE / Size       0 / 0&lt;br /&gt;Free  PE / Size       10236 / 39.98 GB&lt;br /&gt;VG UUID               GkUMNq-3atR-qKTK-lG0b-gM0n-budV-Uc4lH8&lt;br /&gt;&lt;br /&gt;lvm&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Create logial volumes:&lt;/h3&gt;&lt;br /&gt;&lt;pre&gt;lvm&amp;gt; lvcreate -L 1G -n ocr vg&lt;br /&gt;Logical volume "ocr" created&lt;br /&gt;lvm&amp;gt; lvcreate -L 1G -n vote vg&lt;br /&gt;Logical volume "vote" created&lt;br /&gt;lvm&amp;gt; lvcreate -L 35G -n asm vg&lt;br /&gt;Logical volume "asm" created&lt;/pre&gt;&lt;br /&gt;&lt;blockquote&gt;If you get an error message saying:&lt;br /&gt;&lt;em&gt;&lt;strong&gt;/proc/misc: No entry for device-mapper&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;you can get around it by issuing&lt;strong&gt; sudo modprobe dm-mod&lt;/strong&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;pre&gt;lvm&amp;gt; lvdisplay&lt;br /&gt;--- Logical volume ---&lt;br /&gt;LV Name                /dev/vg/ocr&lt;br /&gt;VG Name                vg&lt;br /&gt;LV UUID                a2ARIQ-11dn-kdoB-cHCd-gtoR-aokO-HGqoo4&lt;br /&gt;LV Write Access        read/write&lt;br /&gt;LV Status              available&lt;br /&gt;# open                 0&lt;br /&gt;LV Size                1.00 GB&lt;br /&gt;Current LE             256&lt;br /&gt;Segments               1&lt;br /&gt;Allocation             inherit&lt;br /&gt;Read ahead sectors     0&lt;br /&gt;Block device           254:0&lt;br /&gt;&lt;br /&gt;--- Logical volume ---&lt;br /&gt;LV Name                /dev/vg/vote&lt;br /&gt;VG Name                vg&lt;br /&gt;LV UUID                1DqYL0-Ptsx-9kmE-UHmn-PmE9-ebVm-bfr0r0&lt;br /&gt;LV Write Access        read/write&lt;br /&gt;LV Status              available&lt;br /&gt;# open                 0&lt;br /&gt;LV Size                1.00 GB&lt;br /&gt;Current LE             256&lt;br /&gt;Segments               1&lt;br /&gt;Allocation             inherit&lt;br /&gt;Read ahead sectors     0&lt;br /&gt;Block device           254:1&lt;br /&gt;&lt;br /&gt;--- Logical volume ---&lt;br /&gt;LV Name                /dev/vg/asm&lt;br /&gt;VG Name                vg&lt;br /&gt;LV UUID                UKWcPz-aNGl-VdPm-51wa-Ewvm-ahvD-Y7N57v&lt;br /&gt;LV Write Access        read/write&lt;br /&gt;LV Status              available&lt;br /&gt;# open                 0&lt;br /&gt;LV Size                35.00 GB&lt;br /&gt;Current LE             8960&lt;br /&gt;Segments               2&lt;br /&gt;Allocation             inherit&lt;br /&gt;Read ahead sectors     0&lt;br /&gt;Block device           254:2&lt;br /&gt;&lt;br /&gt;lvm&amp;gt;&lt;/pre&gt;&lt;br /&gt;Now, you can check the logical volume devices like this:&lt;br /&gt;&lt;pre&gt;HARDY# ls -l /dev/vg&lt;br /&gt;total 0&lt;br /&gt;lrwxrwxrwx 1 root root 18 2008-05-03 02:42 asm -&amp;gt; /dev/mapper/vg-asm&lt;br /&gt;lrwxrwxrwx 1 root root 18 2008-05-03 02:41 ocr -&amp;gt; /dev/mapper/vg-ocr&lt;br /&gt;lrwxrwxrwx 1 root root 19 2008-05-03 02:41 vote -&amp;gt; /dev/mapper/vg-vote&lt;/pre&gt;&lt;br /&gt;You can also check the newly created devices in the /dev/disk/* directories on HARDY:&lt;br /&gt;&lt;pre&gt;HARDY# ls -l /dev/disk/*&lt;br /&gt;/dev/disk/by-id:&lt;br /&gt;..&lt;br /&gt;lrwxrwxrwx 1 root root 19 2008-05-03 02:42 dm-name-vg-asm -&amp;gt; ../../mapper/vg-asm&lt;br /&gt;lrwxrwxrwx 1 root root 19 2008-05-03 02:41 dm-name-vg-ocr -&amp;gt; ../../mapper/vg-ocr&lt;br /&gt;lrwxrwxrwx 1 root root 20 2008-05-03 02:41 dm-name-vg-vote -&amp;gt; ../../mapper/vg-vote&lt;br /&gt;..&lt;br /&gt;&lt;br /&gt;/dev/disk/by-path:&lt;br /&gt;total 0&lt;br /&gt;lrwxrwxrwx 1 root root  9 2008-05-02 22:30 pci-0000:00:01.1-scsi-0:0:1:0 -&amp;gt; ../../sdb&lt;br /&gt;lrwxrwxrwx 1 root root 10 2008-05-03 02:34 pci-0000:00:01.1-scsi-0:0:1:0-part1 -&amp;gt; ../../sdb1&lt;br /&gt;lrwxrwxrwx 1 root root  9 2008-05-02 22:30 pci-0000:00:01.1-scsi-1:0:1:0 -&amp;gt; ../../sdc&lt;br /&gt;lrwxrwxrwx 1 root root 10 2008-05-03 02:35 pci-0000:00:01.1-scsi-1:0:1:0-part1 -&amp;gt; ../../sdc1&lt;/pre&gt;&lt;br /&gt;You need to install the iscsitarget package using Synaptic Package Manager:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/screenshot1.png" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/screenshot1.png"&gt;&lt;img alt="" class="alignnone size-full wp-image-86" height="489" src="http://opensourceexperiments.files.wordpress.com/2008/05/screenshot1.png" width="642" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, you need to configure the /etc/ietd.conf file with the Target names and entries for each logical volume. The target names just need to unique within the network and are totally upto your imagination.&lt;br /&gt;&lt;pre&gt;HARDY# more /etc/ietd.conf&lt;br /&gt;Target iqn.2001-04.com.ubuntu:scsi.disk.vg.vote&lt;br /&gt;Lun 0 Path=/dev/vg/vote,Type=fileio&lt;br /&gt;Target iqn.2001-04.com.ubuntu:scsi.disk.vg.ocr&lt;br /&gt;Lun 0 Path=/dev/vg/ocr,Type=fileio&lt;br /&gt;Target iqn.2001-04.com.ubuntu:scsi.disk.vg.asm&lt;br /&gt;Lun 0 Path=/dev/vg/asm,Type=fileio&lt;/pre&gt;&lt;br /&gt;To enforce these entries, we need to restart the iscsitarget service manually now.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;Keep in mind that there is no dash (-) between iscsi and target in the name of the service, as in openfiler 2.2 (openfiler's IET implementation service has the name iscsi-target)&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;pre&gt;HARDY# /etc/init.d/iscsitarget restart&lt;br /&gt;Removing iSCSI enterprise target devices: succeeded.&lt;br /&gt;Stopping iSCSI enterprise target service: succeeded.&lt;br /&gt;Removing iSCSI enterprise target modules: succeeded.&lt;br /&gt;Starting iSCSI enterprise target service: succeeded.&lt;/pre&gt;&lt;br /&gt;To double check if the logical volumes have been discovered and published, you can check content of /proc/net/iet/volume on HARDY:&lt;br /&gt;&lt;pre&gt;::::::::::::::&lt;br /&gt;/proc/net/iet/volume&lt;br /&gt;::::::::::::::&lt;br /&gt;tid:3 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.asm&lt;br /&gt;lun:0 state:0 iotype:fileio iomode:wt path:/dev/vg/asm&lt;br /&gt;tid:2 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.ocr&lt;br /&gt;lun:0 state:0 iotype:fileio iomode:wt path:/dev/vg/ocr&lt;br /&gt;tid:1 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.vote&lt;br /&gt;lun:0 state:0 iotype:fileio iomode:wt path:/dev/vg/vote&lt;/pre&gt;&lt;br /&gt;If you do a more of  /proc/net/iet/session, you can clearly see that no iscsi-initiator machine have connected to HARDY yet (there are no session sub-entries under the volume name):&lt;br /&gt;&lt;pre&gt;HARDY# more /proc/net/iet/session&lt;br /&gt;tid:3 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.asm&lt;br /&gt;tid:2 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.ocr&lt;br /&gt;tid:1 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.vote&lt;/pre&gt;&lt;br /&gt;&lt;blockquote&gt;Here is a quick check of the physical volume, volume group, and logical volume :&lt;br /&gt;&lt;br /&gt;HARDY# lvm&lt;br /&gt;lvm&amp;gt; lvscan&lt;br /&gt;ACTIVE            '/dev/vg/ocr' [1.00 GB] inherit&lt;br /&gt;ACTIVE            '/dev/vg/vote' [1.00 GB] inherit&lt;br /&gt;ACTIVE            '/dev/vg/asm' [35.00 GB] inherit&lt;br /&gt;&lt;br /&gt;lvm&amp;gt; pvscan&lt;br /&gt;PV /dev/sdb1   VG vg   lvm2 [19.99 GB / 0    free]&lt;br /&gt;PV /dev/sdc1   VG vg   lvm2 [19.99 GB / 2.98 GB free]&lt;br /&gt;Total: 2 [39.98 GB] / in use: 2 [39.98 GB] / in no VG: 0 [0   ]&lt;br /&gt;&lt;br /&gt;lvm&amp;gt; vgscan&lt;br /&gt;Reading all physical volumes.  This may take a while...&lt;br /&gt;Found volume group "vg" using metadata type lvm2&lt;br /&gt;lvm&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;h2&gt;Discovering the iscsi targets from another iscsi initiator machine..&lt;/h2&gt;&lt;br /&gt;We will assume that the iscsi initiator machine name is GUTSY and it has the open-iscsi package installed (this also installs iscsiadm utility along with it). We will also assume that the IP of HARDY (iscsi target) is 192.168.0.7.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;You can leave the majority default values in /etc/iscsi.conf. Make sure you disable the CHAP authentication parameter values since we have not configured them in the scsi target.&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;Discover the new iscsi targets in HARDY:&lt;br /&gt;&lt;pre&gt;GUTSY# iscsiadm -m discovery -t st -p 192.168.0.7&lt;br /&gt;192.168.0.7:3260,1 iqn.2001-04.com.ubuntu:scsi.disk.vg.asm&lt;br /&gt;192.168.0.7:3260,1 iqn.2001-04.com.ubuntu:scsi.disk.vg.ocr&lt;br /&gt;192.168.0.7:3260,1 iqn.2001-04.com.ubuntu:scsi.disk.vg.vote&lt;/pre&gt;&lt;br /&gt;Verify the newly discovered target machine:&lt;br /&gt;&lt;pre&gt;GUTSY# sudo iscsiadm -m discovery&lt;br /&gt;192.168.0.6:3260 via sendtargets&lt;br /&gt;&lt;span style="color: blue;"&gt;192.168.0.7:3260 via sendtargets  --&amp;gt; the new iscsi target got added to the local database&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Check the combination of discovered iscsi-target and logical volumes (the new ones are in BLUE color):&lt;br /&gt;&lt;pre&gt;GUTSY# sudo iscsiadm -m node&lt;br /&gt;192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.ocr&lt;br /&gt;192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.vote&lt;br /&gt;192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.asm&lt;br /&gt;&lt;span style="color: blue;"&gt;192.168.0.7:3260,1 iqn.2001-04.com.ubuntu:scsi.disk.vg.asm&lt;br /&gt;192.168.0.7:3260,1 iqn.2001-04.com.ubuntu:scsi.disk.vg.ocr&lt;br /&gt;192.168.0.7:3260,1 iqn.2001-04.com.ubuntu:scsi.disk.vg.vote&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;But, at this point, we have no active sessions connected to these targets:&lt;br /&gt;&lt;pre&gt;GUTSY# iscsiadm -m session&lt;br /&gt;iscsiadm: No active sessions.&lt;/pre&gt;&lt;br /&gt;Establish connection to the scsi targets from the initiator:&lt;br /&gt;&lt;pre&gt;GUTSY# iscsiadm -m node \&lt;br /&gt;-T iqn.2001-04.com.ubuntu:scsi.disk.vg.asm \&lt;br /&gt;-p 192.168.0.7 -l&lt;br /&gt;Login session [iface: default, target: iqn.2001-04.com.ubuntu:scsi.disk.vg.asm, portal: 192.168.0.7,3260]&lt;br /&gt;GUTSY# iscsiadm -m node \&lt;br /&gt;-T iqn.2001-04.com.ubuntu:scsi.disk.vg.vote \&lt;br /&gt;-p 192.168.0.7 -l&lt;br /&gt;Login session [iface: default, target: iqn.2001-04.com.ubuntu:scsi.disk.vg.vote, portal: 192.168.0.7,3260]&lt;br /&gt;GUTSY# iscsiadm -m node \&lt;br /&gt;-T iqn.2001-04.com.ubuntu:scsi.disk.vg.ocr \&lt;br /&gt;-p 192.168.0.7 -l&lt;br /&gt;Login session [iface: default, target: iqn.2001-04.com.ubuntu:scsi.disk.vg.ocr, portal: 192.168.0.7,3260]&lt;/pre&gt;&lt;br /&gt;Verify the newly formed connections:&lt;br /&gt;&lt;pre&gt;GUTSY# iscsiadm -m session&lt;br /&gt;tcp: [1] 192.168.0.7:3260,1 iqn.2001-04.com.ubuntu:scsi.disk.vg.asm&lt;br /&gt;tcp: [2] 192.168.0.7:3260,1 iqn.2001-04.com.ubuntu:scsi.disk.vg.vote&lt;br /&gt;tcp: [3] 192.168.0.7:3260,1 iqn.2001-04.com.ubuntu:scsi.disk.vg.ocr&lt;/pre&gt;&lt;br /&gt;It would be useful to enable automatic startup/discovery of these volumes on server and client. For this, you need to do the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;On server(where the logical volumes are created):&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;pre&gt;HARDY# sudo gedit /etc/iscsi/iscsid.conf&lt;/pre&gt;&lt;br /&gt;Change node.startup=manual to: node.startup = Automatic&lt;br /&gt;&lt;pre&gt;GUTSY# sudo /etc/init.d/open-iscsi restart&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;On client&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;pre&gt;GUTSY# sudo iscsiadm -m discovery -t st -p &amp;lt;ipaddress&amp;gt;&lt;br /&gt;GUTSY# sudo iscsiadm -m node&lt;br /&gt;-T &lt;a href="http://iqn.2001-04.com/" target="_blank"&gt;&lt;span class="yshortcuts"&gt;iqn.2001-04.com&lt;/span&gt;&lt;/a&gt;.ubuntu:&lt;a href="http://scsi.disk.vg.as/" target="_blank"&gt;&lt;span class="yshortcuts"&gt;scsi.disk.vg&lt;/span&gt;&lt;/a&gt;.asm&lt;br /&gt;-p &amp;lt;ipaddress&amp;gt; -o update&lt;br /&gt;-n node.conn[0].startup -v automatic&lt;br /&gt;GUTSY# sudo /etc/init.d/open-iscsi restart&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;or reboot both the systems if required (make sure server boots first). To check if the scsi devices are automatically setup and list all your scsi iqns:&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;pre&gt;GUTSY # sudo iscsiadm -m session&lt;/pre&gt;&lt;br /&gt;Now assumed that the TCP scsi connections have been formed, let us check if the scsi devices are visible from fdisk -l:&lt;br /&gt;&lt;pre&gt;GUTSY# fdisk -l&lt;br /&gt;&lt;br /&gt;..&lt;br /&gt;Disk /dev/sdb: 37.5 GB, 37580963840 bytes&lt;br /&gt;64 heads, 32 sectors/track, 35840 cylinders&lt;br /&gt;Units = cylinders of 2048 * 512 = 1048576 bytes&lt;br /&gt;Disk identifier: 0x00000000&lt;br /&gt;&lt;br /&gt;Disk /dev/sdb doesn't contain a valid partition table&lt;br /&gt;&lt;br /&gt;Disk /dev/sdc: 1073 MB, 1073741824 bytes&lt;br /&gt;34 heads, 61 sectors/track, 1011 cylinders&lt;br /&gt;Units = cylinders of 2074 * 512 = 1061888 bytes&lt;br /&gt;Disk identifier: 0x00000000&lt;br /&gt;&lt;br /&gt;Disk /dev/sdc doesn't contain a valid partition table&lt;br /&gt;&lt;br /&gt;Disk /dev/sdd: 1073 MB, 1073741824 bytes&lt;br /&gt;34 heads, 61 sectors/track, 1011 cylinders&lt;br /&gt;Units = cylinders of 2074 * 512 = 1061888 bytes&lt;br /&gt;Disk identifier: 0x00000000&lt;br /&gt;&lt;br /&gt;Disk /dev/sdd doesn't contain a valid partition table&lt;br /&gt;GUTSY#&lt;/pre&gt;&lt;br /&gt;The newly discovered devices can also be checked under the contents of /dev/disk/*:&lt;br /&gt;&lt;pre&gt;GUTSY# ls -l /dev/disk/*&lt;br /&gt;/dev/disk/by-id:&lt;br /&gt;total 0&lt;br /&gt;..&lt;br /&gt;lrwxrwxrwx 1 root root  9 2008-05-02 23:05 scsi-149455400000000000000000001000000795600000e000000 -&amp;gt; ../../sdc&lt;br /&gt;lrwxrwxrwx 1 root root  9 2008-05-02 23:05 scsi-1494554000000000000000000020000004f5600000e000000 -&amp;gt; ../../sdd&lt;br /&gt;lrwxrwxrwx 1 root root  9 2008-05-02 23:05 scsi-149455400000000000000000003000000a45600000e000000 -&amp;gt; ../../sdb&lt;br /&gt;..&lt;br /&gt;&lt;br /&gt;/dev/disk/by-path:&lt;br /&gt;total 0&lt;br /&gt;lrwxrwxrwx 1 root root  9 2008-05-02 23:05 ip-192.168.0.7:3260-iscsi-iqn.2001-04.com.ubuntu:scsi.disk.vg.asm-lun-0 -&amp;gt; ../../sdb&lt;br /&gt;lrwxrwxrwx 1 root root  9 2008-05-02 23:05 ip-192.168.0.7:3260-iscsi-iqn.2001-04.com.ubuntu:scsi.disk.vg.ocr-lun-0 -&amp;gt; ../../sdd&lt;br /&gt;lrwxrwxrwx 1 root root  9 2008-05-02 23:05 ip-192.168.0.7:3260-iscsi-iqn.2001-04.com.ubuntu:scsi.disk.vg.vote-lun-0 -&amp;gt; ../../sdc&lt;br /&gt;..&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Relevant messages in the system log of scsi initiator (GUTSY)&lt;/h3&gt;&lt;br /&gt;&lt;pre&gt;# dmesg&lt;br /&gt;...&lt;br /&gt;[ 1156.290868] scsi2 : iSCSI Initiator over TCP/IP&lt;br /&gt;[ 1156.607026] scsi 2:0:0:0: Direct-Access     IET      VIRTUAL-DISK     0    PQ: 0 ANSI: 4&lt;br /&gt;[ 1156.607026] sd 2:0:0:0: [sdb] 73400320 512-byte hardware sectors (37581 MB)&lt;br /&gt;[ 1156.607026] sd 2:0:0:0: [sdb] Write Protect is off&lt;br /&gt;[ 1156.607026] sd 2:0:0:0: [sdb] Mode Sense: 77 00 00 08&lt;br /&gt;[ 1156.607026] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br /&gt;[ 1156.607111] sd 2:0:0:0: [sdb] 73400320 512-byte hardware sectors (37581 MB)&lt;br /&gt;[ 1156.608275] sd 2:0:0:0: [sdb] Write Protect is off&lt;br /&gt;[ 1156.608293] sd 2:0:0:0: [sdb] Mode Sense: 77 00 00 08&lt;br /&gt;[ 1156.610635] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br /&gt;[ 1156.610665]  sdb: unknown partition table&lt;br /&gt;[ 1156.619320] sd 2:0:0:0: [sdb] Attached SCSI disk&lt;br /&gt;[ 1156.619398] sd 2:0:0:0: Attached scsi generic sg2 type 0&lt;br /&gt;[ 1163.865083] scsi3 : iSCSI Initiator over TCP/IP&lt;br /&gt;[ 1164.132972] scsi 3:0:0:0: Direct-Access     IET      VIRTUAL-DISK     0    PQ: 0 ANSI: 4&lt;br /&gt;[ 1164.135287] sd 3:0:0:0: [sdc] 2097152 512-byte hardware sectors (1074 MB)&lt;br /&gt;[ 1164.136424] sd 3:0:0:0: [sdc] Write Protect is off&lt;br /&gt;[ 1164.136438] sd 3:0:0:0: [sdc] Mode Sense: 77 00 00 08&lt;br /&gt;[ 1164.138002] sd 3:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br /&gt;[ 1164.140341] sd 3:0:0:0: [sdc] 2097152 512-byte hardware sectors (1074 MB)&lt;br /&gt;[ 1164.141443] sd 3:0:0:0: [sdc] Write Protect is off&lt;br /&gt;[ 1164.141460] sd 3:0:0:0: [sdc] Mode Sense: 77 00 00 08&lt;br /&gt;[ 1164.144746] sd 3:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br /&gt;[ 1164.144809]  sdc: unknown partition table&lt;br /&gt;[ 1164.154241] sd 3:0:0:0: [sdc] Attached SCSI disk&lt;br /&gt;[ 1164.154290] sd 3:0:0:0: Attached scsi generic sg3 type 0&lt;br /&gt;[ 1170.533158] scsi4 : iSCSI Initiator over TCP/IP&lt;br /&gt;[ 1170.798343] scsi 4:0:0:0: Direct-Access     IET      VIRTUAL-DISK     0    PQ: 0 ANSI: 4&lt;br /&gt;[ 1170.798343] sd 4:0:0:0: [sdd] 2097152 512-byte hardware sectors (1074 MB)&lt;br /&gt;[ 1170.801229] sd 4:0:0:0: [sdd] Write Protect is off&lt;br /&gt;[ 1170.801263] sd 4:0:0:0: [sdd] Mode Sense: 77 00 00 08&lt;br /&gt;[ 1170.806093] sd 4:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br /&gt;[ 1170.809875] sd 4:0:0:0: [sdd] 2097152 512-byte hardware sectors (1074 MB)&lt;br /&gt;[ 1170.812347] sd 4:0:0:0: [sdd] Write Protect is off&lt;br /&gt;[ 1170.812380] sd 4:0:0:0: [sdd] Mode Sense: 77 00 00 08&lt;br /&gt;[ 1170.816757] sd 4:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br /&gt;[ 1170.816757]  sdd: unknown partition table&lt;br /&gt;[ 1170.828375] sd 4:0:0:0: [sdd] Attached SCSI disk&lt;br /&gt;[ 1170.828446] sd 4:0:0:0: Attached scsi generic sg4 type 0&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Cross checking incoming sessions at scsi target (HARDY)..&lt;/h3&gt;&lt;br /&gt;In the meanwhile, in HARDY, the incoming sessions can be checked by:&lt;br /&gt;&lt;pre&gt;HARDY# more /proc/net/iet/*&lt;br /&gt;::::::::::::::&lt;br /&gt;/proc/net/iet/session&lt;br /&gt;::::::::::::::&lt;br /&gt;tid:3 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.asm&lt;br /&gt;sid:281474997486080 initiator:iqn.1993-08.org.debian:01:950a218cdd1&lt;br /&gt;cid:0 ip:192.168.0.6 state:active hd:none dd:none&lt;br /&gt;tid:2 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.ocr&lt;br /&gt;sid:844424984461824 initiator:iqn.1993-08.org.debian:01:950a218cdd1&lt;br /&gt;cid:0 ip:192.168.0.6 state:active hd:none dd:none&lt;br /&gt;tid:1 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.vote&lt;br /&gt;sid:562949990973952 initiator:iqn.1993-08.org.debian:01:950a218cdd1&lt;br /&gt;cid:0 ip:192.168.0.6 state:active hd:none dd:none&lt;br /&gt;::::::::::::::&lt;br /&gt;/proc/net/iet/volume&lt;br /&gt;::::::::::::::&lt;br /&gt;tid:3 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.asm&lt;br /&gt;lun:0 state:0 iotype:fileio iomode:wt path:/dev/vg/asm&lt;br /&gt;tid:2 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.ocr&lt;br /&gt;lun:0 state:0 iotype:fileio iomode:wt path:/dev/vg/ocr&lt;br /&gt;tid:1 name:iqn.2001-04.com.ubuntu:scsi.disk.vg.vote&lt;br /&gt;lun:0 state:0 iotype:fileio iomode:wt path:/dev/vg/vote&lt;br /&gt;root@gverma-laptop:/home/gverma#&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Conclusion..&lt;/h2&gt;&lt;br /&gt;Congratulations! You have been successful in creating a poor man's scsi target and discovered them using open source softwares in an easy manner. Now GUTSY can read/write to /dev/vg/asm etc logical volumes. For more machines to do the same thing, similar setup is needed on them and they should also be access these volumes in a clustered fashion. This kind of setup is most beneficial for creating your own Oracle 10g RAC sandbox environment or for doing installs over shared disk.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;In this case, we did not format the discovered logical volumes in ext3 or OCFS2 file system, because it is assumed that these volumes will be used as raw devices only.&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;h2&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;&lt;h2&gt;Appendix&lt;/h2&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style="color: blue;"&gt;Content contributed by Sundar Mahadevan, who tenaciously resolved weird scsi target issues and graciously published this for the benefit of similar seekers):&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;The following helps newbies:&lt;br /&gt;&lt;br /&gt;For iscsi to be implemented, you need to have iscsitarget installed onthe machine from where the logical volumes are going to be created and you need to have open-iscsi (initiator) installed on the machine that has to access the already created logical volumes.&lt;br /&gt;&lt;br /&gt;When I tried this setup, I was getting some really weird errors. In this appendix, I outline my experience and offer the solution that ultimately worked for me. The intent of this sharing is to prevent anxiety for other people who may be in similar situations (I remember it was quite frustrating for me).&lt;br /&gt;&lt;br /&gt;System1 : ubuntu 8.10&lt;br /&gt;created /dev/vg1/asm, /dev/vg1/ocr and /dev/vg1/vote on the secondary&lt;br /&gt;hard drive with lvm2&lt;br /&gt;has iscsitarget and iscsitarget-source installed&lt;br /&gt;&lt;br /&gt;System2: ubuntu 8.10&lt;br /&gt;has open-iscsi installed&lt;br /&gt;&lt;br /&gt;Connection: static (&lt;span class="yshortcuts"&gt;crossover cable&lt;/span&gt; between the 2 systems)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: red;"&gt;Error: Only one logical volume of the entire size of /dev/vg1 was discovered by the initiator! I should have got three disks like /dev/sda, sdb, sdc , but instead I got /dev/sdd or /dev/sdc.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Then i tried to make my connection as dhcp (with router connecting the 2 systems)&lt;br /&gt;&lt;br /&gt;Error:&lt;br /&gt;&lt;pre&gt;Apr 17 11:40:42 sunny1 iscsid: session&lt;br /&gt;[&lt;a href="http://iqn.2009-09.com/" target="_blank"&gt;&lt;span class="yshortcuts"&gt;iqn.2009-09.com&lt;/span&gt;&lt;/a&gt;.ubuntu:asm,192.168.2.3,3260] already running.&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.360412] sd 2:0:0:0: [sdb]&lt;br /&gt;Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.360436] end_request: I/O error,&lt;br /&gt;dev sdb, sector 0&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.360449] __ratelimit: 2 callbacks&lt;br /&gt;suppressed&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.360457] Buffer I/O error on&lt;br /&gt;device sdb, logical block 0&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.360471] Buffer I/O error on&lt;br /&gt;device sdb, logical block 1&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.360478] Buffer I/O error on&lt;br /&gt;device sdb, logical block 2&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.360486] Buffer I/O error on&lt;br /&gt;device sdb, logical block 3&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.370342] sd 2:0:0:0: [sdb]&lt;br /&gt;Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.370359] end_request: I/O error,&lt;br /&gt;dev sdb, sector 0&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.370369] Buffer I/O error on&lt;br /&gt;device sdb, logical block 0&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.375106] sd 2:0:0:0: [sdb]&lt;br /&gt;Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.375125] end_request: I/O error,&lt;br /&gt;dev sdb, sector 33554424&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.375135] Buffer I/O error on&lt;br /&gt;device sdb, logical block 4194303&lt;br /&gt;Apr 17 11:40:44 sunny1 kernel: [ 5661.379983] sd 2:0:0:0: [sdb]&lt;/pre&gt;&lt;br /&gt;Also i have been getting the error below from the beginning when i enter &lt;strong&gt;iscsiadm -m session &lt;/strong&gt;( from the client/initiator side)&lt;br /&gt;&lt;pre&gt;&lt;span style="color: red;"&gt;iscsiadm: could not get host for sid 1.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;iscsiadm: could not get host_no for session 6.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;iscsiadm: could not find session info for session1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;iscsiadm: can not get list of active sessions (6)&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;The were few bugs reported for the above error and the solution was to upgrade to 2.0.870 while my version was 2.0.865 I then did a fresh install on the client/initator side (ubuntu 9.04) and then installed open-iscsi 2.0.870 and just executed these commands:&lt;br /&gt;&lt;pre&gt;iscsiadm -m discovery t st -p 192.168.2.3&lt;br /&gt;iscsiadm -m node -T &lt;a href="http://iqn.2001-04.com/" target="_blank"&gt;&lt;span class="yshortcuts"&gt;iqn.2001-04.com&lt;/span&gt;&lt;/a&gt;.ubuntu:&lt;a href="http://scsi.disk.vg.as/" target="_blank"&gt;&lt;span class="yshortcuts"&gt;scsi.disk.vg&lt;/span&gt;&lt;/a&gt;.asm -p 192.168.2.3 -l&lt;/pre&gt;&lt;br /&gt;and that was it!!...all logical partitions were detected from the client/initiator.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-1484529807463286944?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/1484529807463286944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/05/special-need.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/1484529807463286944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/1484529807463286944'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/05/special-need.html' title='A poor man&apos;s guide for creating iscsi targets without using external USB hard disks'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-5441358573494576042</id><published>2008-05-01T17:38:00.000-04:00</published><updated>2010-12-30T23:34:08.483-05:00</updated><title type='text'>Creating your own 10g RAC cluster at home using virtualbox and SAN targets (using openfiler + with/without USB hard disk)</title><content type='html'>&lt;h2&gt;Preface&lt;/h2&gt;&lt;br /&gt;After playing around with some open source technologies like virtualbox and openfiler, we are finally at a point when it is possible to create your own network lab of Oracle 10gR2 RAC cluster and ASM database using iscsi targets in an external hard disk drive. The last time I checked, USB 2.0 hard disk drives are cheaply available in the market.&lt;br /&gt;&lt;blockquote&gt;If you do not want to use an external USB hard disk, then please go through the article &lt;a href="http://www.blogger.com/2008/05/03/a-poor-mans-guide-for-creating-iscsi-targets-without-using-external-usb-hard-disks/"&gt;A poor man's guide for creating iscsi targets without using external USB hard disks&lt;/a&gt;&lt;/blockquote&gt;&lt;br /&gt;All it takes is a little persistence and willingness to follow easy to follow tutorials. In the previous articles on this blog, I have talked about the building blocks of using virtualbox and openfiler open source softwares. If we combine that knowledge with Oracle 10g RAC setup, the following end configuration can be achieved:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/rac-2-nodes-iscsi-target-discovery-with-openfiler.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/05/rac-2-nodes-iscsi-target-discovery-with-openfiler.jpg"&gt;&lt;img alt="" class="alignnone size-full wp-image-82" height="308" src="http://opensourceexperiments.files.wordpress.com/2008/05/rac-2-nodes-iscsi-target-discovery-with-openfiler.jpg" width="468" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;The building blocks..&lt;/h2&gt;&lt;br /&gt;&lt;h3&gt;The operating system&lt;/h3&gt;&lt;br /&gt;First of all, you need to install a linux distribution of your choice using virtualbox. In this example, I chose SuSE linux 9.3. I feel that SuSE linux will be embraced by more and more enterprises in the near future, hence this decision.&lt;br /&gt;&lt;br /&gt;For doing the installation, just boot from the Linux install media CD and then keep switching CDs as per request of the install process. It is always better if you have an ISO file of the installable media. You can get the SuSE media from &lt;a href="http://www.opensuse.org/" target="_blank"&gt;www.opensuse.org&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Always keep a decent amount of swap space for the OS installation. Also it is better to have a /tmp mount point as a separate mount point from the root (/) partition. These are some evergreen tips that a sysadmin friend of mine (Erik Niklas) had suggested to me a long time back.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;A word of caution while deciding the VDI disk size for virtualbox machine (especially relevant for Version 1.5.6). &lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;The virtualbox disks cannot be resized!! &lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;The dynamically expanding option means that the disk can grow UPTO the maximum limit and it will grow as per usage till the maximum limit. After that, it is not possible to resize it using some Vbox utility.A workaround may be to copy the device using partition editors, but till virtualbox comes out with an enhancement on this feature, better to be safe than sorry and keep a very high disk size - as per your judgement.&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;For building a Oracle 10g RAC configuration, it is better to focus all your installation efforts on one virtual machine and then clone the virtualbox disks (including the bootable disk) using the &lt;em&gt;&lt;strong&gt;VboxManage clonevdi&lt;/strong&gt;&lt;/em&gt; command. This way, you save a lot of duplicate effort.&lt;br /&gt;&lt;h3&gt;The networking configuration - Public and Private IPs&lt;/h3&gt;&lt;br /&gt;The other networking building blocks of this configuration can be achieved by the following:&lt;br /&gt;&lt;br /&gt;1) RAC needs a public IP, which is usually (but not limited to) eth0. It is advantageous to configure the public IP as host only networking interface when using virtualbox because it gives you the dual advantage of being able to SSH into the machine from outside (e.g. other rac node or another machine on the LAN) and also make internet work.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;I tried to keep this as a static IP, but the downside is that the default gateway was somehow not working for me. However, if I kept this as  DHCP interface, the default gateway and nameservers were being accessible out of the box.&lt;br /&gt;&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;em&gt;A&lt;/em&gt; detailed example of how to do this is shown in the article &lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;a class="row-title" href="http://www.blogger.com/post.php?action=edit&amp;amp;post=32" title="Making host only networking work between two Ubuntu Guest OS (virtual machine) on Windows Vista host"&gt;Virtualbox Case Study: Making host only networking work between two Ubuntu Guest OS (virtual machine) on Windows Vista host&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;table border="0" class="widefat"&gt;&lt;tbody&gt;&lt;tr class="author-self status-publish" valign="top"&gt; &lt;td&gt;&lt;strong&gt;&lt;a class="row-title" href="http://www.blogger.com/post.php?action=edit&amp;amp;post=19" title="Making Internal networking for talking between two linux guest OS (Ubuntu) on windows vista host"&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;2) A RAC setup also needs a private network between the RAC nodes for global communication system (GCS) and synchronization. This is also usually referred to as the private interconnects. This is usually configured on a private subnet like 10.10.x.x or 192.168.x.x, wherein other network traffic would not impinge on the sacrosanct synchronization traffic between the RAC nodes.&lt;br /&gt;&lt;br /&gt;A detailed example of how to do this is shown in the article &lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;a href="http://opensourceexperiments.wordpress.com/2008/04/13/case-study-configuring-internal-networking-work-for-talking-two-linux-guest-os-ubuntu-on-windows-vista-host/" title="Making Internal networking for talking between two linux guest OS (Ubuntu) on windows vista host"&gt;Case study: Making Internal networking for talking between two linux guest OS (Ubuntu) on windows vista host&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;h3&gt;The Network Attached Storage or Storage Area Network setup..&lt;/h3&gt;&lt;br /&gt;NAS is hot! Well, what i mean is that its like configure once, use everywhere kind of thing. You setup iSCSI target logical volumes and then discover and access them from other machines. There are packages like linux-iscsi and open-iscsi which will help you do that. As per the latest announcements, both these open source projects have been merged into open-iscsi now.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;Why should we choose Ubuntu for hard disk drivers? The partitions from a /dev/sd* devices gets discovered as separate devices, whereas all partitions in /dev/hd* get discovered as a single device.&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;There are quite promising open source softwares in this area too. &lt;a href="http://www.openfiler.com/" target="_blank"&gt;openfiler&lt;/a&gt; and &lt;a href="http://www.freenas.org/" target="_blank"&gt;freenas&lt;/a&gt; are a few of them. For no particular reason, I picked openfiler and did a few experiments for discovering iscsi targets using it.&lt;br /&gt;&lt;br /&gt;A detailed example of how to do this has been shown in the article &lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;a class="row-title" href="http://www.blogger.com/post.php?action=edit&amp;amp;post=77" title="How to discover iscsi targets with linux-iscsi initiator package — Suse linux 9 (scsi Initiator) and openfiler (scsi target)"&gt;Case Study: How to discover iscsi targets with linux-iscsi initiator package — Suse linux 9 (scsi Initiator) and openfiler (scsi target)&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;If you are using USB external hard disks for this exercise, there are many gotchas involved in their proper detection when using virtualbox on windows host. But some golden rules mentioned in this article can be useful: &lt;strong&gt;&lt;/strong&gt;&lt;/em&gt;&lt;strong&gt;&lt;a class="row-title" href="http://www.blogger.com/post.php?action=edit&amp;amp;post=67" title="Gotchas involved in making a USB external hard disk device work on windows host"&gt;&lt;em&gt;Virtualbox How to: Gotchas involved in making a USB external hard disk device work on windows host &lt;/em&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/blockquote&gt;&lt;br /&gt;A problem with openfiler 2.2 is that it forgets the previous logical volumes etc after reboots. This situation can result in frustration, especially when you see no LUNs being discovered from the initiators. If you read the following article, there is a good chance that you will be fine: &lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;a class="row-title" href="http://www.blogger.com/post.php?action=edit&amp;amp;post=80" title="no LUNs detected for session when using openfiler"&gt;iSCSI: no LUNs detected for session when using openfiler&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;h3&gt;The Oracle 10gR2 RAC setup&lt;/h3&gt;&lt;br /&gt;With the above components in place, the stage is now set for you to install the Oracle 10g CRS software. Needless to say, there are several detailed guides available on Oracle Technology Network on how to do this. Each Operating system has unique package pre-requisites for the Oracle software to be installed properly.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;Some more guides area available on the novell.com website at &lt;a href="http://www.novell.com/products/server/oracle/documents.html" target="_blank"&gt;http://www.novell.com/products/server/oracle/documents.html&lt;/a&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;a href="http://www.novell.com/products/server/oracle/documents.html" target="_blank"&gt;&lt;/a&gt;Check out the guides under SUSE Enterprise Linux Server 9 tab. They are pretty detailed.&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;Some more guides are available at &lt;a href="http://www.nextre.it/oracledocs/rac10gonsles9.html" target="_blank"&gt;http://www.nextre.it/oracledocs/rac10gonsles9.html&lt;/a&gt; and &lt;a href="http://www.oracle.com/technology/pub/articles/smiley_rac10g_install.html#oracle" target="_blank"&gt;http://www.oracle.com/technology/pub/articles/smiley_rac10g_install.html#oracle&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;Suggested reading..&lt;/h2&gt;&lt;br /&gt;It is very likely that you would have come across the widely read article by Jeffrey Hunter on a similar topic. In &lt;a href="http://www.oracle.com/technology/pub/articles/hunter_rac10gr2_iscsi.html" target="_blank"&gt;http://www.oracle.com/technology/pub/articles/hunter_rac10gr2_iscsi.html&lt;/a&gt;, he deals with creating a 10g RAC on Redhat linux.&lt;br /&gt;&lt;br /&gt;If you do not want to use an external USB hard disk for iscsi SAN targets, then please go through the article &lt;a href="http://www.blogger.com/2008/05/03/a-poor-mans-guide-for-creating-iscsi-targets-without-using-external-usb-hard-disks/"&gt;A poor man's guide for creating iscsi targets without using external USB hard disks&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-5441358573494576042?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/5441358573494576042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/05/preface-after-playing-around-with-some.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/5441358573494576042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/5441358573494576042'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/05/preface-after-playing-around-with-some.html' title='Creating your own 10g RAC cluster at home using virtualbox and SAN targets (using openfiler + with/without USB hard disk)'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-1616963281492426286</id><published>2008-05-01T09:21:00.000-04:00</published><updated>2010-12-30T22:41:34.474-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='volume group'/><category scheme='http://www.blogger.com/atom/ns#' term='linux-iscsi'/><category scheme='http://www.blogger.com/atom/ns#' term='logical volume'/><category scheme='http://www.blogger.com/atom/ns#' term='iscsi initiator'/><category scheme='http://www.blogger.com/atom/ns#' term='iscsi'/><category scheme='http://www.blogger.com/atom/ns#' term='iscsi target'/><category scheme='http://www.blogger.com/atom/ns#' term='dmesg'/><category scheme='http://www.blogger.com/atom/ns#' term='no luns detected'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='network attached storage'/><category scheme='http://www.blogger.com/atom/ns#' term='LUN'/><category scheme='http://www.blogger.com/atom/ns#' term='openfiler'/><title type='text'>iSCSI: no LUNs detected for session when using openfiler</title><content type='html'>&lt;h2&gt;A common problem...&lt;/h2&gt;&lt;br/&gt;If you are using openfiler, at some point of time, you are bound to reboot the openfiler OS/machine. After the reboot,  a common problem is that openfiler forgets or loses the logical volume/volume group information.&lt;br/&gt;&lt;br/&gt;So, as a workaround, you need to issue the following commands:&lt;br/&gt;&lt;pre&gt;################################&lt;br/&gt;# to discover the volume groups&lt;br/&gt;################################&lt;br/&gt;# vgscan   &lt;br/&gt;&lt;br/&gt;#################################&lt;br/&gt;# to discover the logical volumes&lt;br/&gt;#################################&lt;br/&gt;# lvscan  &lt;br/&gt;&lt;br/&gt;##################################&lt;br/&gt;# to discover the physical volumes&lt;br/&gt;##################################&lt;br/&gt;# pvscan&lt;/pre&gt;&lt;br/&gt;Then, you can display them using the commands &lt;em&gt;vgdisplay, lvdisplay, pvdisplay&lt;/em&gt;. Similarly, there is a whole suite of commands in the same location.&lt;br/&gt;&lt;br/&gt;Then, you STILL need to activate the discovered logical volumes using the -ay switch of lvchange:&lt;br/&gt;&lt;pre&gt;# lvchange -ay openfiler/asm&lt;br/&gt;# lvchange -ay openfiler/ocr&lt;br/&gt;# lvchange -ay openfiler/vote&lt;/pre&gt;&lt;br/&gt;Now, if you run the lvscan or lvdisplay command, the status of the Logical volumes will show as ACTIVATED.&lt;br/&gt;&lt;h3&gt;Remember..&lt;/h3&gt;&lt;br/&gt;AFTER you do this, You will &lt;strong&gt;STILL &lt;/strong&gt;need to restart the iscsi-target service on openfiler machine.&lt;br/&gt;&lt;pre&gt;openfiler $&amp;gt; service iscsi-target restart&lt;/pre&gt;&lt;br/&gt;If you fail to do this, you will see these messages in the &lt;strong&gt;dmesg &lt;/strong&gt;output on the iscsi-initiator node (not the openfiler machine) - &lt;strong&gt;iSCSI: no LUNs detected for session&lt;/strong&gt;. This message can be very confusing,  especially since you will see that the session to the iscsi target WAS established:&lt;br/&gt;&lt;pre&gt;openfiler $&amp;gt; dmesg&lt;br/&gt;...&lt;br/&gt;...&lt;br/&gt;iSCSI: bus 0 target 0 = iqn.2006-01.com.openfiler:openfiler.vote&lt;br/&gt;iSCSI: bus 0 target 0 portal 0 = address 10.143.213.248 port 3260 group 1&lt;br/&gt;iSCSI: starting timer thread at 286340&lt;br/&gt;iSCSI: bus 0 target 0 trying to establish session to portal 0, address 10.143.213.248 port 3260 group 1&lt;br/&gt;iSCSI: bus 0 target 1 = iqn.2006-01.com.openfiler:openfiler.ocr&lt;br/&gt;iSCSI: bus 0 target 1 portal 0 = address 10.143.213.248 port 3260 group 1&lt;br/&gt;iSCSI: bus 0 target 1 trying to establish session to portal 0, address 10.143.213.248 port 3260 group 1&lt;br/&gt;iSCSI: bus 0 target 0 established session #1, portal 0, address 10.143.213.248 port 3260 group 1&lt;br/&gt;iSCSI: bus 0 target 2 = iqn.2006-01.com.openfiler:openfiler.asm&lt;br/&gt;iSCSI: bus 0 target 2 portal 0 = address 10.143.213.248 port 3260 group 1&lt;br/&gt;iSCSI: bus 0 target 1 established session #1, portal 0, address 10.143.213.248 port 3260 group 1&lt;br/&gt;iSCSI: bus 0 target 2 trying to establish session to portal 0, address 10.143.213.248 port 3260 group 1&lt;br/&gt;iSCSI: bus 0 target 3 = iqn.2006-01.com.openfiler:openfiler.test&lt;br/&gt;iSCSI: bus 0 target 3 portal 0 = address 10.143.213.248 port 3260 group 1&lt;br/&gt;iSCSI: bus 0 target 3 trying to establish session to portal 0, address 10.143.213.248 port 3260 group 1&lt;br/&gt;iSCSI: bus 0 target 2 established session #1, portal 0, address 10.143.213.248 port 3260 group 1&lt;br/&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;iSCSI: no LUNs detected for session (bus 0 target 0) to iqn.2006-01.com.openfiler:openfiler.vote&lt;/strong&gt;&lt;strong&gt;&lt;br/&gt;iSCSI: no LUNs detected for session (bus 0 target 1) to iqn.2006-01.com.openfiler:openfiler.ocr&lt;br/&gt;iSCSI: no LUNs detected for session (bus 0 target 2) to iqn.2006-01.com.openfiler:openfiler.asm&lt;/strong&gt;&lt;/span&gt;&lt;br/&gt;iSCSI: bus 0 target 3 established session #1, portal 0, address 10.143.213.248 port 3260 group 1&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-1616963281492426286?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/1616963281492426286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/05/iscsi-no-luns-detected-for-session-when.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/1616963281492426286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/1616963281492426286'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/05/iscsi-no-luns-detected-for-session-when.html' title='iSCSI: no LUNs detected for session when using openfiler'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-4189830088346478456</id><published>2008-04-25T09:19:00.000-04:00</published><updated>2010-12-30T23:36:57.404-05:00</updated><title type='text'>Case Study: How to discover iscsi targets with linux-iscsi initiator package -- Suse linux 9 (scsi Initiator) and openfiler (scsi target)</title><content type='html'>&lt;h2&gt;Birds eye view of the end configuration...&lt;/h2&gt;&lt;br /&gt;Here is the bird's eye view of the end configuration that we will achieve at the end of this article:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/diagram-for-linux-iscsi-target-discovery-article.jpg" target="_blank"&gt;Click here for a bigger view..&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/diagram-for-linux-iscsi-target-discovery-article.jpg"&gt;&lt;img alt="" class="alignnone size-full wp-image-79" height="347" src="http://opensourceexperiments.files.wordpress.com/2008/04/diagram-for-linux-iscsi-target-discovery-article.jpg" width="468" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;h3&gt;&lt;em&gt;&lt;strong&gt;My Grumblings with openfiler..&lt;/strong&gt;&lt;/em&gt;&lt;/h3&gt;&lt;br /&gt;&lt;em&gt;Those of you who have started experimented with &lt;a href="http://www.openfiler.com/" target="_blank"&gt;openfiler &lt;/a&gt;may have started liking its features already. One of the biggest concerns that I have with openfiler is that it's administrative GUI is full of bugs or makes a lot of assumptions while working.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;For example, it wouldn't show up logical volumes which were created in a iscsi external hard disk from &lt;/em&gt;&lt;em&gt;&lt;strong&gt;another&lt;/strong&gt; installation of openfiler virtual machine. &lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Somehow, CLI commands like pvscan, lvscan and vgscan &lt;/em&gt;&lt;em&gt;&lt;strong&gt;are able&lt;/strong&gt; to discover previously created physcial volumes, logical volumes and volume groups; &lt;/em&gt;&lt;em&gt;&lt;strong&gt;but&lt;/strong&gt; the front end GUI (http://&amp;lt;openfiler IP&amp;gt;:446) fails to do the same.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Although there is another open source product called &lt;a href="http://freenas.org/" target="_blank"&gt;freenas&lt;/a&gt;, I resisted to temptation to switch my loyalties too soon as no product is without bugs as such.&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;h2&gt;&lt;strong&gt;My requirement..&lt;/strong&gt;&lt;/h2&gt;&lt;br /&gt;Anyways, my real requirement was to create a homegrown 10g RAC cluster using &lt;a href="http://virtualbox.org/" target="_blank"&gt;virtualbox &lt;/a&gt;virtual machines. For better or worse, I had chosen Suse Linux 9 (SP3) as the base operating system for the 10g RAC installation. A great reason was that many big customers like &lt;a href="http://officedepot.com/" target="_blank"&gt;officedepot&lt;/a&gt; have chosen to implement 10g RAC on Suse Linux 9.3 . As time goes by, I feel that SuSE linux will become a more popular platform. Hence my persistence with this distribution.&lt;br /&gt;&lt;blockquote&gt;There are ways to spoof the 10g RAC installation with 1 node too, but I wanted to simulate the real thing and be able to drive a Train-The-Trainer session for my teammates.&lt;/blockquote&gt;&lt;br /&gt;&lt;h2&gt;&lt;strong&gt;Looking back at my initial struggles...&lt;/strong&gt;&lt;/h2&gt;&lt;br /&gt;I now realize that figuring out how to discover iscsi targets on Ubuntu was much easier. The experience is documented here: &lt;a href="http://www.blogger.com/2008/04/21/combining-openfiler-and-virtualbox-ubuntu-guest-os-on-windows-host/"&gt;Combining Openfiler and Virtualbox (Ubuntu guest OS on windows host&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My initial struggles were torn with anguish, especially because I realized very soon that I could not  use open-iscsi linux package with SuSE linux 9 (2.6.5-7-244 kernel) at all. SuSE linux 10.x seems to have great support for it, though. This is simply because open-iscsi package works with kernels 2.6.14 and above only.&lt;br /&gt;&lt;br /&gt;Tough luck there.&lt;br /&gt;&lt;h2&gt;&lt;strong&gt;So, whats available for &lt;a href="http://download.novell.com/Download?buildid=H9EGDY9GAn8~" target="_blank"&gt;SuSE Linux 9&lt;/a&gt; if you want to discover iscsi target devices?&lt;/strong&gt;&lt;/h2&gt;&lt;br /&gt;Well, there &lt;strong&gt;are &lt;/strong&gt;some options. The &lt;a href="http://linux-iscsi.sourceforge.net/" target="_blank"&gt;linux-iscsi&lt;/a&gt; package is very much available and with a little configuration, which is quite simplistic, it works great. A lot of people tried to woo me with other distributions like &lt;a href="http://oss.oracle.com/el5/" target="_blank"&gt;Oracle Enterprise Linux 5&lt;/a&gt;, which has &lt;strong&gt;iscsi&lt;/strong&gt;-&lt;strong&gt;initiator&lt;/strong&gt;-&lt;strong&gt;utils&lt;/strong&gt; package built into it, but I stuck to my ground.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;Here are some important distinctions between &lt;a href="http://linux-iscsi.sourceforge.net/" target="_blank"&gt;linux-iscsi&lt;/a&gt; and &lt;a href="http://www.open-iscsi.org/" target="_blank"&gt;open-iscsi:&lt;/a&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;- The linux-iscsi package (aka iscsi-sfnet) reads /etc/iscsi.conf&lt;br /&gt;- The open-iscsi package reads /etc/iscsid.conf. This package has an additional iscsiadm utility for discovering targets.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;As of now, linux-iscsi and open-iscsi projects have been merged (as from their announcement) into one open-iscsi project.&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;h2&gt;&lt;strong&gt;Now, the difficult part: figuring out the setup ..&lt;/strong&gt;&lt;/h2&gt;&lt;br /&gt;The most difficult part was figuring out the setup that worked. Eventually, after umpteen tries, it did work. On more than one occasion, I thought if it was even worth trying linux-iscsi initiator package with openfiler as iscsi target, iscsi-target drivers seemed more compatible with open-iscsi initiator package (this was &lt;a href="http://opensourceexperiments.wordpress.com/2008/04/21/combining-openfiler-and-virtualbox-ubuntu-guest-os-on-windows-host/" target="_blank"&gt;the Ubuntu experience&lt;/a&gt; dominating my thinking).&lt;br /&gt;&lt;br /&gt;However, I now realize that this perception was delusional. All I really needed was to a proper configuration of linux-iscsi package as iscsi initiator.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;i will assume that the reader is conversant with the terms iscsi iniatiator/target.&lt;br /&gt;If not, here is a crash course: iscsi targets are the LUNs or logical volumes in your NAS device , iscsi initiator is the client machine which wants to use these LUNs or Logical volumes. You dig?&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;With debug level 10 of iscsid process (# iscsid -d 10 &amp;amp;), i was getting the following error while discovering targets:&lt;br /&gt;&lt;pre&gt;.. &amp;gt;&amp;gt; iscsid[17946]: connecting to 10.143.213.233:446&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: connected local port 33785 to 10.143.213.233:446&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: discovery session to 10.143.213.233:446 starting iSCSI login on fd 1&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: sending login PDU with current stage 1, next stage 3, transit 0x80, isid 0x00023d000001&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: &amp;gt;   InitiatorName=iqn.1987-05.com.cisco:01.51f06557c68&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: &amp;gt;   InitiatorAlias=raclinux1&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: &amp;gt;   SessionType=Discovery&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: &amp;gt;   HeaderDigest=None&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: &amp;gt;   DataDigest=None&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: &amp;gt;   MaxRecvDataSegmentLength=8192&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: &amp;gt;   X-com.cisco.PingTimeout=5&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: &amp;gt;   X-com.cisco.sendAsyncText=Yes&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: &amp;gt;   X-com.cisco.protocol=draft20&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: wrote 48 bytes of PDU header&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: wrote 248 bytes of PDU data&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: socket 1 closed by target&lt;br /&gt;&lt;span style="color: red;"&gt;&lt;strong&gt;.. &amp;gt;&amp;gt; iscsid[17946]: login I/O error, failed to receive a PDU&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: retrying discovery login to 10.143.213.233&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: disconnecting session 0x80b4890, fd 1&lt;br /&gt;.. &amp;gt;&amp;gt; iscsid[17946]: discovery session to 10.143.213.233:446 sleeping for 2 seconds before next login attempt&lt;/pre&gt;&lt;br /&gt;I saw light at the end of the tunnel after trying a simple setup mentioned in &lt;a href="http://www-941.ibm.com/collaboration/wiki/display/LinuxP/iSCSI" target="_blank"&gt;http://www-941.ibm.com/collaboration/wiki/display/LinuxP/iSCSI&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Lets talk about the experience in more detail now.&lt;br /&gt;&lt;h2&gt;&lt;strong&gt;The setup on iscsi target (Openfiler) side..&lt;/strong&gt;&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;[root@openfiler~]# uname -a&lt;br /&gt;Linux openfiler.usdhcp.example.com 2.6.19.4-0.1.x86.i686.cmov #1 ..&lt;/pre&gt;&lt;br /&gt;I did not setup a network or subnet of allowed initiators for LUNs (as&lt;br /&gt;can be seen here that the /etc/initiators.allow and /etc/initiators.deny files are&lt;br /&gt;non-existent):&lt;br /&gt;&lt;pre&gt;[root@openfiler~]# ls /etc/initiators.allow&lt;br /&gt;ls: /etc/initiators.allow: No such file or directory &lt;br /&gt;&lt;br /&gt;[root@openfiler~]# ls /etc/initiators.deny&lt;br /&gt;ls: /etc/initiators.deny: No such file or directory &lt;br /&gt;&lt;br /&gt;[root@openfiler~]# more /etc/ietd.conf&lt;br /&gt;Target iqn.2006-01.com.openfiler:openfiler.testLun0Path=/dev/openfiler/test,Type=fileio&lt;br /&gt;&lt;br /&gt;[root@openfiler~]# service iscsi-target status&lt;br /&gt;ietd (pid 4164) is running...&lt;/pre&gt;&lt;br /&gt;Checking if the device drivers are loaded:&lt;br /&gt;&lt;pre&gt;[root@openfiler~]# lsmod | grep scsi&lt;br /&gt;iscsi_trgt             61788  4&lt;br /&gt;scsi_mod              111756  2 sd_mod,usb_storage&lt;/pre&gt;&lt;br /&gt;Checking if the NAS device is discovered:&lt;br /&gt;&lt;pre&gt;[root@openfiler~]# more /proc/scsi/scsi&lt;br /&gt;Attached devices:&lt;br /&gt;Host: scsi0 Channel: 00 Id: 00 Lun: 00&lt;br /&gt;Vendor: ST332083 Model: 3A               Rev: 3.AA&lt;br /&gt;Type:   Direct-Access                    ANSI SCSI revision: 02&lt;/pre&gt;&lt;br /&gt;Checking what logical volumes have been discovered:&lt;br /&gt;&lt;pre&gt;[root@openfiler~]# cat /proc/net/iet/session&lt;br /&gt;tid:1 name:iqn.2006-01.com.openfiler:openfiler.test&lt;/pre&gt;&lt;br /&gt;Discover the volume groups, logical volumes and physical volumes:&lt;br /&gt;&lt;pre&gt;[root@openfiler~]# vgscan&lt;br /&gt;Reading all physical volumes.  This may take a while...&lt;br /&gt;Found volume group "openfiler" using metadata type lvm2&lt;br /&gt;&lt;br /&gt;[root@openfiler~]# lvscan&lt;br /&gt;ACTIVE            '/dev/openfiler/ocr' [1.00 GB] inherit&lt;br /&gt;ACTIVE            '/dev/openfiler/vote' [1.00 GB] inherit&lt;br /&gt;ACTIVE            '/dev/openfiler/asm' [60.00 GB] inherit&lt;br /&gt;ACTIVE            '/dev/openfiler/test' [32.00 MB] inherit&lt;br /&gt;&lt;br /&gt;[root@openfiler~]# pvscan&lt;br /&gt;PV /dev/sda2   VG openfiler   lvm2 [122.30 GB / 60.27 GB free]&lt;br /&gt;Total: 1 [122.30 GB] / in use: 1 [122.30 GB] / in no VG: 0 [0   ]&lt;/pre&gt;&lt;br /&gt;As you can see, there are actually three more logical volumes that were discovered than&lt;br /&gt;what we have configured in /etc/ietd.conf. We will deal with this later:&lt;br /&gt;&lt;pre&gt;[root@openfiler~]# ls -l /dev/openfiler&lt;br /&gt;total 0&lt;br /&gt;lrwxrwxrwx  1 root root 25 Apr 24 09:58 asm -&amp;gt; /dev/mapper/openfiler-asm&lt;br /&gt;lrwxrwxrwx  1 root root 25 Apr 24 09:58 ocr -&amp;gt; /dev/mapper/openfiler-ocr&lt;br /&gt;lrwxrwxrwx  1 root root 26 Apr 24 12:07 test -&amp;gt; /dev/mapper/openfiler-test&lt;br /&gt;lrwxrwxrwx  1 root root 26 Apr 24 09:59 vote -&amp;gt; /dev/mapper/openfiler-vote&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;The real deal-iscsi Initiator setup using linux-iscsi package on Suse Linux 9.3&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;raclinux1:~ # uname -a&lt;br /&gt;Linux raclinux1 2.6.5-7.244-default #1 Mon Dec 12 18:32:25 UTC 2005 i686 i686 i386 GNU/Linux&lt;/pre&gt;&lt;br /&gt;Make sure the linux-iscsi package is installed:&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # rpm -qa | grep linux-iscsi&lt;br /&gt;linux-iscsi-4.0.1-98&lt;/pre&gt;&lt;br /&gt;Show the discovered iscsi devices as of yet:&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # iscsi-ls&lt;br /&gt;###############################################################################&lt;br /&gt;&lt;br /&gt;iSCSI driver is not loaded&lt;br /&gt;&lt;br /&gt;###############################################################################&lt;/pre&gt;&lt;br /&gt;Since the iscsi driver is missing, Load the iscsi driver (which is also known as the iscsi-Sfnet driver)&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # modprobe iscsi&lt;/pre&gt;&lt;br /&gt;Verify that the iscsi driver was loaded:&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # lsmod | grep scsi&lt;br /&gt;&lt;strong&gt;iscsi                 182192  0&lt;/strong&gt;&lt;br /&gt;scsi_mod              112972  5 iscsi,sg,st,sd_mod,sr_mod&lt;br /&gt;raclinux1:/etc #&lt;/pre&gt;&lt;br /&gt;Check what devices have been configured. Right now, no iscsi devices have been discovered:&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # iscsi-ls&lt;br /&gt;*******************************************************************************&lt;br /&gt;Cisco iSCSI Driver Version ... 4.0.198 ( 21-May-2004 )&lt;br /&gt;*******************************************************************************&lt;br /&gt;raclinux1:/etc #&lt;/pre&gt;&lt;br /&gt;Configure the /etc/iscsi.conf file for linux-iscsi - the most simplistic case -- This is SO the key.&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;&lt;strong&gt;Trivia&lt;/strong&gt;&lt;br /&gt;Initially, I had given port 446 in the DiscoveryAddress too and that was causing a very cryptic 'login I/O error, failed to receive a PDU'  error.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;I had searched all over the internet to resolve this error, including openfiler forums, only to find out that a few people resolved this by doing a firmware upgrade! Unfortunately, there is very little literature on the internet on this error. That is why I hope this article helps someone out there facing the same situation.&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;pre&gt;raclinux1:~ # more /etc/iscsi.conf&lt;br /&gt;# this is the IP of the openfiler iscsi target machine&lt;br /&gt;DiscoveryAddress=10.143.213.233&lt;/pre&gt;&lt;br /&gt;Verify that we have a unique IQN name for the initiator node (SuSE Linux 9.3):&lt;br /&gt;&lt;pre&gt;raclinux1:~ # more /etc/initiatorname.iscsi&lt;br /&gt;## DO NOT EDIT OR REMOVE THIS FILE!&lt;br /&gt;## If you remove this file, the iSCSI daemon will not start.&lt;br /&gt;## If you change the InitiatorName, existing access control lists&lt;br /&gt;## may reject this initiator.  The InitiatorName must be unique&lt;br /&gt;## for each iSCSI initiator.  Do NOT duplicate iSCSI InitiatorNames.&lt;br /&gt;InitiatorName=iqn.1987-05.com.cisco:01.51f06557c68&lt;/pre&gt;&lt;br /&gt;Now, start up &lt;strong&gt;iscsid &lt;/strong&gt;process with a high debug level to see what goes on behind the scenes.&lt;br /&gt;I chose debug level 10 for no particular reason:&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # iscsid -d 10 &amp;amp;&lt;br /&gt;[1] 30332&lt;br /&gt;raclinux1:/etc # 1209056895.780916 &amp;gt;&amp;gt; iscsid[30332]: iSCSI debug level 10&lt;br /&gt;1209056895.781428 &amp;gt;&amp;gt; iscsid[30332]: InitiatorName=iqn.1987-05.com.cisco:01.51f06557c68&lt;br /&gt;1209056895.781790 &amp;gt;&amp;gt; iscsid[30332]: InitiatorAlias=raclinux1&lt;br /&gt;1209056895.782101 &amp;gt;&amp;gt; iscsid[30332]: version 4.0.198 ( 21-May-2004)&lt;br /&gt;1209056895.785327 &amp;gt;&amp;gt; iscsid[30333]: pid file fd 0&lt;br /&gt;1209056895.785694 &amp;gt;&amp;gt; iscsid[30333]: locked pid file /var/run/iscsid.pid&lt;br /&gt;1209056895.795251 &amp;gt;&amp;gt; iscsid[30333]: updating config 0xbfffeb10 from /etc/iscsi.conf&lt;br /&gt;...&lt;br /&gt;....&lt;br /&gt;1209056895.799724 &amp;gt;&amp;gt; iscsid[30334]: sendtargets discovery process 0x80a80c0 starting, address 10.143.213.233:3260, continuous 1&lt;br /&gt;1209056895.800315 &amp;gt;&amp;gt; iscsid[30334]: sendtargets discovery process 0x80a80c0 to 10.143.213.233:3260 using isid 0x00023d0000011209056895.802181 &amp;gt;&amp;gt; iscsid[30334]: connecting to 10.143.213.233:3260&lt;br /&gt;1209056895.803657 &amp;gt;&amp;gt; iscsid[30334]: connected local port 34261 to 10.143.213.233:3260&lt;br /&gt;1209056895.804189 &amp;gt;&amp;gt; iscsid[30334]: discovery session to 10.143.213.233:3260 starting iSCSI login on fd 1&lt;br /&gt;1209056895.805081 &amp;gt;&amp;gt; iscsid[30334]: sending login PDU with current stage 1, next stage 3, transit 0x80, isid 0x00023d000001&lt;br /&gt;1209056895.805415 &amp;gt;&amp;gt; iscsid[30334]: &amp;gt;    InitiatorName=iqn.1987-05.com.cisco:01.51f06557c68&lt;br /&gt;1209056895.805807 &amp;gt;&amp;gt; iscsid[30334]: &amp;gt;    InitiatorAlias=raclinux1&lt;br /&gt;1209056895.806120 &amp;gt;&amp;gt; iscsid[30334]: &amp;gt;    SessionType=Discovery&lt;br /&gt;1209056895.806535 &amp;gt;&amp;gt; iscsid[30334]: &amp;gt;    HeaderDigest=None&lt;br /&gt;1209056895.806918 &amp;gt;&amp;gt; iscsid[30334]: &amp;gt;    DataDigest=None&lt;br /&gt;1209056895.807213 &amp;gt;&amp;gt; iscsid[30334]: &amp;gt;    MaxRecvDataSegmentLength=8192&lt;br /&gt;1209056895.807515 &amp;gt;&amp;gt; iscsid[30334]: &amp;gt;    X-com.cisco.PingTimeout=5&lt;br /&gt;1209056895.807910 &amp;gt;&amp;gt; iscsid[30334]: &amp;gt;    X-com.cisco.sendAsyncText=Yes&lt;br /&gt;1209056895.808217 &amp;gt;&amp;gt; iscsid[30334]: &amp;gt;    X-com.cisco.protocol=draft20&lt;br /&gt;1209056895.808555 &amp;gt;&amp;gt; iscsid[30334]: wrote 48 bytes of PDU header&lt;br /&gt;1209056895.809044 &amp;gt;&amp;gt; iscsid[30334]: wrote 248 bytes of PDU data&lt;br /&gt;1209056895.810896 &amp;gt;&amp;gt; iscsid[30333]: done starting discovery processes&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;1209056895.825881 &amp;gt;&amp;gt; iscsid[30334]: discovery login success to 10.143.213.233&lt;br /&gt;1209056895.800928 &amp;gt;&amp;gt; iscsid[30334]: resolved 10.143.213.233 to 10.4294967183.4294967253.4294967273&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;TargetName=iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;1209056895.831110 &amp;gt;&amp;gt; iscsid[30334]: &amp;gt;    TargetAddress=10.143.213.233:3260,1&lt;br /&gt;1209056895.831416 &amp;gt;&amp;gt; iscsid[30334]: discovery session to 10.143.213.233:3260 received text response, 88 data bytes, ttt 0xffffffff, final 0x80&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;1209056895.849821 &amp;gt;&amp;gt; iscsid[30333]: mkdir /var/lib&lt;br /&gt;1209056895.850134 &amp;gt;&amp;gt; iscsid[30333]: mkdir /var/lib/iscsi&lt;br /&gt;1209056895.850439 &amp;gt;&amp;gt; iscsid[30333]: opened bindings file /var/lib/iscsi/bindings&lt;br /&gt;1209056895.850769 &amp;gt;&amp;gt; iscsid[30333]: locked bindings file /var/lib/iscsi/bindings&lt;br /&gt;1209056895.851143 &amp;gt;&amp;gt; iscsid[30333]: scanning bindings file for 1 unbound sessions&lt;br /&gt;1209056895.851580 &amp;gt;&amp;gt; iscsid[30333]: iSCSI bus 0 target 0 bound to session #1 to iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;1209056895.851906 &amp;gt;&amp;gt; iscsid[30333]: done scanning bindings file at line 11&lt;br /&gt;1209056895.852320 &amp;gt;&amp;gt; iscsid[30333]: unlocked bindings file /var/lib/iscsi/bindings&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Voila! A new virtual disk is discovered!&lt;/h3&gt;&lt;br /&gt;&lt;h2&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/new-iscsi-hardware-found.jpg"&gt;&lt;img alt="" class="alignnone size-full wp-image-78" height="204" src="http://opensourceexperiments.files.wordpress.com/2008/04/new-iscsi-hardware-found.jpg" width="376" /&gt;&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;&lt;h2&gt;Paydirt! The iscsi targets are detected as per messages in /var/log/messages&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;iSCSI: 4.0.188.26 ( 21-May-2004) built for Linux 2.6.5-7.244-default&lt;br /&gt;iSCSI: will translate deferred sense to current sense on disk command responses&lt;br /&gt;iSCSI: control device major number 254 scsi15 : SFNet iSCSI driver&lt;br /&gt;&lt;strong&gt;&lt;span style="color: blue;"&gt;iSCSI:detected HBA host #15 iSCSI:&lt;br /&gt;bus 0 target 0 = iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;iSCSI: bus 0 target 0 portal 0 = address&lt;br /&gt;10.143.213.233 port 3260 group 1iSCSI: bus 0 target 0 established session #1, portal&lt;br /&gt;0, address 10.143.213.233 port 3260 group 1&lt;br /&gt;Vendor: Openfile  Model: Virtual disk      Rev: 0&lt;br /&gt;Type:   Direct-Access                      ANSI SCSI&lt;br /&gt;revision: 04&lt;br /&gt;SCSI device sda: 65536 512-byte hdwr sectors (34 MB)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;iSCSI: starting timer thread at 11948918&lt;br /&gt;iSCSI: bus 0 target 0 trying to establish session to&lt;br /&gt;portal 0, address 10.143.213.233 port 3260 group 1&lt;br /&gt;SCSI device sda: drive cache: write through&lt;br /&gt;sda: unknown partition table&lt;br /&gt;Attached scsi disk sda at scsi15, channel 0, id 0, lun 0&lt;br /&gt;Attached scsi generic sg0 at scsi15, channel 0, id 0, lun 0,  type 0&lt;br /&gt;md: Autodetecting RAID arrays.&lt;br /&gt;md: autorun ...&lt;br /&gt;md: ... autorun DONE.&lt;/pre&gt;&lt;br /&gt;Verifying that the discovery of target LUNs was indeed made:&lt;br /&gt;&lt;pre&gt;raclinux1:~ # more /var/lib/iscsi/bindings&lt;br /&gt;# iSCSI bindings, file format version 1.0.&lt;br /&gt;# NOTE: this file is automatically maintained by the iSCSI daemon.&lt;br /&gt;# You should not need to edit this file under most circumstances.&lt;br /&gt;# If iSCSI targets in this file have been permanently deleted, you&lt;br /&gt;# may wish to delete the bindings for the deleted targets.&lt;br /&gt;#&lt;br /&gt;# Format:&lt;br /&gt;# bus   target  iSCSI&lt;br /&gt;# id    id      TargetName&lt;br /&gt;#&lt;br /&gt;0       0       iqn.2006-01.com.openfiler:openfiler.test&lt;/pre&gt;&lt;br /&gt;Lets restart the linux-iscsi service again (without the debug this time):&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # rciscsi stop&lt;br /&gt;Stopping iSCSI: sync umount sync iscsid&lt;br /&gt;&lt;br /&gt;raclinux1:/etc # rciscsi start&lt;br /&gt;Starting iSCSI: iscsi iscsid fsck/mount     done&lt;br /&gt;&lt;br /&gt;raclinux1:/etc # rciscsi status&lt;br /&gt;Checking for service iSCSI iSCSI driver is loaded&lt;br /&gt;running&lt;/pre&gt;&lt;br /&gt;Check what devices were discovered:&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # iscsi-ls&lt;br /&gt;*******************************************************************************&lt;br /&gt;Cisco iSCSI Driver Version ... 4.0.198 ( 21-May-2004 )&lt;br /&gt;*******************************************************************************&lt;br /&gt;TARGET NAME             : iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;TARGET ALIAS            :&lt;br /&gt;HOST NO                 : 18&lt;br /&gt;BUS NO                  : 0&lt;br /&gt;TARGET ID               : 0&lt;br /&gt;TARGET ADDRESS          : 1.1.3923087114.0:0&lt;br /&gt;SESSION STATUS          : DROPPED AT Thu Apr 24 10:19:16 2008&lt;br /&gt;NO. OF PORTALS          : 1&lt;br /&gt;Segmentation fault&lt;br /&gt;&lt;br /&gt;raclinux1:/etc # fdisk -l /dev/sda&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 33 MB, 33554432 bytes&lt;br /&gt;2 heads, 32 sectors/track, 1024 cylinders&lt;br /&gt;Units = cylinders of 64 * 512 = 32768 bytes&lt;br /&gt;&lt;br /&gt;Disk /dev/sda doesn't contain a valid partition table&lt;/pre&gt;&lt;br /&gt;You can now partition the iscsi device using fdisk:&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # fdisk /dev/sda&lt;br /&gt;Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel&lt;br /&gt;Building a new DOS disklabel. Changes will remain in memory only,&lt;br /&gt;until you decide to write them. After that, of course, the previous&lt;br /&gt;content won't be recoverable.&lt;br /&gt;&lt;br /&gt;Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)&lt;br /&gt;&lt;br /&gt;Command (m for help): n&lt;br /&gt;Command action&lt;br /&gt;e   extended&lt;br /&gt;p   primary partition (1-4)&lt;br /&gt;p&lt;br /&gt;Partition number (1-4): 1&lt;br /&gt;First cylinder (1-1024, default 1):&lt;br /&gt;Using default value 1&lt;br /&gt;Last cylinder or +size or +sizeM or +sizeK (1-1024, default 1024):&lt;br /&gt;Using default value 1024&lt;br /&gt;&lt;br /&gt;Command (m for help): w&lt;br /&gt;The partition table has been altered!&lt;br /&gt;&lt;br /&gt;Calling ioctl() to re-read partition table.&lt;br /&gt;Syncing disks.&lt;br /&gt;raclinux1:/etc #&lt;br /&gt;&lt;br /&gt;raclinux1:/etc # fdisk -l /dev/sda&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 33 MB, 33554432 bytes&lt;br /&gt;2 heads, 32 sectors/track, 1024 cylinders&lt;br /&gt;Units = cylinders of 64 * 512 = 32768 bytes&lt;br /&gt;&lt;br /&gt;Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1               1        1024       32752   83  Linux&lt;br /&gt;&lt;br /&gt;raclinux1:/etc # ls -l /dev/disk&lt;br /&gt;total 132&lt;br /&gt;drwxr-xr-x   4 root root   4096 Apr 10 08:44 .&lt;br /&gt;drwxr-xr-x  33 root root 118784 Apr 24 10:19 ..&lt;br /&gt;drwxr-xr-x   2 root root   4096 Apr 24 10:21 by-id&lt;br /&gt;drwxr-xr-x   2 root root   4096 Apr 24 10:21 by-path&lt;br /&gt;&lt;br /&gt;raclinux1:/etc # ls -l /dev/disk/by-id&lt;br /&gt;total 8&lt;br /&gt;...&lt;br /&gt;.. iscsi-iqn.2006-01.com.openfiler:openfiler.test-0 -&amp;gt; ../../sda&lt;br /&gt;.. iscsi-iqn.2006-01.com.openfiler:openfiler.test-0-generic -&amp;gt; ../../sg0&lt;br /&gt;.. iscsi-iqn.2006-01.com.openfiler:openfiler.test-0p1 -&amp;gt; ../../sda1&lt;br /&gt;&lt;br /&gt;raclinux1:/etc # ls -l /dev/disk/by-path&lt;br /&gt;total 8&lt;br /&gt;.. ip-10.143.213.233-iscsi-iqn.2006-01.com.openfiler:openfiler.test-0 -&amp;gt; ../../sda&lt;br /&gt;.. ip-10.143.213.233-iscsi-iqn.2006-01.com.openfiler:openfiler.test-0-generic -&amp;gt; ../../sg0&lt;br /&gt;.. ip-10.143.213.233-iscsi-iqn.2006-01.com.openfiler:openfiler.test-0p1 -&amp;gt; ../../sda1&lt;br /&gt;...&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;In the meanwhile, lets look at the sessions on openfiler server:&lt;/h3&gt;&lt;br /&gt;&lt;pre&gt;[root@openfiler~]# cat /proc/net/iet/session&lt;br /&gt;tid:1 name:iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;sid:564049469047296 initiator:iqn.1987-05.com.cisco:01.51f06557c68&lt;br /&gt;&lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/0"&gt;cid:0&lt;/a&gt; ip:10.143.213.238 state:active hd:none dd:none&lt;br /&gt;&lt;br /&gt;[root@openfiler~]# more /proc/net/iet/*&lt;br /&gt;::::::::::::::&lt;br /&gt;/proc/net/iet/session&lt;br /&gt;::::::::::::::&lt;br /&gt;tid:1 name:iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;sid:564049469047296 initiator:iqn.1987-05.com.cisco:01.51f06557c68&lt;br /&gt;&lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/0"&gt;cid:0&lt;/a&gt; ip:10.143.213.238 state:active hd:none dd:none&lt;br /&gt;::::::::::::::&lt;br /&gt;/proc/net/iet/session.xml&lt;br /&gt;::::::::::::::&lt;br /&gt;&amp;lt;?xml version="1.0" ?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;info&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target id="1" name="iqn.2006-01.com.openfiler:openfiler.test"&amp;gt;&lt;br /&gt;&amp;lt;session id="564049469047296" initiator="iqn.1987-05.com.cisco:01.51f06557c68"&amp;gt;&lt;br /&gt;&amp;lt;connection id="0" ip="10.143.213.238" state="active" hd="none" dd="none" /&amp;gt;&lt;br /&gt;&amp;lt;/session&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/info&amp;gt;&lt;br /&gt;&lt;br /&gt;::::::::::::::&lt;br /&gt;/proc/net/iet/volume&lt;br /&gt;::::::::::::::&lt;br /&gt;tid:1 name:iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;lun:0 state:0 iotype:fileio iomode:wt &lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/dev/openfiler/test"&gt;path:/dev/openfiler/test&lt;/a&gt;&lt;br /&gt;::::::::::::::&lt;br /&gt;/proc/net/iet/volume.xml&lt;br /&gt;::::::::::::::&lt;br /&gt;&amp;lt;?xml version="1.0" ?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;info&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target id="1" name="iqn.2006-01.com.openfiler:openfiler.test"&amp;gt;&lt;br /&gt;&amp;lt;lun number="0" state= "0"iotype="fileio"iomode="wt" path="/dev/openfiler/test" /&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/info&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Adding all the discovered LUNs to openfiler's published iscsi targets:&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;[root@openfiler~]# more /etc/ietd.conf&lt;br /&gt;Target iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;Lun 0 Path=/dev/openfiler/test,Type=fileio&lt;br /&gt;Targetiqn.2006-01.com.openfiler:openfiler.asm&lt;br /&gt;Lun 1 Path=/dev/openfiler/asm,Type=fileio&lt;br /&gt;Targetiqn.2006-01.com.openfiler:openfiler.ocr&lt;br /&gt;Lun 2 Path=/dev/openfiler/ocr,Type=fileio&lt;br /&gt;Targetiqn.2006-01.com.openfiler:openfiler.vote&lt;br /&gt;Lun 3 Path=/dev/openfiler/vote,Type=fileio&lt;br /&gt;&lt;br /&gt;[root@openfiler~]# service iscsi-target restart&lt;br /&gt;Stopping iSCSI target service:                             [  OK  ]&lt;br /&gt;Starting iSCSI target service:                             [  OK  ]&lt;br /&gt;&lt;br /&gt;[root@openfiler~]# more /proc/net/iet/*&lt;br /&gt;::::::::::::::&lt;br /&gt;/proc/net/iet/session&lt;br /&gt;::::::::::::::&lt;br /&gt;tid:4 name:iqn.2006-01.com.openfiler:openfiler.vote&lt;br /&gt;sid:282574492336640 initiator:iqn.1987-05.com.cisco:01.51f06557c68&lt;br /&gt;&lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/0"&gt;cid:0&lt;/a&gt; ip:10.143.213.238 state:active hd:none dd:none&lt;br /&gt;tid:3 name:iqn.2006-01.com.openfiler:openfiler.ocr&lt;br /&gt;sid:564049469047296 initiator:iqn.1987-05.com.cisco:01.51f06557c68&lt;br /&gt;&lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/0"&gt;cid:0&lt;/a&gt; ip:10.143.213.238 state:active hd:none dd:none&lt;br /&gt;tid:2 name:iqn.2006-01.com.openfiler:openfiler.asm&lt;br /&gt;sid:845524445757952 initiator:iqn.1987-05.com.cisco:01.51f06557c68&lt;br /&gt;&lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/0"&gt;cid:0&lt;/a&gt; ip:10.143.213.238 state:active hd:none dd:none&lt;br /&gt;tid:1 name:iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;sid:1126999422468608 initiator:iqn.1987-05.com.cisco:01.51f06557c68&lt;br /&gt;&lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/0"&gt;cid:0&lt;/a&gt; ip:10.143.213.238 state:active hd:none dd:none&lt;br /&gt;::::::::::::::&lt;br /&gt;/proc/net/iet/session.xml&lt;br /&gt;::::::::::::::&lt;br /&gt;&amp;lt;?xml version="1.0" ?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;info&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target id="4" name="iqn.2006-01.com.openfiler:openfiler.vote"&amp;gt;&lt;br /&gt;&amp;lt;session id="282574492336640" initiator="iqn.1987-05.com.cisco:01.51f06557c68"&amp;gt;&lt;br /&gt;&amp;lt;connection id="0" ip="10.143.213.238" state="active" hd="none" dd="none" /&amp;gt;&lt;br /&gt;&amp;lt;/session&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target id="3" name="iqn.2006-01.com.openfiler:openfiler.ocr"&amp;gt;&lt;br /&gt;&amp;lt;session id="564049469047296" initiator="iqn.1987-05.com.cisco:01.51f06557c68"&amp;gt;&lt;br /&gt;&amp;lt;connection id="0" ip="10.143.213.238" state="active" hd="none" dd="none" /&amp;gt;&lt;br /&gt;&amp;lt;/session&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target id="2" name="iqn.2006-01.com.openfiler:openfiler.asm"&amp;gt;&lt;br /&gt;&amp;lt;session id="845524445757952" initiator="iqn.1987-05.com.cisco:01.51f06557c68"&amp;gt;&lt;br /&gt;&amp;lt;connection id="0" ip="10.143.213.238" state="active" hd="none" dd="none" /&amp;gt;&lt;br /&gt;&amp;lt;/session&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target id="1" name="iqn.2006-01.com.openfiler:openfiler.test"&amp;gt;&lt;br /&gt;&amp;lt;session id="1126999422468608" initiator="iqn.1987-05.com.cisco:01.51f06557c68"&amp;gt;&lt;br /&gt;&amp;lt;connection id="0" ip="10.143.213.238" state="active" hd="none" dd="none" /&amp;gt;&lt;br /&gt;&amp;lt;/session&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/info&amp;gt;&lt;br /&gt;&lt;br /&gt;::::::::::::::&lt;br /&gt;/proc/net/iet/volume&lt;br /&gt;::::::::::::::&lt;br /&gt;tid:4 name:iqn.2006-01.com.openfiler:openfiler.vote&lt;br /&gt;lun:0 state:0 iotype:fileio iomode:wt &lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/dev/openfiler/asm"&gt;path:/dev/openfiler/asm&lt;/a&gt;&lt;br /&gt;tid:3 name:iqn.2006-01.com.openfiler:openfiler.ocr&lt;br /&gt;lun:0 state:0 iotype:fileio iomode:wt &lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/dev/openfiler/asm"&gt;path:/dev/openfiler/asm&lt;/a&gt;&lt;br /&gt;tid:2 name:iqn.2006-01.com.openfiler:openfiler.asm&lt;br /&gt;lun:0 state:0 iotype:fileio iomode:wt &lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/dev/openfiler/asm"&gt;path:/dev/openfiler/asm&lt;/a&gt;&lt;br /&gt;tid:1 name:iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;lun:0 state:0 iotype:fileio iomode:wt &lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/dev/openfiler/test"&gt;path:/dev/openfiler/test&lt;/a&gt;&lt;br /&gt;::::::::::::::&lt;br /&gt;/proc/net/iet/volume.xml&lt;br /&gt;::::::::::::::&lt;br /&gt;&amp;lt;?xml version="1.0" ?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;info&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target id="4" name="iqn.2006-01.com.openfiler:openfiler.vote"&amp;gt;&lt;br /&gt;&amp;lt;lun number="0" state= "0"iotype="fileio"iomode="wt" path="/dev/openfiler/vote" /&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target id="3" name="iqn.2006-01.com.openfiler:openfiler.ocr"&amp;gt;&lt;br /&gt;&amp;lt;lun number="0" state= "0"iotype="fileio"iomode="wt" path="/dev/openfiler/ocr" /&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target id="2" name="iqn.2006-01.com.openfiler:openfiler.asm"&amp;gt;&lt;br /&gt;&amp;lt;lun number="0" state= "0"iotype="fileio"iomode="wt" path="/dev/openfiler/asm" /&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target id="1" name="iqn.2006-01.com.openfiler:openfiler.test"&amp;gt;&lt;br /&gt;&amp;lt;lun number="0" state= "0"iotype="fileio"iomode="wt" path="/dev/openfiler/test" /&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/info&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;In the meanwhile, On the initiator:&lt;/h3&gt;&lt;br /&gt;Now, let us check the devices detected (&lt;em&gt;the iscsi-device command works more reliably&lt;/em&gt;):&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # iscsi-device /dev/sda&lt;br /&gt;/dev/sda: 0   0   0       10.143.213.233   3260  iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;raclinux1:/etc # iscsi-device /dev/sdb&lt;br /&gt;/dev/sdb: 0   1   0       10.143.213.233   3260  iqn.2006-01.com.openfiler:openfiler.asm&lt;br /&gt;raclinux1:/etc # iscsi-device /dev/sdc&lt;br /&gt;/dev/sdc: 0   2   0       10.143.213.233   3260  iqn.2006-01.com.openfiler:openfiler.vote&lt;br /&gt;raclinux1:/etc # iscsi-device /dev/sdd&lt;br /&gt;/dev/sdd: 0   3   0       10.143.213.233   3260  iqn.2006-01.com.openfiler:openfiler.ocr&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # fdisk -l /dev/sd*&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 33 MB, 33554432 bytes&lt;br /&gt;2 heads, 32 sectors/track, 1024 cylinders&lt;br /&gt;Units = cylinders of 64 * 512 = 32768 bytes&lt;br /&gt;&lt;br /&gt;Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1               1        1024       32752   83  Linux&lt;br /&gt;&lt;br /&gt;Disk /dev/sda1: 33 MB, 33538048 bytes&lt;br /&gt;2 heads, 32 sectors/track, 1023 cylinders&lt;br /&gt;Units = cylinders of 64 * 512 = 32768 bytes&lt;br /&gt;&lt;br /&gt;Disk /dev/sdb: 64.4 GB, 64424509440 bytes&lt;br /&gt;64 heads, 32 sectors/track, 61440 cylinders&lt;br /&gt;Units = cylinders of 2048 * 512 = 1048576 bytes&lt;br /&gt;&lt;br /&gt;Disk /dev/sdb doesn't contain a valid partition table&lt;br /&gt;&lt;br /&gt;Disk /dev/sdc: 64.4 GB, 64424509440 bytes&lt;br /&gt;64 heads, 32 sectors/track, 61440 cylinders&lt;br /&gt;Units = cylinders of 2048 * 512 = 1048576 bytes&lt;br /&gt;&lt;br /&gt;Disk /dev/sdc doesn't contain a valid partition table&lt;br /&gt;&lt;br /&gt;Disk /dev/sdd: 64.4 GB, 64424509440 bytes&lt;br /&gt;64 heads, 32 sectors/track, 61440 cylinders&lt;br /&gt;Units = cylinders of 2048 * 512 = 1048576 bytes&lt;br /&gt;&lt;br /&gt;Disk /dev/sdd doesn't contain a valid partition table&lt;br /&gt;&lt;br /&gt;raclinux1:/etc # more /var/lib/iscsi/bindings&lt;br /&gt;# iSCSI bindings, file format version 1.0.&lt;br /&gt;# NOTE: this file is automatically maintained by the iSCSI daemon.&lt;br /&gt;# You should not need to edit this file under most circumstances.&lt;br /&gt;# If iSCSI targets in this file have been permanently deleted, you&lt;br /&gt;# may wish to delete the bindings for the deleted targets.&lt;br /&gt;#&lt;br /&gt;# Format:&lt;br /&gt;# bus   target  iSCSI&lt;br /&gt;# id    id      TargetName&lt;br /&gt;#&lt;br /&gt;0       0       iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;0       1       iqn.2006-01.com.openfiler:openfiler.asm&lt;br /&gt;0       2       iqn.2006-01.com.openfiler:openfiler.vote&lt;br /&gt;0       3       iqn.2006-01.com.openfiler:openfiler.ocr&lt;/pre&gt;&lt;br /&gt;&lt;blockquote&gt;************************************************************************************************&lt;br /&gt;Caveat:&lt;br /&gt;&lt;br /&gt;Somehow, the iscsi-ls utility was not working. However, the devices were accesible all right.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Instead, the &lt;/em&gt;&lt;em&gt;iscsi-device command works beautifully.&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;************************************************************************************************&lt;/blockquote&gt;&lt;br /&gt;&lt;pre&gt;raclinux1:/etc # iscsi-ls&lt;br /&gt;*******************************************************************************&lt;br /&gt;Cisco iSCSI Driver Version ... 4.0.198 ( 21-May-2004 )&lt;br /&gt;*******************************************************************************&lt;br /&gt;TARGET NAME             : iqn.2006-01.com.openfiler:openfiler.test&lt;br /&gt;TARGET ALIAS            :&lt;br /&gt;HOST NO                 : 20&lt;br /&gt;BUS NO                  : 0&lt;br /&gt;TARGET ID               : 0&lt;br /&gt;TARGET ADDRESS          : 1.1.3923087114.0:0&lt;br /&gt;SESSION STATUS          : DROPPED AT Thu Apr 24 10:43:41 2008&lt;br /&gt;NO. OF PORTALS          : 1&lt;br /&gt;&lt;strong&gt;Segmentation fault&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;raclinux1:/etc # echo $?&lt;br /&gt;139&lt;/strong&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Conclusion..&lt;/h2&gt;&lt;br /&gt;This proves that linux-iscsi package can be made to work on 2.6.5-7.x distributions or for any other linux distribution less than 2.6.14. So if open-iscsi was not meant to compile on your distribution, do not despair. There are other avenues. This article also serves to demonstrate how to use the command line interface of the openfiler product better, as compared to the GUI console.&lt;br /&gt;&lt;br /&gt;It also professes that there are some caveats in openfiler, but if we know our way around them, life is good.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-4189830088346478456?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/4189830088346478456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/birds-eye-view-of-end-configuration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/4189830088346478456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/4189830088346478456'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/birds-eye-view-of-end-configuration.html' title='Case Study: How to discover iscsi targets with linux-iscsi initiator package -- Suse linux 9 (scsi Initiator) and openfiler (scsi target)'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-5370017152510447862</id><published>2008-04-25T07:20:00.000-04:00</published><updated>2010-12-30T22:41:34.285-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='external hard disk'/><category scheme='http://www.blogger.com/atom/ns#' term='detect'/><category scheme='http://www.blogger.com/atom/ns#' term='USB device'/><category scheme='http://www.blogger.com/atom/ns#' term='USB external hard disk'/><category scheme='http://www.blogger.com/atom/ns#' term='fdisk -l'/><category scheme='http://www.blogger.com/atom/ns#' term='/var/log/messages'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='windows host'/><category scheme='http://www.blogger.com/atom/ns#' term='enabled'/><category scheme='http://www.blogger.com/atom/ns#' term='scsi'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='/dev/sda'/><category scheme='http://www.blogger.com/atom/ns#' term='network attached storage'/><category scheme='http://www.blogger.com/atom/ns#' term='openfiler'/><category scheme='http://www.blogger.com/atom/ns#' term='virtual machine'/><title type='text'>Virtualbox How to: Gotchas involved in making a USB external hard disk
device work on windows host</title><content type='html'>&lt;h2&gt;&lt;strong&gt;Preface&lt;/strong&gt;&lt;/h2&gt;&lt;br/&gt;Sometime back, I installed Openfiler on a external hard disk (manufacturer: Iomega)that I had at home (running Windows Vista Home Premium). This was meant to be a proof of concept and pretty soon, I had to bring it to office desktop (running Windows XP SP2) to make it work with some other virtualbox virtual machines that I had built in my spare time.&lt;br/&gt;&lt;h2&gt;&lt;strong&gt;Troubles in recognizing the USB external hard disk on windows XP&lt;br/&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;br/&gt;However, the problem that I faced on Windows XP SP2 host operating system was that the openfiler Virtual machine (using virtualbox 1.5.6 of course) would not recognize the USB external hard disk at all! The same USB device was working fine on windows vista.&lt;br/&gt;&lt;br/&gt;After struggling with this problem for a while, I found a quick workaround (Not sure if it is documented in the user manual or not) and also tested some reset steps on windows, which seem to work with the Iomega external USB hard disk.&lt;br/&gt;&lt;br/&gt;These steps should also be relevant to other hard disk models in general.&lt;br/&gt;&lt;h2&gt;&lt;strong&gt;Some more details...&lt;/strong&gt;&lt;/h2&gt;&lt;br/&gt;In my case, windows had detected the USB drive and had even installed the Virtualbox driver for it. USB support was enabled for the openfiler virtual machine in the settings. The external hard disk was selected, but still no iscsi drive showed up on doing a fdisk -l&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;&lt;strong&gt;When to know a device is being accessed..&lt;/strong&gt;&lt;/em&gt;&lt;br/&gt;&lt;br/&gt;&lt;em&gt;Well, if the device makes a whirring noise and the light blinks or comes on, it is enough to know that the device is being accessed internally and something good happened in terms of making the USB device work.&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;h2&gt;&lt;strong&gt;The setup that worked..&lt;/strong&gt;&lt;/h2&gt;&lt;br/&gt;However, this setup worked after a little tinkering:&lt;br/&gt;&lt;br/&gt;Firstly, make sure the USB controller and EHCI controller is enabled. Then choose the USB external hard disk device from the list of all USB devices and enabled it.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/usb-device-setup-for-openfiler-vm-which-did-not-work-out-of-the-box.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/usb-device-setup-for-openfiler-vm-which-did-not-work-out-of-the-box.jpg"&gt;&lt;img class="alignnone size-full wp-image-68" src="http://opensourceexperiments.files.wordpress.com/2008/04/usb-device-setup-for-openfiler-vm-which-did-not-work-out-of-the-box.jpg" alt="" width="468" height="504" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Make sure &lt;em&gt;&lt;strong&gt;no other&lt;/strong&gt;&lt;/em&gt; Virtual machine is accessing the same USB device. From what I have seen, if the same device is accessed by other virtualbox VMs, an exclusive lock is acquired on it, which makes it difficult to be used by other virtual machines.&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;This is true with windows too. Windows will stop seeing the USB hard disk when it is being used by a virtualbox virtual machine. At least, I have seen this behaviour with virtualbox 1.5.6&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/make-sure-other-vms-are-not-using-the-same-usb-drive.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/make-sure-other-vms-are-not-using-the-same-usb-drive.jpg"&gt;&lt;img class="alignnone size-full wp-image-69" src="http://opensourceexperiments.files.wordpress.com/2008/04/make-sure-other-vms-are-not-using-the-same-usb-drive.jpg" alt="" width="467" height="349" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Make sure that Windows is able to detect the USB device first. If not, then you need to troubleshoot that first. Usually, powering off the device, unplugging it from the USB port and restarting the windows PC/desktop/laptop works great. (Hey, its windows).&lt;br/&gt;&lt;br/&gt;You want to see something like this in your system tray to be sure of this.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/windows-detects-usb-drive.jpg"&gt;&lt;img class="alignnone size-full wp-image-70" src="http://opensourceexperiments.files.wordpress.com/2008/04/windows-detects-usb-drive.jpg" alt="" width="329" height="29" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Now you know for a fact that windows, your guest Operating system, detected the USB drive fine. So now, there is a good chance that virtualbox will detect it too.&lt;br/&gt;&lt;h2&gt;&lt;strong&gt;Fire it up..&lt;/strong&gt;&lt;/h2&gt;&lt;br/&gt;Power up the virtual machine and check if the USB device got detected. A simple fdisk -l will show it as a iscsi device, with names like /dev/sda, /dev/sdb or so. If you do not see anything of the sort, you can be certain that the device did not get detected. Another visual way to know is to see if the light on USB device comes up or not. No light, no access.&lt;br/&gt;&lt;h2&gt;&lt;strong&gt;The manual workaround if the device is still now seen after powering up the virtual machine ..&lt;/strong&gt;&lt;/h2&gt;&lt;br/&gt;However, there is still another trick up our sleeve that can be tried.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/right-click-on-usb-icon-at-bottom.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/right-click-on-usb-icon-at-bottom.jpg"&gt;&lt;img class="alignnone size-full wp-image-72" src="http://opensourceexperiments.files.wordpress.com/2008/04/right-click-on-usb-icon-at-bottom.jpg" alt="" width="467" height="83" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;At the bottom message bar of the virtual machine, right click on the USB plug icon. You will see that a list of the detected USB devices comes up. Select the external hard disk. Unless another virtual machine is running that is using the same USB device, there is a very good chance that the light on the hard disk will light up like this:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/the-usb-hard-disk-lights-up.jpg"&gt;&lt;img class="alignnone size-full wp-image-71" src="http://opensourceexperiments.files.wordpress.com/2008/04/the-usb-hard-disk-lights-up.jpg" alt="" width="468" height="374" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;At this point, you may also see a windows dialog box saying that a virtualbox USB device was detected and the driver needs to be loaded:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/virtualbox-usb-device-driver.jpg"&gt;&lt;img class="alignnone size-full wp-image-76" src="http://opensourceexperiments.files.wordpress.com/2008/04/virtualbox-usb-device-driver.jpg" alt="" width="468" height="364" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;h2&gt;&lt;strong&gt;Double check before you congratulate yourself..&lt;br/&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;br/&gt;All right! So it looks like your device got accessed after all.&lt;br/&gt;&lt;br/&gt;There are many ways to confirm if it really got detected by the virtual machine as a scsi device or not:&lt;br/&gt;&lt;br/&gt;1) Check the &lt;strong&gt;fdisk -l &lt;/strong&gt;command's output:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/fdisk-output-confirmation.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/fdisk-output-confirmation.jpg"&gt;&lt;img class="alignnone size-full wp-image-73" src="http://opensourceexperiments.files.wordpress.com/2008/04/fdisk-output-confirmation.jpg" alt="" width="468" height="306" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;2) Check the contents of &lt;strong&gt;/proc/scsi/scsi&lt;/strong&gt; file:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/proc-scsi-scsi-output.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/proc-scsi-scsi-output.jpg"&gt;&lt;img class="alignnone size-full wp-image-74" src="http://opensourceexperiments.files.wordpress.com/2008/04/proc-scsi-scsi-output.jpg" alt="" width="468" height="62" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;3) Check the content of &lt;strong&gt;/var/log/messages &lt;/strong&gt;or the output of &lt;strong&gt;dmesg &lt;/strong&gt;command:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/var-log-messages.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/var-log-messages.jpg"&gt;&lt;img class="alignnone size-full wp-image-75" src="http://opensourceexperiments.files.wordpress.com/2008/04/var-log-messages.jpg" alt="" width="468" height="308" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;h2&gt;&lt;strong&gt;A quick Recap...&lt;/strong&gt;&lt;/h2&gt;&lt;br/&gt;Once again, if this does not work, just go back to the basics:&lt;br/&gt;&lt;br/&gt;1) Power off the USB device (when applicable) and take it out&lt;br/&gt;&lt;br/&gt;2) Reboot windows&lt;br/&gt;&lt;br/&gt;3) Plug in the USB device&lt;br/&gt;&lt;br/&gt;4) Make sure windows detects it&lt;br/&gt;&lt;br/&gt;5) Make sure the virtual machine has the USB device enabled in its setup&lt;br/&gt;&lt;br/&gt;6) Start up the virtual machine. Make sure no other virtual machine is using the same USB drive.&lt;br/&gt;&lt;br/&gt;7) If you do not see the USB device, force it to be attached by right click on USB plug icon in bottom bar of virtualbox VM application window&lt;br/&gt;&lt;br/&gt;Hope that helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-5370017152510447862?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/5370017152510447862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/virtualbox-how-to-gotchas-involved-in.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/5370017152510447862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/5370017152510447862'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/virtualbox-how-to-gotchas-involved-in.html' title='Virtualbox How to: Gotchas involved in making a USB external hard disk&#xA;device work on windows host'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-2839568449453786655</id><published>2008-04-21T06:25:00.000-04:00</published><updated>2010-12-30T22:41:34.207-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='external hard disk'/><category scheme='http://www.blogger.com/atom/ns#' term='initiator'/><category scheme='http://www.blogger.com/atom/ns#' term='SAN'/><category scheme='http://www.blogger.com/atom/ns#' term='windows host'/><category scheme='http://www.blogger.com/atom/ns#' term='session'/><category scheme='http://www.blogger.com/atom/ns#' term='usb'/><category scheme='http://www.blogger.com/atom/ns#' term='host only networking'/><category scheme='http://www.blogger.com/atom/ns#' term='open-iscsi'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='node'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='network attached storage'/><category scheme='http://www.blogger.com/atom/ns#' term='openfiler'/><category scheme='http://www.blogger.com/atom/ns#' term='virtual machine'/><category scheme='http://www.blogger.com/atom/ns#' term='target'/><title type='text'>Combining Openfiler and Virtualbox (Ubuntu guest OS on windows host)</title><content type='html'>&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;Preface - Celebrating Openfiler&lt;/span&gt;&lt;/h2&gt;&lt;br/&gt;Ever since I came to know about &lt;a href="http://www.openfiler.com" target="_blank"&gt;openfiler,&lt;/a&gt; a free open source network attached storage appliance, I could not wait to get started on it! Compared to similar open source products in the internet like &lt;a href="http://www.freenas.org/" target="_blank"&gt;FreeNAS&lt;/a&gt;, openfiler has much better reviews from the user community.&lt;br/&gt;&lt;br/&gt;In this article, we will talk about how we can leverage openfiler along with an Ubuntu virtual machine running on windows host. The fact that the virtual machine is running on windows is immaterial, as most of the material covered in this article will deal with making openfiler shared devices work with a unix distribution, namely Ubuntu, in our case. The steps discussed should  not be largely different for any other unix operating system.&lt;br/&gt;&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;The ingredients&lt;/span&gt;&lt;/h2&gt;&lt;br/&gt;One of the main ingredients for doing this setup is to know about how to make host only networking work in &lt;a href="http://www.virtualbox.org" target="_blank"&gt;Virtualbox.&lt;/a&gt; For this, I will recommend you to go through the article &lt;a href="../2008/04/18/virtualbox-case-study-making-host-only-networking-work-between-two-ubuntu-guest-os-virtual-machine-on-windows-vista-host/"&gt;Virtualbox Case Study: Making host only networking work between two Ubuntu Guest OS (virtual machine) on Windows Vista host,&lt;/a&gt; that was posted just before this one. It has detailed steps as to how two virtual machines can be made to talk to each other, with internet working too.&lt;a href="../2008/04/18/virtualbox-case-study-making-host-only-networking-work-between-two-ubuntu-guest-os-virtual-machine-on-windows-vista-host/"&gt;&lt;br/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;So, going along with this idea, you need to do host only networking between a Unix virtual machine and an openfiler installation virtual machine. For installing openfiler, detailed how to graphical instructions are available at &lt;a href="http://openfiler.com/learn/how-to/graphical-installation" target="_blank"&gt;http://openfiler.com/learn/how-to/graphical-installation. &lt;/a&gt;If you are a text person, consider going through the text instructions at &lt;a href="http://openfiler.com/learn/how-to/text-based-installation" target="_blank"&gt;http://openfiler.com/learn/how-to/text-based-installation&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;The other important ingredient that we need is an external USB hard disk to attach with the openfiler virtual machine like this:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/enable-usb-driver-support.jpg" target="_blank"&gt;click here for a bigger picture&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/enable-usb-driver-support.jpg"&gt;&lt;img class="alignnone size-full wp-image-59" src="http://opensourceexperiments.files.wordpress.com/2008/04/enable-usb-driver-support.jpg" alt="" width="445" height="467" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;blockquote&gt;I discovered that after the openfiler virtual machine booted up, windows vista premium home edition was not able to discover the USB hard disk in explorer. After I shutdown openfiler virtual machine, windows would detect the USB external drive.&lt;/blockquote&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/windows-discovers-the-usb-drive.jpg"&gt;&lt;img class="alignnone size-full wp-image-58" src="http://opensourceexperiments.files.wordpress.com/2008/04/windows-discovers-the-usb-drive.jpg" alt="windows-discovers-the-usb-drive" width="332" height="450" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;blockquote&gt;I also noticed was that if I specified the USB mouse device in the virtualbox USB devices setup of the unix machine, it was not able to access it! (The touchpad was still working though). So eventually, I just unchecked the USB mouse device for Ubuntu virtual machine and everything was ok.&lt;/blockquote&gt;&lt;br/&gt;&lt;em&gt;&lt;span style="text-decoration:underline;"&gt;The Openfiler Virtualbox VM setup example&lt;/span&gt;&lt;/em&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/openfiler-vm-setup.jpg" target="_blank"&gt;Click here to see a bigger picture&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/openfiler-vm-setup.jpg"&gt;&lt;img class="alignnone size-full wp-image-54" src="http://opensourceexperiments.files.wordpress.com/2008/04/openfiler-vm-setup.jpg?w=468" alt="" width="468" height="375" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;em&gt;&lt;span style="text-decoration:underline;"&gt;The Ubuntu unix Virtualbox VM setup example&lt;/span&gt;&lt;/em&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/gutsy2-vm-setup.jpg" target="_blank"&gt;Click here to see a bigger picture&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/gutsy2-vm-setup.jpg"&gt;&lt;img class="alignnone size-full wp-image-55" src="http://opensourceexperiments.files.wordpress.com/2008/04/gutsy2-vm-setup.jpg?w=468" alt="" width="468" height="372" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;After the openfiler installation, you can see that it installs a linux 2.6.x OS, which can be brought up like any other linux installation.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/openfiler-boot.jpg"&gt;&lt;img class="alignnone size-full wp-image-60" src="http://opensourceexperiments.files.wordpress.com/2008/04/openfiler-boot.jpg?w=468" alt="" width="468" height="306" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Once you boot up the operating system, you can invoke the web administration GUI tool using http://&amp;lt;IP of openfiler server&amp;gt;:446 like this (openfiler/password is the default login):&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/openfiler-console.jpg" target="_blank"&gt;Click here for a bigger picture&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/openfiler-console.jpg"&gt;&lt;img class="alignnone size-full wp-image-57" src="http://opensourceexperiments.files.wordpress.com/2008/04/openfiler-console.jpg?w=468" alt="" width="468" height="162" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;A Caveat if you do not want to use the entire external USB drive as network attached storage&lt;br/&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br/&gt;Since I could not afford to dedicate my entire 300GB USB external drive for this experiment, I had to find a way of working with a part of it. Thankfully, with the help of &lt;a href="http://gparted.sourceforge.net/livecd.php" target="_blank"&gt;gparted live CD&lt;/a&gt;, I was able to resize the FAT32/NTFS windows partition in external drive to 175G and created another partition of 125G with the remaining space. If you have never used gparted (GNOME partition editor), I must tell you that you simply have to try it. It is free, its versatile and its simply amazing.&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;Please note here that I DID NOT format the 125G partition as ext3 or any other format. This was important since the openfiler was not able to see the second physical volume in the USB drive otherwise as a iSCSI device otherwise.&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;Once this was done, I found that the openfiler administrator GUI was having a hard time creating a physical volume and a volume group based on the second partition carved in USB drive.&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;It seems that the GUI assumes that the entire attached drive should be available for its manipulations.&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;To get around this problem, I had to use the command line interface commands, which was good in a way, as I was able to learn many useful commands that are employed by the pretty front end. Using fdisk -l, it could be seen that the USB external drive was discovered as /dev/sda by openfiler OS.&lt;br/&gt;&lt;pre&gt;# pvcreate /dev/sda2&lt;br/&gt;Physical volume "/dev/sda2" successfully created&lt;/pre&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/partitions-in-sda.jpg" target="_blank"&gt;Click here for the bigger picture&lt;/a&gt;&lt;br/&gt;&lt;pre&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/partitions-in-sda.jpg"&gt;&lt;img class="alignnone size-full wp-image-61" src="http://opensourceexperiments.files.wordpress.com/2008/04/partitions-in-sda.jpg?w=468" alt="" width="468" height="182" /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;&lt;br/&gt;Let it be understood that after any changes on openfiler, it is required to restart the iSCSI service. This can be done either by "&lt;strong&gt;# service iscsi-target restart"&lt;/strong&gt; command or from the GUI: &lt;strong&gt;Services-&amp;gt;Enable/Disable &lt;/strong&gt;(Disable and Enable the iSCSI service forcibly to achieve the same result).&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;pre&gt;# vgcreate openfiler /dev/sda2&lt;br/&gt;Volume group "vg" successfully created&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/volume-group-management.jpg" target="_blank"&gt;Click here for a bigger picture (note that the Web UI &lt;/a&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/volume-group-management.jpg" target="_blank"&gt;does not show the PVs yet, but its still OK)&lt;/a&gt;&lt;/pre&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/volume-group-management.jpg"&gt;&lt;img class="alignnone size-full wp-image-62" src="http://opensourceexperiments.files.wordpress.com/2008/04/volume-group-management.jpg?w=468" alt="" width="468" height="131" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;After this, we need to create the logical volumes. Another weird thing I noticed was that if I used the lvcreate commane line interface to create logical volumes, they were not showing up in the web admin utility, even after restarting the iSCSI server on openfiler OS.&lt;br/&gt;&lt;br/&gt;So I created three of them from the web administration utility (Hey, whatever works):&lt;br/&gt;&lt;br/&gt;/dev/openfiler/ocr&lt;br/&gt;/dev/openfiler/vote&lt;br/&gt;/dev/openfiler/asm&lt;br/&gt;&lt;br/&gt;This is how the web GUI showed them now:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/logical-volumes.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/logical-volumes.jpg"&gt;&lt;img class="alignnone size-full wp-image-63" src="http://opensourceexperiments.files.wordpress.com/2008/04/logical-volumes.jpg?w=468" alt="" width="468" height="259" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The openfiler:/etc/ietd.conf file now has contents like this:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/ietdconf-content.jpg"&gt;&lt;img class="alignnone size-full wp-image-64" src="http://opensourceexperiments.files.wordpress.com/2008/04/ietdconf-content.jpg" alt="" width="462" height="383" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;h3&gt;Defining Local networks&lt;/h3&gt;&lt;br/&gt;Be informed that another variation here is to define a local network consisting of IP subnet, which would essentially decide which machines can be allowed to discover the LUNs in network attached storage. Using the GUI, this is achieved through &lt;strong&gt;General-&amp;gt;Local Networks&lt;/strong&gt;.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/local-network-gui.jpg"&gt;&lt;img class="alignnone size-full wp-image-65" src="http://opensourceexperiments.files.wordpress.com/2008/04/local-network-gui.jpg?w=468" alt="" width="468" height="139" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Subsequently, you need can control allow/deny access to each logical volume from the GUI by updating the property of respective logical volumes (be aware that this creates &lt;strong&gt;/etc/initiators.allow &lt;/strong&gt;and &lt;strong&gt;/etc/initiators.deny&lt;/strong&gt; files in the openfiler OS):&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/update-local-network-for-each-lv.jpg" target="_blank"&gt;Click here for a bigger view&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/update-local-network-for-each-lv.jpg"&gt;&lt;img class="alignnone size-full wp-image-66" src="http://opensourceexperiments.files.wordpress.com/2008/04/update-local-network-for-each-lv.jpg?w=468" alt="" width="468" height="386" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;I did not use any local networks, as I got burnt by giving an incorrect subnet and that was causing the discovery of LUNs to not work from ubuntu VM. So I just kept it plain and simple by allowing any machine in the LAN to discover the LUNs.&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;h2&gt;CHAP authentication&lt;/h2&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;There is also something called CHAP authentication (the username and passwords can be set using the iscsiadm command) to further qualify iscsi initiator/target LUN discovery. This is a topic that I have not explored fully at this point, so I did not enable incoming/outgoing CHAP authentication either in openfiler OS (iSCSI target) or the ubuntu virtual machine (iSCSI initiator).&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;This was another aspect of open-iscsi that burnt me while trying to discover target LUNs from ubuntu VM, so I just steered clear of it, for the time being.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;&lt;em&gt;There is a &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;fantastic &lt;/strong&gt;&lt;/span&gt;How to on how to configure open-iscsi using CHAP authentication at &lt;a href="http://en.opensuse.org/Open-iSCSI_and_SUSE_Linux" target="_blank"&gt;http://en.opensuse.org/Open-iSCSI_and_SUSE_Linux&lt;/a&gt;. I would strongly recommend you to read and digest it.&lt;/em&gt;&lt;/p&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;h2&gt;Understanding how LUN discovery works with open-iscsi&lt;/h2&gt;&lt;br/&gt;&lt;a href="http://www.open-iscsi.org/" target="_blank"&gt;open-iscsi &lt;/a&gt;is a robust, well performing implementation of iSCSI device package that is very much in vogue and is being adopted by various unix flavours.&lt;br/&gt;&lt;br/&gt;It runs a daemon in the background called &lt;strong&gt;iscsid&lt;/strong&gt;. Open-iSCSI utility keeps a persistent configuration of target LUNs and initiator nodes in a database. The &lt;strong&gt;iscsiadm &lt;/strong&gt;utility is a command-line tool to manage (update, delete, insert, query) the persistent database.&lt;br/&gt;&lt;br/&gt;The database contains two tables:&lt;br/&gt;&lt;br/&gt;- Discovery table (/etc/iscsi/send_targets);&lt;br/&gt;- Node table (/etc/iscsi/nodes).&lt;br/&gt;&lt;br/&gt;You can install the open-iscsi package using either &lt;em&gt;Synaptic package manager&lt;/em&gt; or "sudo apt-get install open-iscsi" command in Ubuntu. For my case, the apt-get command was somehow not able to to refer to ubuntu repositories, but thankfully &lt;em&gt;Synaptic package manager&lt;/em&gt; worked fine.&lt;br/&gt;&lt;br/&gt;open-iscsi works on a client server model. Initiators like the Ubuntu virtual machine will send discovery requests to SCSI targets and access them by creating login sessions. Till the duration of the session, the initiator can access the discovered targets (LUNs). Simply put, that is it.&lt;br/&gt;&lt;br/&gt;This can be made a little complicated by adding CHAP authentication into the mix.&lt;br/&gt;&lt;br/&gt;Each Initiator has a unique name, which can be got by checking the contents of /etc/iscsi/initiatorname.iscsi:&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo more /etc/iscsi/initiatorname.iscsi&lt;br/&gt;## DO NOT EDIT OR REMOVE THIS FILE!&lt;br/&gt;## If you remove this file, the iSCSI daemon will not start.&lt;br/&gt;## If you change the InitiatorName, existing access control lists&lt;br/&gt;## may reject this initiator.  The InitiatorName must be unique&lt;br/&gt;## for each iSCSI initiator.  Do NOT duplicate iSCSI InitiatorNames.&lt;br/&gt;&lt;strong&gt;InitiatorName=iqn.1993-08.org.debian:01:8211251a31ff&lt;br/&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;Making iscsi work&lt;/h2&gt;&lt;br/&gt;After installation of open-iscsi, I made sure that /etc/iscsi/iscsid.conf had the defaults configured, without CHAP authentication. The defaults for the rest are usually ok, which is what I went along with. After any changes, its important to restart open-iscsi service:&lt;br/&gt;&lt;br/&gt;# sudo /etc/init.d/open-iscsi restart&lt;br/&gt;&lt;br/&gt;I also disabled CHAP authentication (both incoming and outgoing users) for each logical volume from the openfiler GUI administrator utility.&lt;br/&gt;&lt;blockquote&gt;The IP of openfiler VM was 192.168.0.6 and that Ubuntu VM was 192.168.0.4&lt;/blockquote&gt;&lt;br/&gt;&lt;h3&gt;Some initial problems..&lt;/h3&gt;&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m discovery -t&lt;br/&gt;st -p 192.168.0.6&lt;span style="color:#ff0000;"&gt;&lt;br/&gt;iscsiadm: Login failed to authenticate with target&lt;/span&gt;&lt;br/&gt;&lt;span style="color:#ff0000;"&gt;iscsiadm: discovery login to 192.168.0.6 rejected:&lt;br/&gt;initiator error (02/01), non-retryable, giving up&lt;/span&gt;&lt;/pre&gt;&lt;br/&gt;To debug this, we can use the &lt;strong&gt;-d switch:&lt;/strong&gt;&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m discovery -d -t st -p 192.168.0.6&lt;/pre&gt;&lt;br/&gt;discovery.startup = manual&lt;br/&gt;discovery.type = sendtargets&lt;br/&gt;discovery.sendtargets.address = 192.168.0.6&lt;br/&gt;discovery.sendtargets.port = 3260&lt;br/&gt;&lt;span style="color:#ff0000;"&gt;discovery.sendtargets.auth.authmethod = None&lt;/span&gt;&lt;br/&gt;&lt;span style="color:#ff0000;"&gt;discovery.sendtargets.auth.username = gverma&lt;br/&gt;discovery.sendtargets.auth.password = ********&lt;/span&gt;&lt;br/&gt;&lt;span style="color:#ff0000;"&gt;discovery.sendtargets.auth.username_in = &amp;lt;empty&amp;gt;&lt;br/&gt;discovery.sendtargets.auth.password_in = &amp;lt;empty&amp;gt;&lt;/span&gt;&lt;br/&gt;discovery.sendtargets.timeo.login_timeout = 15&lt;br/&gt;discovery.sendtargets.reopen_max = 5&lt;br/&gt;discovery.sendtargets.timeo.auth_timeout = 45&lt;br/&gt;discovery.sendtargets.timeo.active_timeout = 30&lt;br/&gt;discovery.sendtargets.timeo.idle_timeout = 60&lt;br/&gt;discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768&lt;br/&gt;&lt;br/&gt;It seemed that some sort of authentication was still being used. To overcome this issue, I commented CHAP authentication for all discovery modes in /etc/iscsi/iscsid.conf and restarted open-iscsi service.&lt;br/&gt;&lt;br/&gt;Then we needed to discover the targets on 192.168.0.6 (openfiler VM):&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m discovery&lt;br/&gt;-t st -p 192.168.0.6&lt;br/&gt;192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.asm&lt;br/&gt;192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.ocr&lt;br/&gt;192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.vote&lt;/pre&gt;&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m discovery&lt;br/&gt;192.168.0.6:3260 via sendtargets&lt;/pre&gt;&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m node&lt;br/&gt;192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.ocr&lt;br/&gt;192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.vote&lt;br/&gt;192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.asm&lt;/pre&gt;&lt;br/&gt;Now that the targets from Ubuntu node were discovered, it was needed to login to each of them:&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m node&lt;br/&gt;-T iqn.2006-01.com.openfiler:openfiler.ocr -p 192.168.0.6 -l&lt;/pre&gt;&lt;br/&gt;&lt;pre&gt;&lt;span style="color:#ff0000;"&gt;Login session [iface: default, target: iqn.2006-01.com.openfiler:openfiler.ocr,&lt;br/&gt;portal: 192.168.0.6,3260]&lt;/span&gt;&lt;br/&gt;&lt;span style="color:#ff0000;"&gt;iscsiadm: initiator reported error (5 - encountered iSCSI login failure)&lt;/span&gt;&lt;br/&gt;&lt;span style="color:#ff0000;"&gt;iscsiadm: Could not execute operation on all records. Err 107.&lt;/span&gt;&lt;/pre&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;This error was because I had setup a local network for qualifying initiators to connect to LUNs and has basically given a wrong subnet in the openfiler setup. When I removed the local network from openfiler setup, removed openfiler:/etc/initiators.allow and /etc/initiators.deny files,  and restarted ietd service, the command went through.&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;Now, we can also setup the target LUNs to startup/attach automatically on iscsi service restart on initiator (this will make the LUNs visible from the iscsi initiator by creating a session to the iscsi target). This can be done by influencing the node.startup property value to automatic in the iscsid database:&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m node \&lt;br/&gt;-T iqn.2006-01.com.openfiler:openfiler.ocr -p 192.168.0.6 \&lt;br/&gt;--op update -n node.startup -v automatic&lt;br/&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m node \&lt;br/&gt;-T iqn.2006-01.com.openfiler:openfiler.vote -p 192.168.0.6 \&lt;br/&gt;--op update -n node.startup -v automatic&lt;br/&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m node \&lt;br/&gt;-T iqn.2006-01.com.openfiler:openfiler.asm -p 192.168.0.6 \&lt;br/&gt;--op update -n node.startup -v automatic&lt;/pre&gt;&lt;br/&gt;Now, when we restart the open-iscsi service, it can be seen that the targets LUNs are attaching to the initiator:&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo /etc/init.d/open-iscsi restart&lt;br/&gt;* Disconnecting iSCSI targets                                                                                         [ OK ]&lt;br/&gt;* Stopping iSCSI initiator service                                                                                    [ OK ]&lt;br/&gt;* Starting iSCSI initiator service iscsid                                                                             [ OK ]&lt;br/&gt;* Setting up iSCSI targets&lt;br/&gt;Login session [iface: default, target: iqn.2006-01.com.openfiler:openfiler.ocr,&lt;br/&gt;portal: 192.168.0.6,3260]&lt;br/&gt;Login session [iface: default, target: iqn.2006-01.com.openfiler:openfiler.vote,&lt;br/&gt;portal: 192.168.0.6,3260]&lt;br/&gt;Login session [iface: default, target: iqn.2006-01.com.openfiler:openfiler.asm,&lt;br/&gt;portal: 192.168.0.6,3260]                                                                                               [ OK ]&lt;/pre&gt;&lt;br/&gt;You can verify the login sessions with this command:&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m session&lt;br/&gt;tcp: [4] 192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.ocr&lt;br/&gt;tcp: [5] 192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.vote&lt;br/&gt;tcp: [6] 192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.asm&lt;/pre&gt;&lt;br/&gt;If you logout, the sessions wont be visible anymore:&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m node \&lt;br/&gt;-T iqn.2006-01.com.openfiler:openfiler.asm -p 192.168.0.6 --logout&lt;br/&gt;Logout session [sid: 1, target: iqn.2006-01.com.openfiler:openfiler.ocr,&lt;br/&gt;portal: 192.168.0.6,3260]&lt;br/&gt;Logout session [sid: 2, target: iqn.2006-01.com.openfiler:openfiler.vote,&lt;br/&gt;portal: 192.168.0.6,3260]&lt;br/&gt;Logout session [sid: 3, target: iqn.2006-01.com.openfiler:openfiler.asm,&lt;br/&gt;portal: 192.168.0.6,3260]&lt;br/&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m session&lt;br/&gt;iscsiadm: No active sessions.&lt;/pre&gt;&lt;br/&gt;You can login back again now:&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m node \&lt;br/&gt;-T iqn.2006-01.com.openfiler:openfiler.asm -p 192.168.0.6 --login&lt;br/&gt;Login session [iface: default, target: iqn.2006-01.com.openfiler:openfiler.ocr,&lt;br/&gt;portal: 192.168.0.6,3260]&lt;br/&gt;Login session [iface: default, target: iqn.2006-01.com.openfiler:openfiler.vote,&lt;br/&gt;portal: 192.168.0.6,3260]&lt;br/&gt;Login session [iface: default, target: iqn.2006-01.com.openfiler:openfiler.asm,&lt;br/&gt;portal: 192.168.0.6,3260]&lt;br/&gt;gverma@gverma-laptop:~$ sudo iscsiadm -m session&lt;br/&gt;tcp: [4] 192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.ocr&lt;br/&gt;tcp: [5] 192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.vote&lt;br/&gt;tcp: [6] 192.168.0.6:3260,1 iqn.2006-01.com.openfiler:openfiler.asm&lt;/pre&gt;&lt;br/&gt;This is how the current mapping of the attached SAN LUNs and device name is got for the current session:&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ ls -l /dev/disk/by-path&lt;br/&gt;&lt;strong&gt;lrwxrwxrwx 1 root root  9 2008-04-16 22:02 ..&lt;br/&gt;ip-192.168.0.6:3260-iscsi-iqn.2006-01.com.openfiler:openfiler.asm-lun-0 -&amp;gt; ../../sdd&lt;/strong&gt;&lt;strong&gt;&lt;br/&gt;lrwxrwxrwx 1 root root  9 2008-04-16 22:02 ..&lt;br/&gt;ip-192.168.0.6:3260-iscsi-iqn.2006-01.com.openfiler:openfiler.ocr-lun-0 -&amp;gt; ../../sdb&lt;br/&gt;&lt;/strong&gt;&lt;strong&gt;lrwxrwxrwx 1 root root  9 2008-04-16 22:02 ..&lt;br/&gt;ip-192.168.0.6:3260-iscsi-iqn.2006-01.com.openfiler:openfiler.vote-lun-0 -&amp;gt; ../../sdc&lt;br/&gt;&lt;/strong&gt;lrwxrwxrwx 1 root root  9 2008-04-16 12:48 pci-0000:00:01.1-scsi-0:0:0:0 -&amp;gt; ../../sda&lt;br/&gt;lrwxrwxrwx 1 root root 10 2008-04-16 12:48 pci-0000:00:01.1-scsi-0:0:0:0-part1 -&amp;gt; ../../sda1&lt;br/&gt;lrwxrwxrwx 1 root root 10 2008-04-16 12:48 pci-0000:00:01.1-scsi-0:0:0:0-part2 -&amp;gt; ../../sda2&lt;br/&gt;lrwxrwxrwx 1 root root 10 2008-04-16 12:48 pci-0000:00:01.1-scsi-0:0:0:0-part5 -&amp;gt; ../../sda5&lt;br/&gt;lrwxrwxrwx 1 root root 10 2008-04-16 12:48 pci-0000:00:01.1-scsi-1:0:0:0 -&amp;gt; ../../scd0&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;Paydirt: Seeing the LUNs on Ubuntu VM&lt;/span&gt;&lt;/h2&gt;&lt;br/&gt;&lt;h4&gt;This could be seen in the /var/log/messages:&lt;/h4&gt;&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18263.996005] scsi 42:0:0:0: Direct-Access   Openfile Virtual disk     0    PQ: 0 ANSI: 4&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.000393] sd 42:0:0:0: [sdb] 2097152 512-byte hardware sectors (1074 MB)&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.002548] sd 42:0:0:0: [sdb] Write Protect is off&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.004196] sd 42:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.004196] sd 42:0:0:0: [sdb] 2097152 512-byte hardware sectors (1074 MB)&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.004196] sd 42:0:0:0: [sdb] Write Protect is off&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.009630] sd 42:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.009718]  sdb: unknown partition table&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.030856] sd 42:0:0:0: [sdb] Attached SCSI disk&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.030974] sd 42:0:0:0: Attached scsi generic sg2 type 0&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.292677] scsi43 : iSCSI Initiator over TCP/IP&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.553516] scsi 43:0:0:0: Direct-Access     Openfile Virtual disk     0    PQ: 0 ANSI: 4&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.555463] sd 43:0:0:0: [sdc] 2097152 512-byte hardware sectors (1074 MB)&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.556540] sd 43:0:0:0: [sdc] Write Protect is off&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.559456] sd 43:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.561681] sd 43:0:0:0: [sdc] 2097152 512-byte hardware sectors (1074 MB)&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.564112] sd 43:0:0:0: [sdc] Write Protect is off&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.566617] sd 43:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.566719]  sdc: unknown partition table&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.585774] sd 43:0:0:0: [sdc] Attached SCSI disk&lt;br/&gt;Apr 16 21:53:19 gverma-laptop kernel: [18264.585872] sd 43:0:0:0: Attached scsi generic sg3 type 0&lt;br/&gt;Apr 16 21:53:20 gverma-laptop kernel: [18264.847763] scsi44 : iSCSI Initiator over TCP/IP&lt;br/&gt;Apr 16 21:53:20 gverma-laptop kernel: [18265.112437] scsi 44:0:0:0: Direct-Access     Openfile Virtual disk     0    PQ: 0 ANSI: 4&lt;br/&gt;Apr 16 21:53:20 gverma-laptop kernel: [18265.112437] sd 44:0:0:0: [sdd] 125829120 512-byte hardware sectors (64425 MB)&lt;br/&gt;Apr 16 21:53:20 gverma-laptop kernel: [18265.112437] sd 44:0:0:0: [sdd] Write Protect is off&lt;br/&gt;Apr 16 21:53:20 gverma-laptop kernel: [18265.113012] sd 44:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br/&gt;Apr 16 21:53:20 gverma-laptop kernel: [18265.115823] sd 44:0:0:0: [sdd] 125829120 512-byte hardware sectors (64425 MB)&lt;br/&gt;Apr 16 21:53:20 gverma-laptop kernel: [18265.117126] sd 44:0:0:0: [sdd] Write Protect is off&lt;br/&gt;Apr 16 21:53:20 gverma-laptop kernel: [18265.119686] sd 44:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA&lt;br/&gt;Apr 16 21:53:20 gverma-laptop kernel: [18265.119786]  sdd: unknown partition table&lt;br/&gt;Apr 16 21:53:20 gverma-laptop kernel: [18265.134147] sd 44:0:0:0: [sdd] Attached SCSI disk&lt;br/&gt;Apr 16 21:53:20 gverma-laptop kernel: [18265.134235] sd 44:0:0:0: Attached scsi generic sg4 type 0&lt;br/&gt;&lt;h4&gt;The SAN devices were visible on Ubuntu VM now:&lt;/h4&gt;&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo fdisk -l&lt;br/&gt;Disk /dev/sda: 5906 MB, 5906628608 bytes&lt;br/&gt;255 heads, 63 sectors/track, 718 cylinders&lt;br/&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br/&gt;Disk identifier: 0x000eb831&lt;br/&gt;Device Boot      Start         End      Blocks   Id  System&lt;br/&gt;/dev/sda1   *           1         680     5462068+  83  Linux&lt;br/&gt;/dev/sda2             681         718      305235    5  Extended&lt;br/&gt;/dev/sda5             681         718      305203+  82  Linux swap / Solaris&lt;br/&gt;&lt;strong&gt;Disk /dev/sdb: 1073 MB, 1073741824 bytes&lt;/strong&gt;&lt;br/&gt;&lt;strong&gt;34 heads, 61 sectors/track, 1011 cylinders&lt;/strong&gt;&lt;br/&gt;&lt;strong&gt;Units = cylinders of 2074 * 512 = 1061888 bytes&lt;/strong&gt;&lt;br/&gt;&lt;strong&gt;Disk identifier: 0x00000000&lt;/strong&gt;&lt;br/&gt;Disk /dev/sdb doesn't contain a valid partition table&lt;br/&gt;&lt;strong&gt;Disk /dev/sdc: 1073 MB, 1073741824 bytes&lt;/strong&gt;&lt;br/&gt;&lt;strong&gt;34 heads, 61 sectors/track, 1011 cylinders&lt;/strong&gt;&lt;br/&gt;&lt;strong&gt;Units = cylinders of 2074 * 512 = 1061888 bytes&lt;/strong&gt;&lt;br/&gt;&lt;strong&gt;Disk identifier: 0x00000000&lt;/strong&gt;&lt;br/&gt;Disk /dev/sdc doesn't contain a valid partition table&lt;br/&gt;&lt;strong&gt;Disk /dev/sdd: 64.4 GB, 64424509440 bytes&lt;/strong&gt;&lt;br/&gt;&lt;strong&gt;64 heads, 32 sectors/track, 61440 cylinders&lt;/strong&gt;&lt;br/&gt;&lt;strong&gt;Units = cylinders of 2048 * 512 = 1048576 bytes&lt;/strong&gt;&lt;br/&gt;&lt;strong&gt;Disk identifier: 0x00000000&lt;/strong&gt;&lt;br/&gt;Disk /dev/sdd doesn't contain a valid partition table&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;Gotcha: Logical Volumes lost after reboot of openfiler&lt;/span&gt;&lt;/h2&gt;&lt;br/&gt;One common caveat that I noticed was that the logical volumes were lost after a reboot of the openfiler virtual machine. The issue seems to be related to detection of USB devices while bringing up the linux OS.&lt;br/&gt;&lt;br/&gt;Anyways, to get around it, I did the following each time (better put this in /etc/rc.local)&lt;br/&gt;&lt;pre&gt;# pvscan&lt;br/&gt;# vgscan&lt;br/&gt;# lvscan&lt;/pre&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;Activate the logical volumes, otherwise, although sudo /etc/init.d/open-iscsi restart will show that initiator discovers target LUNs, BUT they will not show up in fdisk -l and when you do lvdisplay on openfiler machine, the status will show as NOT available&lt;/em&gt;.&lt;/blockquote&gt;&lt;br/&gt;&lt;pre&gt;# lvchange -ay openfiler/asm&lt;br/&gt;# lvchange -ay openfiler/ocr&lt;br/&gt;# lvchange -ay openfiler/vote&lt;br/&gt;# pvscan&lt;br/&gt;# vgscan&lt;br/&gt;# lvscan&lt;/pre&gt;&lt;br/&gt;You can verify the status of the logical/physical volumes and volume groups now:&lt;br/&gt;&lt;pre&gt;# lvdisplay&lt;br/&gt;# pvdisplay&lt;br/&gt;# vgdisplay&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;Pending Areas to explore&lt;/span&gt;&lt;/h2&gt;&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt;One of the pending topics to explore is unique device labeling using udev. This will prevent LUN name renaming from /dev/sdb to /dev/sdd all of a sudden, should you happen to add a new Logical volume in the SAN or restart the open-iscsi server on initiator.&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;I tried setting it up using some other examples on the internet, but it did not quite work out. It also seems that devlabel is passe' and udev is favored in most unix distributions.&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt;Mounting the SAN device as a filesystem on initiator machine.&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;Conclusion&lt;/span&gt;&lt;/h2&gt;&lt;br/&gt;Well, its not as if I covered the whole nine yards, but it was a start and I hope to complete the remaining topics soon. When I do so, I will cover that in more details either in this article or in a separate one.&lt;br/&gt;&lt;br/&gt;In the meanwhile, if you have any feedback, feel free to leave a message or email me at gaurav _ verma 22 at yahoo DOT com.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-2839568449453786655?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/2839568449453786655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/combining-openfiler-and-virtualbox.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/2839568449453786655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/2839568449453786655'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/combining-openfiler-and-virtualbox.html' title='Combining Openfiler and Virtualbox (Ubuntu guest OS on windows host)'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-2638482883570136721</id><published>2008-04-18T12:51:00.000-04:00</published><updated>2010-12-30T22:41:33.430-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='windows host'/><category scheme='http://www.blogger.com/atom/ns#' term='internal networking'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='host only networking'/><category scheme='http://www.blogger.com/atom/ns#' term='virtual machine'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><category scheme='http://www.blogger.com/atom/ns#' term='host only'/><title type='text'>Virtualbox Case Study: Making host only networking work between two
Ubuntu Guest OS (virtual machine) on Windows Vista host</title><content type='html'>&lt;h2&gt;Preface&lt;/h2&gt;&lt;br/&gt;In the past articles, I have talked about how to make internal networking work between two virtual machines built using Virtualbox. In this article, we will see seeing a configuration of host only networking between two virtual machines built on virtualbox.&lt;br/&gt;&lt;h3&gt;The advantages of configuring host only networking are :&lt;/h3&gt;&lt;br/&gt;1) Internet works (yes!)&lt;br/&gt;&lt;br/&gt;2) You get an IP on the LAN for each virtual machine. Yes, this is really possible. So this means that you can have 2 more real LAN IPs coming out of a single windows desktop/laptop in the LAN. Isn't that amazing?&lt;br/&gt;&lt;br/&gt;3) Due to 2), your host machine can also ping or access your virtual machine&lt;br/&gt;&lt;br/&gt;4) Each virtual machine can access the other virtual machine. E.g. ping/ssh/telnet into it.&lt;br/&gt;&lt;br/&gt;For most purposes, this kind of setup should be optimal or sufficient. Hey, if you can access your machines in the LAN and internet works from them, that should be good enough. And, its for free.&lt;br/&gt;&lt;h2&gt;Here is a bird's eye overview of the end setup..&lt;/h2&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/my-network-diagram.jpg"&gt;click here to enlarge this diagram&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/my-network-diagram.jpg"&gt;&lt;img class="alignnone size-full wp-image-52" src="http://opensourceexperiments.files.wordpress.com/2008/04/my-network-diagram.jpg?w=468" alt="" width="468" height="322" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;h2&gt;The Virtualbox Network Adapter configuration&lt;/h2&gt;&lt;br/&gt;We start with the Virtualbox Network Adapter configuration. We create a host only network interface on each virtual machine definition.&lt;br/&gt;&lt;br/&gt;&lt;span style="text-decoration:underline;"&gt;For Virtual machine1 - Gutsy:&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/adapter-0-setting-gui-of-vm2.jpg"&gt;&lt;img class="alignnone size-full wp-image-34" src="http://opensourceexperiments.files.wordpress.com/2008/04/adapter-0-setting-gui-of-vm2.jpg" alt="" width="443" height="467" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style="text-decoration:underline;"&gt;For Virtual machine2 - gutsy2:&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/adapter-0-setting-gui-of-vm1.jpg"&gt;&lt;img class="alignnone size-full wp-image-33" src="http://opensourceexperiments.files.wordpress.com/2008/04/adapter-0-setting-gui-of-vm1.jpg" alt="" width="448" height="467" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Please note here that while this article primarily deals with setting up host only networking, &lt;a href="http://http://opensourceexperiments.wordpress.com/2008/04/13/case-study-configuring-internal-networking-work-for-talking-two-linux-guest-os-ubuntu-on-windows-vista-host/"&gt;in the previous article&lt;/a&gt;, I had setup internal networking too, so these VMs also have a Virtual Host Interface 2 for internal networking within themselves.&lt;br/&gt;&lt;h2&gt;Install the Guest Operating system on the virtual machines&lt;/h2&gt;&lt;br/&gt;Now, do the installation of the guest operating system in the virtual machine and setup the two network interfaces like this.&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;Note here that I chose  static IP 192.168.0.5 because my windows machine (host OS) had the IP 192.168.0.3 and the IP had to be in the 192.168.0.x subnet. My windows host was behind a Netgear router.&lt;br/&gt;&lt;/em&gt;&lt;br/&gt;&lt;br/&gt;&lt;em&gt;We need to make sure we choose non-conflicting IPs for the host only interface otherwise you will get an IP conflict in your LAN domain. For the other machine, the eth0 static IP was 192.168.0.4.&lt;br/&gt;&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;An interesting fact here was that if I chose DHCP for eth0 in the VM, i was getting an IP of 192.168.0.3, the same as that of my windows host!! This is another reason why I had to choose static IP address.&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/eth0-of-vm2-host-only-networking.jpg"&gt;&lt;img class="alignnone size-full wp-image-35" src="http://opensourceexperiments.files.wordpress.com/2008/04/eth0-of-vm2-host-only-networking.jpg" alt="" width="417" height="290" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;For eth1, i chose a random IP in the subnet 192.168.2.x for no particular reason. The eth1 IP of the other virtual machine was 192.168.2.1&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/eth1-of-vm2-internal-networking.jpg"&gt;&lt;img class="alignnone size-full wp-image-36" src="http://opensourceexperiments.files.wordpress.com/2008/04/eth1-of-vm2-internal-networking.jpg" alt="" width="419" height="292" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;Make sure to restart the network after doing this network setup to bring it into effect.&lt;br/&gt;&lt;br/&gt;&lt;em&gt;Do not bother about the SIOCADDRT: No such process error:&lt;/em&gt;&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ sudo /etc/init.d/networking restart&lt;br/&gt;[sudo] password for gverma:&lt;br/&gt;* Reconfiguring network interfaces...&lt;br/&gt;SIOCADDRT: No such process&lt;br/&gt;Failed to bring up eth1.&lt;br/&gt;[ OK ]&lt;/pre&gt;&lt;br/&gt;For the benefit of the reader, the DNS and host information is also reproduced here, although the only thing of significance should be the DNS and default gateway, both of which were set to be the same as that on windows host:&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/dns-domain-name-setting.jpg"&gt;&lt;img class="alignnone size-full wp-image-43" src="http://opensourceexperiments.files.wordpress.com/2008/04/dns-domain-name-setting.jpg?w=468" alt="" width="468" height="332" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/host-information.jpg"&gt;&lt;img class="alignnone size-full wp-image-44" src="http://opensourceexperiments.files.wordpress.com/2008/04/host-information.jpg" alt="" width="466" height="436" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;This is how the network configuration on the other virtual machine looked like:&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/network-settings-overview.jpg"&gt;&lt;img class="alignnone size-full wp-image-45" src="http://opensourceexperiments.files.wordpress.com/2008/04/network-settings-overview.jpg?w=468" alt="" width="468" height="332" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;For those who are interested, here is the output of the route command:&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ route&lt;br/&gt;Kernel IP routing table&lt;br/&gt;Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br/&gt;192.168.2.0     *               255.255.255.0   U     0      0        0 eth1&lt;br/&gt;192.168.0.0     *               255.255.255.0   U     0      0        0 eth0&lt;br/&gt;link-local      *               255.255.0.0     U     1000   0        0 eth0&lt;br/&gt;default         192.168.0.1     0.0.0.0         UG    100    0        0 eth0&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;A quick side note for Windows Vista&lt;/h2&gt;&lt;br/&gt;Here is a quick side note for Vista or windows in general. It is preferable to disable the UAC (user access control) setting and also disable the firewall on the host windows machine.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/disable-the-windows-host-firewall.jpg"&gt;&lt;img class="alignnone size-full wp-image-37" src="http://opensourceexperiments.files.wordpress.com/2008/04/disable-the-windows-host-firewall.jpg?w=468" alt="" width="468" height="374" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Disable the User Access Control (UAC) feature on vista to make your life easier:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/disable-uac-on-vista.jpg"&gt;&lt;img class="alignnone size-full wp-image-38" src="http://opensourceexperiments.files.wordpress.com/2008/04/disable-uac-on-vista.jpg?w=468" alt="" width="468" height="356" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;h2&gt;Network bridging: the key to make host only networking work&lt;/h2&gt;&lt;br/&gt;The KEY to make host only networking work on windows is to bridge the real working network interface (either wireless connection of a hard wired ethernet) with the virtual adapter network interface. You can do this by selecting two network interfaces, right click, choose bridge and voila, there you have it.&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;A network bridge is nothing but a simplified concept of joining two connections into one. Its like joining two rivers into a bigger river. When water will flow into the bigger river, it will flow into both the rivers. At least, this is how I understand it.&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;ALSO, we have to enable promiscuous packet routing mode in ALL the member network interfaces that are in the bridge. This is an important setup to make it work.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/enable-promiscous-mode-for-wireless-bridge.jpg"&gt;&lt;img class="alignnone size-full wp-image-41" src="http://opensourceexperiments.files.wordpress.com/2008/04/enable-promiscous-mode-for-wireless-bridge.jpg?w=468" alt="" width="468" height="234" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;Initially, I had struggled a lot to make host only networking work by enabling promiscuous for only the Virtualbox Adapter in the bridge, but was not successful. That is when I read a cryptic posting on the Virtualbox forum saying that it has to be done for all the member bridge interfaces; and thats when it worked.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/netsh-set-promiscuous-mode-for-both-interfaces.jpg"&gt;&lt;img class="alignnone size-full wp-image-40" src="http://opensourceexperiments.files.wordpress.com/2008/04/netsh-set-promiscuous-mode-for-both-interfaces.jpg?w=468" alt="" width="468" height="333" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;h3&gt;A note of caution&lt;/h3&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;When we add an adapter to the bridge, the connection of the main wireless network is lost for a moment, but it is re-enabled back. This is also covered in the user manual in secion 6.3 (Virtualbox version 1.5.6)&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p style="text-align:left;padding-left:30px;"&gt;&lt;em&gt;Warning: Setting up Host Interface Networking requires changes to your&lt;br/&gt;host’s network configuration, &lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;which will cause the host to lose its network&lt;br/&gt;connection.&lt;/span&gt; Do not change network settings on remote or production systems&lt;br/&gt;unless you know what you are doing.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;" align="left"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/network-connections-control-panel-windows.jpg"&gt;&lt;img class="alignnone size-full wp-image-39" src="http://opensourceexperiments.files.wordpress.com/2008/04/network-connections-control-panel-windows.jpg?w=468" alt="" width="468" height="196" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;" align="left"&gt;Later on, I assigned Virtualbox Host Interface 2 (on windows) to NAT0 (eth0) of Virtual machine 2 and bridged it to the wireless network connection too:&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;" align="left"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/network-connections-control-panel-windows-after-setting-up-vm2-too.jpg"&gt;&lt;img class="alignnone size-full wp-image-42" src="http://opensourceexperiments.files.wordpress.com/2008/04/network-connections-control-panel-windows-after-setting-up-vm2-too.jpg?w=468" alt="" width="468" height="194" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;" align="left"&gt;After the bridging, this is how the ipconfig output looked like (the IP of the windows host is 192.168.0.3):&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;" align="left"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/ipconfig-output-there-is-a-new-ip-in-the-lan-now.jpg"&gt;&lt;img class="alignnone size-full wp-image-46" src="http://opensourceexperiments.files.wordpress.com/2008/04/ipconfig-output-there-is-a-new-ip-in-the-lan-now.jpg?w=468" alt="ipconfig-output-there-is-a-new-ip-in-the-lan-now" width="468" height="235" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;" align="left"&gt;Now, we were one BIG, HAPPY Family. Make sure the connection status shows as connected.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Testing the connections - Internet works!&lt;/h2&gt;&lt;br/&gt;At this point, the internet was working from the virtual machines:&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/google-works.jpg"&gt;&lt;img class="alignnone size-full wp-image-47" src="http://opensourceexperiments.files.wordpress.com/2008/04/google-works.jpg?w=468" alt="" width="468" height="343" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;Another real quick check is to use the wget utility:&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ wget yahoo.com&lt;br/&gt;--18:32:56--  http://yahoo.com/&lt;br/&gt;=&amp;gt; `index.html'&lt;br/&gt;Resolving yahoo.com... 216.109.112.135, 66.94.234.13&lt;br/&gt;Connecting to yahoo.com|216.109.112.135|:80... connected.&lt;br/&gt;HTTP request sent, awaiting response... 301 Moved Permanently&lt;br/&gt;Location: http://www.yahoo.com/ [following]&lt;br/&gt;--18:32:57--  http://www.yahoo.com/&lt;br/&gt;=&amp;gt; `index.html'&lt;br/&gt;Resolving www.yahoo.com... 69.147.114.210&lt;br/&gt;Connecting to www.yahoo.com|69.147.114.210|:80... connected.&lt;br/&gt;HTTP request sent, awaiting response... 200 OK&lt;br/&gt;Length: 9,490 (9.3K) [text/html]&lt;br/&gt;&lt;br/&gt;100%[=====================================================&amp;gt;] 9,490         --.--K/s&lt;br/&gt;&lt;br/&gt;18:32:57 (258.06 KB/s) - `index.html' saved [9490/9490]&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;Testing the connections - Host only networking&lt;/h2&gt;&lt;br/&gt;Now comes the acid test of whether the virtual machines and hosts can see each other.&lt;br/&gt;&lt;br/&gt;Windows could see the individual virtual machines:&lt;br/&gt;&lt;pre&gt;&lt;strong&gt;C:\Users\gaurav&amp;gt; ping 192.168.0.4&lt;/strong&gt;&lt;br/&gt;Pinging 192.168.0.4 with 32 bytes of data:&lt;br/&gt;&lt;br/&gt;Reply from 192.168.0.4: bytes=32 time&amp;lt;1ms TTL=64&lt;br/&gt;Reply from 192.168.0.4: bytes=32 time&amp;lt;1ms TTL=64&lt;br/&gt;Reply from 192.168.0.4: bytes=32 time&amp;lt;1ms TTL=64&lt;br/&gt;Reply from 192.168.0.4: bytes=32 time&amp;lt;1ms TTL=64&lt;br/&gt;&lt;br/&gt;Ping statistics for 192.168.0.4:&lt;br/&gt;Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),&lt;br/&gt;Approximate round trip times in milli-seconds:&lt;br/&gt;Minimum = 0ms, Maximum = 0ms, Average = 0ms&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C:\Users\gaurav&amp;gt; ping 192.168.0.5&lt;/strong&gt;&lt;br/&gt;Pinging 192.168.0.5 with 32 bytes of data:&lt;br/&gt;&lt;br/&gt;Reply from 192.168.0.5: bytes=32 time&amp;lt;1ms TTL=128&lt;br/&gt;Reply from 192.168.0.5: bytes=32 time&amp;lt;1ms TTL=128&lt;br/&gt;Reply from 192.168.0.5: bytes=32 time&amp;lt;1ms TTL=128&lt;br/&gt;Reply from 192.168.0.5: bytes=32 time&amp;lt;1ms TTL=128&lt;br/&gt;&lt;br/&gt;Ping statistics for 192.168.0.5:&lt;br/&gt;Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),&lt;br/&gt;Approximate round trip times in milli-seconds:&lt;br/&gt;Minimum = 0ms, Maximum = 0ms, Average = 0ms&lt;/pre&gt;&lt;br/&gt;Pinging the windows host IP from inside the VMs worked beautifully:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/ping-the-windows-host-ip-from-inside-the-vms.jpg"&gt;&lt;img class="alignnone size-full wp-image-48" src="http://opensourceexperiments.files.wordpress.com/2008/04/ping-the-windows-host-ip-from-inside-the-vms.jpg?w=468" alt="" width="468" height="151" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;And, pinging to the other virtual machine from each VM worked beautifully too:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/ping-vm1-and-vm2-from-a-vm.jpg"&gt;&lt;img class="alignnone size-full wp-image-49" src="http://opensourceexperiments.files.wordpress.com/2008/04/ping-vm1-and-vm2-from-a-vm.jpg?w=468" alt="ping-vm1-and-vm2-from-a-vm" width="468" height="327" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Taking this a step further, since ssh was enabled on both the virtual machines, I was able to login to the individual virtual machines also:&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$ &lt;strong&gt;ps -ef | grep ssh&lt;/strong&gt;&lt;br/&gt;gverma    4684  4643  0 21:27 ?        00:00:00 /usr/bin/ssh-agent x-session-manager&lt;br/&gt;root      5422     1  0 22:20 ?        00:00:00 /usr/sbin/sshd&lt;br/&gt;gverma    5456  4864  0 22:23 pts/0    00:00:00 grep ssh&lt;br/&gt;gverma@gverma-desktop:~$ &lt;strong&gt;ssh 192.168.0.5&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;gverma@192.168.0.5's password:&lt;br/&gt;Linux gverma-desktop 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686&lt;br/&gt;&lt;br/&gt;The programs included with the Ubuntu system are free software;&lt;br/&gt;the exact distribution terms for each program are described in the&lt;br/&gt;individual files in /usr/share/doc/*/copyright.&lt;br/&gt;&lt;br/&gt;Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by&lt;br/&gt;applicable law.&lt;br/&gt;Last login: Mon Apr 14 22:20:55 2008 from gverma-laptop.local&lt;br/&gt;gverma@gverma-desktop:~$&lt;/pre&gt;&lt;br/&gt;&lt;pre&gt;gverma@gverma-desktop:~$ &lt;strong&gt;ssh 192.168.0.4&lt;/strong&gt;&lt;br/&gt;The authenticity of host '192.168.0.4 (192.168.0.4)' can't be established.&lt;br/&gt;RSA key fingerprint is a8:29:91:97:7d:99:37:6e:31:f1:06:ec:04:39:78:d7.&lt;br/&gt;Are you sure you want to continue connecting (yes/no)? yes&lt;br/&gt;Warning: Permanently added '192.168.0.4' (RSA) to the list of known hosts.&lt;/pre&gt;&lt;br/&gt;&lt;pre&gt;gverma@192.168.0.4's password:&lt;br/&gt;&lt;br/&gt;Linux gverma-laptop 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686&lt;/pre&gt;&lt;br/&gt;&lt;pre&gt;The programs included with the Ubuntu system are free software;&lt;br/&gt;the exact distribution terms for each program are described in the&lt;br/&gt;individual files in /usr/share/doc/*/copyright.&lt;br/&gt;Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by&lt;br/&gt;applicable law.&lt;/pre&gt;&lt;br/&gt;&lt;h3&gt;Private networks&lt;/h3&gt;&lt;br/&gt;To make things better, the private networks were working too (thanks to the good karma accumulated in the previous article - &lt;a title="Configuring Internal networking work for talking two linux guest OS (Ubuntu) on windows vista host" rel="bookmark" href="../2008/04/13/case-study-configuring-internal-networking-work-for-talking-two-linux-guest-os-ubuntu-on-windows-vista-host/"&gt;Case study: Configuring Internal networking work for talking two linux guest OS (Ubuntu) on windows vista host &lt;/a&gt;) :&lt;br/&gt;&lt;pre&gt;gverma@gverma-laptop:~$&lt;strong&gt; ping 192.168.2.1&lt;/strong&gt;&lt;br/&gt;PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=0.200 ms&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=1.16 ms&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=3 ttl=64 time=0.000 ms&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=4 ttl=64 time=0.073 ms&lt;br/&gt;--- 192.168.2.1 ping statistics ---&lt;br/&gt;4 packets transmitted, 4 received, 0% packet loss, time 3006ms&lt;br/&gt;rtt min/avg/max/mdev = 0.000/0.358/1.160/0.468 ms&lt;br/&gt;&lt;br/&gt;gverma@gverma-laptop:~$ &lt;strong&gt;ping 192.168.2.2&lt;/strong&gt;&lt;br/&gt;PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=4.49 ms&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=2 ttl=64 time=0.368 ms&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=3 ttl=64 time=1.65 ms&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=4 ttl=64 time=3.15 ms&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=5 ttl=64 time=1.51 ms&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;A moment of Triumph&lt;/h2&gt;&lt;br/&gt;So here we are. Let us take a moment to sit back, relax and let reality sink it. It &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;is really working&lt;/strong&gt;&lt;/span&gt;! I am reminded of the umpteen times I had gone to forums.virtualbox.org to find the answer to this riddle and here it is, solved.&lt;br/&gt;&lt;br/&gt;I hope this guide is of use to someone else who is trying to make a similar configuration work  or just trying to understand -- &lt;em&gt;what is it that we can achieve from host only networking??&lt;/em&gt;&lt;br/&gt;&lt;br/&gt;Nothing could be sweeter, nothing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-2638482883570136721?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/2638482883570136721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/virtualbox-case-study-making-host-only.html#comment-form' title='51 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/2638482883570136721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/2638482883570136721'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/virtualbox-case-study-making-host-only.html' title='Virtualbox Case Study: Making host only networking work between two&#xA;Ubuntu Guest OS (virtual machine) on Windows Vista host'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>51</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-1470225182421349287</id><published>2008-04-13T15:40:00.000-04:00</published><updated>2010-12-30T22:41:33.062-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vboxmanage modifyvm'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='DHCP'/><category scheme='http://www.blogger.com/atom/ns#' term='windows host'/><category scheme='http://www.blogger.com/atom/ns#' term='internal networking'/><category scheme='http://www.blogger.com/atom/ns#' term='case study'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Case study: Making Internal networking for talking between two linux
guest OS (Ubuntu) on windows vista host</title><content type='html'>&lt;h2&gt;Preface&lt;/h2&gt;&lt;br/&gt;For the past few days, I had been struggling with making internal networking work on two (or more) linux guest OSes on Windows host using virtualbox.&lt;br/&gt;&lt;br/&gt;The advantage of this setup is we can setup an internal networking lab between two or more nods using regular windows, which can be used for a variety of purposes. My primary purpose behind this setup was to simulate an environment for implementing Oracle 10gR2 RAC cluster.&lt;br/&gt;&lt;br/&gt;As we know, setting up 10g RAC on a node needs a public network and a private network. The public network is achieved right off the bat with the NAT network configuration in Virtualbox, but the internal network setup is one that is pretty tricky.&lt;br/&gt;&lt;blockquote&gt;I will give credit to both &lt;a href="http://www.virtualbox.org/wiki/Testing_Networks"&gt;http://www.virtualbox.org/wiki/Testing_Networks&lt;/a&gt; and &lt;a href="http://blogs.sun.com/manoj/entry/netowkring_with_virtualbox"&gt;http://blogs.sun.com/manoj/entry/netowkring_with_virtualbox&lt;/a&gt; for the ideas tested, but more so to  &lt;a href="http://www.virtualbox.org/wiki/Testing_Networks"&gt;http://www.virtualbox.org/wiki/Testing_Networks&lt;/a&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;em&gt;That being said, I would daresay that the content authoring in Virtualbox user manual about setting up internal networking on windows host deserves a little more attention. I was able to find several posts on the internet, including a particular Virtualbox wiki page, that dealt with making host only networking or internal networking work on Ubuntu host, but was not able to find the same for windows host.&lt;/em&gt;&lt;br/&gt;&lt;h2&gt;&lt;strong&gt;Lets get to the setup now..&lt;/strong&gt;&lt;/h2&gt;&lt;br/&gt;This is how the GUI setup looks like internal network (Adapter 1 - 2nd adapter) for the two virtual machines:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/gui-network-setting-of-vm1-for-internal-network.jpg"&gt;&lt;img class="alignnone size-full wp-image-30" src="http://opensourceexperiments.files.wordpress.com/2008/04/gui-network-setting-of-vm1-for-internal-network.jpg" alt="" width="443" height="467" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/gui-network-setting-of-vm2-for-internal-network.jpg"&gt;&lt;img class="alignnone size-full wp-image-31" src="http://opensourceexperiments.files.wordpress.com/2008/04/gui-network-setting-of-vm2-for-internal-network.jpg" alt="" width="446" height="467" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;h2&gt;The caveat...&lt;/h2&gt;&lt;br/&gt;The first thing which we need to understand that is the Virtualbox GUI for setting up internal network is &lt;strong&gt;BROKEN!&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;You need to set it up using the command line interface (VboxManage command)  Also, be aware that the internal network settings are reset by the GUI if any of the VM settings are changed, so you better do this AFTER you are done with all the other VM changes.&lt;br/&gt;&lt;br/&gt;As per the User manual, the default internal network name is "intnet", but you can choose any other name. I chose the intnet for no particular reason.&lt;br/&gt;&lt;br/&gt;This is what we need to do with the VboxManage command. (here, we assume that there are two guest OSes - "Gutsy" and "gutsy2"). Mind you, the virtual machine name is case-sensitive in the VboxManage command.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;c:\Program Files\Innotek&amp;gt; VboxManage modifyvm Gutsy -nic2 intnet&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;c:\Program Files\Innotek&amp;gt; VboxManage modifyvm Gutsy -intnet2 intnet&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;c:\Program Files\Innotek&amp;gt; VboxManage modifyvm gutsy2 -nic2 intnet&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;c:\Program Files\Innotek&amp;gt; VboxManage modifyvm gutsy2 -intnet2 intnet&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/vmboxmanage-modifyvm-commands-for-internal-network1.jpg"&gt;&lt;img class="aligncenter size-full wp-image-22" src="http://opensourceexperiments.files.wordpress.com/2008/04/vmboxmanage-modifyvm-commands-for-internal-network1.jpg?w=468" alt="" width="468" height="207" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;h3&gt;Default Gateway and DNS of eth1 interfaces - (used for private network as per our semantics)&lt;/h3&gt;&lt;br/&gt;If you already have the eth0 in the guest OS (linux) as NAT, it will automatically acquire a DHCP assigned IP in the subnet 10.0.2.x, and will have a default gateway of 10.0.2.2. The names server will be 10.0.2.3. With this setup, internet will work on the linux guest OS, (provided it is works on the windows host too).&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/internet-works.jpg"&gt;&lt;img class="alignnone size-full wp-image-28" src="http://opensourceexperiments.files.wordpress.com/2008/04/internet-works.jpg?w=468" alt="" width="535" height="325" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;We will need to make the default gateway of the private network (eth1) in guest OS (linux) as 10.0.2.2 too -- whichever is causing the internet to work.&lt;br/&gt;&lt;h2&gt;Private IPs should be the same subnet...&lt;/h2&gt;&lt;br/&gt;Another thing to notice here is that all the guest OSes that are intended to be connected through internal network should have the private interface IP (eth1) in the SAME subnet. You can choose any private subnet like 192.168.x.x or 10.10.x.x:&lt;br/&gt;&lt;br/&gt;Here are three valid combinations of eth1 IPs:&lt;br/&gt;&lt;p style="padding-left:30px;"&gt;a) Gutsy could have 192.168.2.1, and gutsy2 could have 192.168.2.2&lt;/p&gt;&lt;br/&gt;&lt;p style="padding-left:30px;"&gt;b) Gutsy could have 192.168.3.2, and gutsy2 could have 192.168.3.4&lt;/p&gt;&lt;br/&gt;&lt;p style="padding-left:30px;"&gt;c) Gutsy could have 10.10.1.1, and gutsy2 could have 10.10.1.2&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;( I hope you get the idea).&lt;br/&gt;&lt;br/&gt;For the sake of illustration, I chose this combination of private IPs:&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt;192.168.2.1 (for linux guest OS 1 - Gutsy)&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;192.168.2.2 (for linux guest OS 1 - gutsy2)&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/settings-for-eth1-in-vm2.jpg"&gt;&lt;img class="alignnone size-full wp-image-21" src="http://opensourceexperiments.files.wordpress.com/2008/04/settings-for-eth1-in-vm2.jpg?w=468" alt="" width="468" height="426" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;h3&gt;Restart networking&lt;/h3&gt;&lt;br/&gt;After doing this, you need to restart the networking on the linux host. On Ubuntu, it is done with the sudo /etc/init.d/networking restart command:&lt;br/&gt;&lt;pre&gt;&lt;em&gt;gverma@gverma-desktop:~$ sudo /etc/init.d/networking restart&lt;br/&gt;[sudo] password for gverma: ********&lt;br/&gt;* Reconfiguring network interfaces...&lt;br/&gt;SIOCADDRT: No such process&lt;br/&gt;Failed to bring up eth1.&lt;br/&gt;[ OK ]&lt;br/&gt;&lt;/em&gt;&lt;/pre&gt;&lt;br/&gt;&lt;h2&gt;Overview of the networking configuration&lt;/h2&gt;&lt;br/&gt;Here is how the ifconfig for Gutsy - linux guest OS 1 looks like (as you can see the eth0 IP has been acquired in 10.0.2.x subnet by the DHCP server):&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/ifconfig-output-for-vm11.jpg"&gt;&lt;img class="alignnone size-full wp-image-50" src="http://opensourceexperiments.files.wordpress.com/2008/04/ifconfig-output-for-vm11.jpg?w=468" alt="" width="468" height="273" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;And this is how it looks of Gutsy2 (as you can see, the eth0 IP has been acquired in 10.0.2.x subnet by the DHCP server):&lt;br/&gt;&lt;blockquote&gt;By mistake, I have put the same image for the ifconfig output (that of Gutsy) for Gutsy2  as well. The hardware MAC address for eth1/0 should be different and so should be the the IP address for eth1 -- it should be 192.168.2.1. The eth0 IP for Gutsy2 would still be 10.0.2.x as it was of NAT type. -- Thanks, Gaurav&lt;/blockquote&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/ifconfig-output-for-vm22.jpg"&gt;&lt;img class="alignnone size-full wp-image-51" src="http://opensourceexperiments.files.wordpress.com/2008/04/ifconfig-output-for-vm22.jpg?w=468" alt="" width="468" height="300" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;A variation...&lt;/h2&gt;&lt;br/&gt;Let us consider a variation here.&lt;br/&gt;&lt;br/&gt;If the Virtual machines have only 1 virtualbox network adapter defined of type internal network, then the internal static IP within the Virtual machine would have needed to use a default gateway == host's IP default gateway.&lt;br/&gt;&lt;br/&gt;&lt;em&gt;For example, if the windows host had an IP of 192.168.0.4 (say), by virtue of being behind a router, then the default gateway of eth0 interface in in the virtual machine should be 192.168.0.1. (Again, this is assuming ONLY if you do not have a NAT type virtual interface defined for the VM.)&lt;/em&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/ipconfig-output-in-windows.jpg"&gt;&lt;img class="alignnone size-full wp-image-27" src="http://opensourceexperiments.files.wordpress.com/2008/04/ipconfig-output-in-windows.jpg?w=468" alt="" width="468" height="163" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;em&gt;In my case, since I had two virtual network interfaces defined (one NAT and one internal networking type) for the VMs, I had to make the default gateway of the eth1 (private interface) of guest OS the same as that of eth0 -- which was 10.0.2.2.&lt;/em&gt;&lt;br/&gt;&lt;br/&gt;The default gateway can be verified by the output of route command.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/route-output.jpg"&gt;&lt;img class="alignnone size-full wp-image-26" src="http://opensourceexperiments.files.wordpress.com/2008/04/route-output.jpg?w=468" alt="" width="459" height="75" /&gt;&lt;/a&gt;&lt;br/&gt;&lt;h2&gt;Interesting Trivia&lt;/h2&gt;&lt;br/&gt;In addition, the media state of the Virtual TAP Adapters in windows host were showing up as media disconnected, but still the internet was working for the Virtual machines AND the pings to each other were working. So, don't be fooled by the status of Virtulbox Adapters in the windows host.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;gverma@gverma-desktop:~$ ping 192.168.2.1&lt;/strong&gt;&lt;br/&gt;PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=0.031 ms&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=2 ttl=64 time=0.030 ms&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=3 ttl=64 time=0.109 ms&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=4 ttl=64 time=0.031 ms&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=5 ttl=64 time=0.036 ms&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=6 ttl=64 time=0.033 ms&lt;br/&gt;64 bytes from 192.168.2.2: icmp_seq=7 ttl=64 time=0.110 ms&lt;br/&gt;&lt;br/&gt;--- 192.168.2.2 ping statistics ---&lt;br/&gt;7 packets transmitted, 7 received, 0% packet loss, time 5998ms&lt;br/&gt;rtt min/avg/max/mdev = 0.030/0.054/0.110/0.035 ms&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;gverma@gverma-desktop:~$ ping 192.168.2.2&lt;/strong&gt;&lt;br/&gt;PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=0.398 ms&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=0.304 ms&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=3 ttl=64 time=0.380 ms&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=4 ttl=64 time=7.20 ms&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=5 ttl=64 time=0.407 ms&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=6 ttl=64 time=0.272 ms&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=7 ttl=64 time=3.42 ms&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=8 ttl=64 time=0.411 ms&lt;br/&gt;64 bytes from 192.168.2.1: icmp_seq=9 ttl=64 time=0.398 ms&lt;br/&gt;&lt;br/&gt;--- 192.168.2.1 ping statistics ---&lt;br/&gt;9 packets transmitted, 9 received, 0% packet loss, time 8004ms&lt;br/&gt;rtt min/avg/max/mdev = 0.272/1.465/7.200/2.241 ms&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Viola! &lt;/strong&gt;The same result can be seen on gutsy2 too.&lt;br/&gt;&lt;h2&gt;Well done!&lt;/h2&gt;&lt;br/&gt;Congratulations on setting up a private internal network between multiple virtual machines using Virtualbox. I hope this tutorial is of use to someone exploring the virtualbox tool. I personally feel it is a lot leaner and powerful, as compared to the vmware's size. It is also more robust performance wise.&lt;br/&gt;&lt;br/&gt;If you feel this was helpful, send me a note at gaurav_verma two two [at] yahoo dot com or just leave me a comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-1470225182421349287?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/1470225182421349287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/case-study-making-internal-networking.html#comment-form' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/1470225182421349287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/1470225182421349287'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/case-study-making-internal-networking.html' title='Case study: Making Internal networking for talking between two linux&#xA;guest OS (Ubuntu) on windows vista host'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-4604845192546093848</id><published>2008-04-11T10:27:00.000-04:00</published><updated>2010-12-30T22:41:32.885-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SUSE linux'/><category scheme='http://www.blogger.com/atom/ns#' term='vmware server'/><category scheme='http://www.blogger.com/atom/ns#' term='static'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='DHCP'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualbox vmware NAT TAP windows adapter media disconn'/><category scheme='http://www.blogger.com/atom/ns#' term='NAT Host only'/><title type='text'>Migrating from vmware to Virtualbox: Making NAT networking type work
with SuSE Linux as guest OS and Windows Host</title><content type='html'>&lt;blockquote&gt;In the past two weeks, I have discovered a lot about Virtualbox. I wanted an easy alternative to vmware server/player and I had heard at a friend's party that virtualbox was another virtualization software in the market and it was free. Vmware workstation needs a paid license, so I decided to create a working virtual machine in which internet would work.&lt;/blockquote&gt;&lt;br/&gt;&lt;h2&gt;&lt;strong&gt;A difficult virtualbox journey.. from vmware&lt;br/&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;br/&gt;Intially, I dabbled with all sorts of network setups, but nothing seemed to work.&lt;br/&gt;&lt;blockquote&gt;&lt;em&gt;In the starting, I used static IPs -- 192.168.203.21 for eth0 and 10.10.10.21 for eth1, mostly because I had seen these IPs being used for NAT and Host only network types in Vmware. (later on, I realized that the network functionalities of Vmware and virtualbox are not the same. So host only in vmware may not be the same as host only in virtualbox).&lt;/em&gt;&lt;br/&gt;&lt;br/&gt;&lt;em&gt;This very setting was working for the SLES9 OS install done in Vmware, with the same setting in virtualbox, the network would not work.&lt;/em&gt;&lt;/blockquote&gt;&lt;br/&gt;The route command was taking a long time to print the output.&lt;br/&gt;&lt;br/&gt;The "route -n" command was coming out with output instantly though, which clearly pointed that the issue was with the name resolution or accessing the names server.&lt;br/&gt;&lt;h2&gt;Trivia...&lt;/h2&gt;&lt;br/&gt;During my efforts to make NAT networking work, on checking the c:\&amp;gt; ipconfig /all output in windows, I could see that the status of &lt;em&gt;Virtualbox TAP adapter &lt;/em&gt;(first network interface) was showing as &lt;strong&gt;"media disconnected".&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;I started reading different posts on the internet frantically and came across one very cryptic post at &lt;a href="http://eligere.wordpress.com/2008/03/12/virtualbox-windows-tap-disconnected-message-remove/" target="_blank"&gt;http://eligere.wordpress.com/2008/03/12/virtualbox-windows-tap-disconnected-message-remove/&lt;/a&gt; , which had an interesting hack to make the status of Virtualbox TAP adapter as always connected or with 0.0.0.0 IP when the VM was not started.&lt;br/&gt;&lt;br/&gt;The solution was to open up the Device manager in windows, right click on the Virtualbox TAP adapter, go to advanced tab, and select "Always connected" value for the Media Status option.&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/tap-adapter-media-disconnected.jpg"&gt;&lt;img class="alignnone size-full wp-image-10 alignleft" style="float:left;" src="http://opensourceexperiments.files.wordpress.com/2008/04/tap-adapter-media-disconnected.jpg" alt="" width="480" height="551" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;/p&gt;&lt;br/&gt;After this, the media state always shows as connected with a DHCP IP assigned to it in the subnet 169.254.xx.xx. If you read&lt;a href="http://en.wikipedia.org/wiki/Zeroconf"&gt; http://en.wikipedia.org/wiki/Zeroconf&lt;/a&gt;, you will come to know that &lt;tt&gt;169.254.0.0 - 169.254.255.255 &lt;/tt&gt;is a special range reserved for link-local set of addresses.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/ipconfig-output1.jpg"&gt; &lt;/a&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/ipconfig-output1.jpg"&gt;&lt;img class="alignnone size-medium wp-image-12" src="http://opensourceexperiments.files.wordpress.com/2008/04/ipconfig-output1.jpg?w=468" alt="" width="485" height="249" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;After making this change, the networking in the SLES9 guest OS &lt;strong&gt;STILL DID NOT work!!&lt;/strong&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Random ramblings...&lt;/h2&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;While searching on the virtualbox forums, I found a lot of posts talking of making Ubuntu work with Virtualbox.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;Well, I thought. At least ubuntu seems to work, if not SuSE. So, I decided to virtualbox with Ubuntu guest OS on a windows vista at home.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;I discovered that Ubuntu created a DHCP network interface for the first virtualbox TAP adapter, with an IP of 10.0.2.3, and networking was working just fine &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;out of the box!&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Trying DHCP for eth0 on SuSE linux..&lt;/h2&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;This lead me on to think that Virtualbox seemed to have a liking for DHCP networking interfaces, rather than static IPs.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;Using the "yast2" utility in the previous SLES9 virtual machine, I changed the eth0 network interface setting to DHCP and found that the ifconfig output had assigned an IP of 10.0.2.15 to eth0.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;What's more, the route command was not hanging anymore!&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;Somehow, a default gateway of 10.0.2.2 was being taken up by the OS. (although /etc/resolv.conf had an entry of 192.168.203.2 for the nameserver. Now, that was strange.)&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;But, internet was not working yet.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;&lt;strong&gt;Making internet work on SLES9 VM using virtualbox (in office intranet)....&lt;/strong&gt;&lt;/h2&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;To make networking work on SLES9 virtual machine, I still had do the following things:&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;1) Copied the DNS servers from the windows host into /etc/resolv.conf . &lt;em&gt;This could have been done through the yast2 utility too.&lt;/em&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;If I did not do this, then the route command was printing the expected output, but the nslookup for external websites like yahoo.com was failing or hanging.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;2) Changed default gateway as 10.0.2.2 through yast2 utility&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;3) Since I was behind in the office network, I had to setup the corporate proxy too through Yast2. It should be visible in the http_proxy environment variable in the SLES9 guest OS. This was crucial to make networking work. If this was not set, the ARP name resolution was happening, but the connection was hanging.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;A really easy way to check the networking connection was to use $ wget yahoo.com, which would tell the entire story very well.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;4) Another thing You COULD consider doing (but MAY NOT be necessary) could be syncing up (typing in the same MAC id) the MAC address of the Windows TAP Adapater in the Network setting of the Virtual machine definition in Virtualbox (before the VM starts). This may be relevant if you generated a new MAC id of the virtual network interface or you recreated a new virtualbox network interface.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;You may also have to change the new MAC id in name of the file /etc/sysconfig/network/ifcfg-eth-id-&amp;lt;MAC:ID&amp;gt; , which controls the internal names of the network interface.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;I started going on this path and did this consistency naming for the first network interface, but did not bother doing so for the other one, and even then networking was working just fine.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Experimenting with 2 NAT type Virtualbox TAP adapters&lt;/h2&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;Then I tried configuring the guest OS VM with 2 NATs and this is how the ifconfig output came up like:&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/ifconfig-output-with-2-nat-interfaces.jpg"&gt;&lt;img class="alignnone size-full wp-image-13" src="http://opensourceexperiments.files.wordpress.com/2008/04/ifconfig-output-with-2-nat-interfaces.jpg?w=468" alt="" width="468" height="386" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;The route command came up like:&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/route-output1.jpg"&gt;&lt;img class="alignnone size-full wp-image-14" src="http://opensourceexperiments.files.wordpress.com/2008/04/route-output1.jpg?w=468" alt="" width="468" height="97" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;I was able to browse external websites ....&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/browsing.jpg"&gt;&lt;img class="alignnone size-full wp-image-15" src="http://opensourceexperiments.files.wordpress.com/2008/04/browsing.jpg?w=468" alt="" width="560" height="373" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;An important learning about how NAT works in Virtualbox..&lt;/h2&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;Summing it up, I made an important discovery (for me) about how NAT works in virtualbox.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;In reality, the NAT setup was really, really easy and worked for most people. To make it work, all that was needed to be done was let the Guest OS get an IP in the subnet 10.0.2.x through DHCP, have a default gateway of 10.0.2.2 and a names server of 10.0.2.3. With this, everything was hunky dory.&lt;/p&gt;&lt;br/&gt;&lt;p style="text-align:left;"&gt;Had I chosen multiple NAT type Virtualbox TAP adapters for the Virtual machine (you can choose upto 4), the third and fourth ones would have acquired IPs in the subnet 10.0.3.x and 10.0.4.x. This is assuming eth2 and eth3 would have been of type DHCP.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Extending this concept to Static IPs..&lt;/h2&gt;&lt;br/&gt;When I discussed this finding with Srikanth, the sysadmi of my wife's company, he said that since DHCP server is giving an IP in the subnet range 10.0.2.x, one should be able to setup any static IP value for that network interface in the same range!&lt;br/&gt;&lt;br/&gt;The more I thought about it, the more it seemed to make sense. And then, try it out I did. And work it did. (Yes, sir). I put eth0 as static ip of 10.0.2.5, default gateway 10.0.2.2, names server 10.0.2.3 and networking worked fine.&lt;br/&gt;&lt;p style="text-align:left;"&gt;So basically, each NAT interface allows you to choose any IP in the range 10.0.N.x, where N &amp;gt;=2 and x ranges from 4 and 255 (leaving off 10.0.N.[1-3] for special functions of default gateway/names server).&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Redemption..&lt;/h2&gt;&lt;br/&gt;Having experimented and dealt in depth with the NAT network interface of virtualbox, I was happy to have learnt something of value in the networking arena, which was an area of improvement for me.&lt;br/&gt;&lt;br/&gt;What's more, I learnt that its easier to make networking work in Virtualbox than it is in VMware, provided you let the OS choose the IP in its desired magical subnet -- 10.0.N.x.&lt;br/&gt;&lt;p style="text-align:left;"&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-4604845192546093848?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/4604845192546093848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/migrating-from-vmware-to-virtualbox.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/4604845192546093848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/4604845192546093848'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/migrating-from-vmware-to-virtualbox.html' title='Migrating from vmware to Virtualbox: Making NAT networking type work&#xA;with SuSE Linux as guest OS and Windows Host'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7119076004819787314.post-1436121618953518773</id><published>2008-04-05T16:32:00.000-04:00</published><updated>2010-12-30T22:41:32.840-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='content creation'/><category scheme='http://www.blogger.com/atom/ns#' term='video content'/><category scheme='http://www.blogger.com/atom/ns#' term='moseasymedia joomla 1.5 video google youtube'/><title type='text'>Making Youtube or Google Video work with moseasymedia plugin of Joomla!</title><content type='html'>I was trying to have some video content to the posts in Joomla! 1.5.x and fond the &lt;a href="http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,2288/Itemid,35/"&gt;moseasymedia plugin.&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Making it work, however, was another challenge. After the installation, you need to trigger the setup data for the plugin. This can be done by Logging into Administrator console, go to Extensions-&amp;gt;Plug in Manager. Choose &lt;a href="http://localhost/joomla/administrator/index.php?option=com_plugins&amp;amp;view=plugin&amp;amp;client=site&amp;amp;task=edit&amp;amp;cid%5B%5D=42"&gt; moseasymedia&lt;/a&gt; plugin and enable it. Then drill down on the &lt;a href="http://localhost/joomla/administrator/index.php?option=com_plugins&amp;amp;view=plugin&amp;amp;client=site&amp;amp;task=edit&amp;amp;cid%5B%5D=42"&gt; moseasymedia&lt;/a&gt; plugin and delibarately save it (for kicks). This triggers the setup data of the plugin. (phew!) -- unfortunately, I came to understand this after reading too many forums and thats when it kicked in.. (an Aha moment).&lt;br/&gt;&lt;br/&gt;Now, you can put the following line in your article content and get a video window in the preview:&lt;br/&gt;&lt;br/&gt;{moseasymedia media=http://www.youtube.com/watch/v/iDMnP8uyM9c}&lt;br/&gt;&lt;br/&gt;Mind you, here the original Youtube video URL was http://www.youtube.com/watch?v=iDMnP8uyM9c.  The ? and = characters had to be replaced with / to make it work. Similarly so for Google video.&lt;br/&gt;&lt;br/&gt;Another neat trick is that if you know the file extention of video being played, you can add the player=&amp;lt;playerkeyword&amp;gt; (you can get the keywords of the various players by clicking on &lt;a href="http://localhost/joomla/administrator/index.php?option=com_plugins&amp;amp;view=plugin&amp;amp;client=site&amp;amp;task=edit&amp;amp;cid%5B%5D=42"&gt; moseasymedia&lt;/a&gt; plugin in Extensions -&amp;gt; Plugin Manager and observing the Media player entries in the parameter section) in the directive like this:&lt;br/&gt;&lt;br/&gt;{moseasymedia player=JWFLVPlayer media=http://www.mediacollege.com/video-gallery/testclips/20051210-w50s.flv}&lt;br/&gt;&lt;br/&gt;I tried making it work without the player= tag, but it did not work, but it works beautifully with the player= tag.&lt;br/&gt;&lt;p style="text-align:center;"&gt;&lt;a href="http://opensourceexperiments.files.wordpress.com/2008/04/video-plugin1.jpg"&gt;&lt;img class="alignnone size-medium wp-image-8" src="http://opensourceexperiments.files.wordpress.com/2008/04/video-plugin1.jpg" alt="The Youtube Video example" width="373" height="380" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7119076004819787314-1436121618953518773?l=open-source-experiments.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-source-experiments.blogspot.com/feeds/1436121618953518773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/making-youtube-or-google-video-work.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/1436121618953518773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7119076004819787314/posts/default/1436121618953518773'/><link rel='alternate' type='text/html' href='http://open-source-experiments.blogspot.com/2008/04/making-youtube-or-google-video-work.html' title='Making Youtube or Google Video work with moseasymedia plugin of Joomla!'/><author><name>Bharat's pride</name><uri>http://www.blogger.com/profile/16310884442200766672</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
