<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[baijia - papers and notes - All Forums]]></title>
		<link>http://baijia.info/</link>
		<description><![CDATA[baijia - papers and notes - http://baijia.info]]></description>
		<pubDate>Wed, 10 Mar 2010 16:40:43 -0500</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[baijia.info forum development]]></title>
			<link>http://baijia.info/showthread.php?tid=450</link>
			<pubDate>Mon, 08 Mar 2010 22:51:13 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=450</guid>
			<description><![CDATA[I have been trying to attach some files (PDF or PPT) to some posts but often failed. My impression is that when the file is larger it does not work. But I've set up the system to accept sufficiently large files. Could someone looks into it and fix the problem?]]></description>
			<content:encoded><![CDATA[I have been trying to attach some files (PDF or PPT) to some posts but often failed. My impression is that when the file is larger it does not work. But I've set up the system to accept sufficiently large files. Could someone looks into it and fix the problem?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Kant...Data center power management]]></title>
			<link>http://baijia.info/showthread.php?tid=449</link>
			<pubDate>Mon, 08 Mar 2010 22:46:36 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=449</guid>
			<description><![CDATA[Supercomputing 2009 Tutorial Data Center Power Management<br />
Krishna Kant and David Du]]></description>
			<content:encoded><![CDATA[Supercomputing 2009 Tutorial Data Center Power Management<br />
Krishna Kant and David Du]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Overview]]></title>
			<link>http://baijia.info/showthread.php?tid=448</link>
			<pubDate>Sun, 07 Mar 2010 02:23:42 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=448</guid>
			<description><![CDATA[Welcome to use the system to start your work! <br />
<br />
Please read the following guidelines, you can find many useful information to help you develop your work quickly.<br />
<br />
The work flow of system using is as follows.<br />
<br />
1)First we tracks our system and accounts here : <a href="http://baijia.info/showthread.php?tid=300" target="_blank">http://baijia.info/showthread.php?tid=300</a><br />
<br />
You can know the basic information of each physical or virtual machine and the permissions of each account. According those information, you will have an overview of the system and know the permissions of your account. <br />
<br />
2) Before you use the servers, please read this post: <a href="http://baijia.info/showthread.php?tid=253." target="_blank">http://baijia.info/showthread.php?tid=253.</a><br />
<br />
It tracks and coordinates the usage of the servers. Please read previous posts to know which resources have been allocated and which can be used. After you run some tasks you can post a usage log to let others know those resources have been allocated. It can avoid wrong killing. <br />
<br />
3) We use git for source control now. If you are not familiar with git, you can read this first:  <a href="http://git-scm.com/." target="_blank">http://git-scm.com/.</a> Then please read this tutorial to know how to use git in our server : <a href="http://baijia.info/showthread.php?tid=441" target="_blank">http://baijia.info/showthread.php?tid=441</a><br />
<br />
4) If you want to know how to set up the system, please browse the System setup &amp; tutorial subforum (<a href="http://baijia.info/forumdisplay.php?fid=101)" target="_blank">http://baijia.info/forumdisplay.php?fid=101)</a> to get more information. <br />
<br />
Hope above information is helpful to you.]]></description>
			<content:encoded><![CDATA[Welcome to use the system to start your work! <br />
<br />
Please read the following guidelines, you can find many useful information to help you develop your work quickly.<br />
<br />
The work flow of system using is as follows.<br />
<br />
1)First we tracks our system and accounts here : <a href="http://baijia.info/showthread.php?tid=300" target="_blank">http://baijia.info/showthread.php?tid=300</a><br />
<br />
You can know the basic information of each physical or virtual machine and the permissions of each account. According those information, you will have an overview of the system and know the permissions of your account. <br />
<br />
2) Before you use the servers, please read this post: <a href="http://baijia.info/showthread.php?tid=253." target="_blank">http://baijia.info/showthread.php?tid=253.</a><br />
<br />
It tracks and coordinates the usage of the servers. Please read previous posts to know which resources have been allocated and which can be used. After you run some tasks you can post a usage log to let others know those resources have been allocated. It can avoid wrong killing. <br />
<br />
3) We use git for source control now. If you are not familiar with git, you can read this first:  <a href="http://git-scm.com/." target="_blank">http://git-scm.com/.</a> Then please read this tutorial to know how to use git in our server : <a href="http://baijia.info/showthread.php?tid=441" target="_blank">http://baijia.info/showthread.php?tid=441</a><br />
<br />
4) If you want to know how to set up the system, please browse the System setup &amp; tutorial subforum (<a href="http://baijia.info/forumdisplay.php?fid=101)" target="_blank">http://baijia.info/forumdisplay.php?fid=101)</a> to get more information. <br />
<br />
Hope above information is helpful to you.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Apache related]]></title>
			<link>http://baijia.info/showthread.php?tid=447</link>
			<pubDate>Thu, 04 Mar 2010 10:34:55 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=447</guid>
			<description><![CDATA[Set up htpasswd:<br />
    htpasswd &lt;auth file&gt; &lt;user name&gt;]]></description>
			<content:encoded><![CDATA[Set up htpasswd:<br />
    htpasswd &lt;auth file&gt; &lt;user name&gt;]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[subvsersion examples]]></title>
			<link>http://baijia.info/showthread.php?tid=446</link>
			<pubDate>Thu, 04 Mar 2010 09:11:19 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=446</guid>
			<description><![CDATA[Check out via http<br />
svn co http://&lt;domain name&gt;/&lt;path&gt; --username &lt;username&gt;]]></description>
			<content:encoded><![CDATA[Check out via http<br />
svn co http://&lt;domain name&gt;/&lt;path&gt; --username &lt;username&gt;]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Castro...Fast byte-granularity software fault isolation.SOSP09]]></title>
			<link>http://baijia.info/showthread.php?tid=445</link>
			<pubDate>Sun, 28 Feb 2010 10:01:50 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=445</guid>
			<description><![CDATA[Castro, M., Costa, M., Martin, J., Peinado, M., Akritidis, P., Donnelly, A., Barham, P., and Black, R. Fast byte-granularity software fault isolation. In Proceedings of the ACM SIGOPS 22nd Symposium on Operating Systems Principles (Big Sky, Montana, USA, October 11 - 14, 2009). SOSP '09. ACM, New York, NY, 45-58]]></description>
			<content:encoded><![CDATA[Castro, M., Costa, M., Martin, J., Peinado, M., Akritidis, P., Donnelly, A., Barham, P., and Black, R. Fast byte-granularity software fault isolation. In Proceedings of the ACM SIGOPS 22nd Symposium on Operating Systems Principles (Big Sky, Montana, USA, October 11 - 14, 2009). SOSP '09. ACM, New York, NY, 45-58]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Hennessy...Computer architecture: a quantitative approach 4th ed. Morgan]]></title>
			<link>http://baijia.info/showthread.php?tid=444</link>
			<pubDate>Tue, 23 Feb 2010 22:21:47 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=444</guid>
			<description><![CDATA[Hennessy, J. L. and Patterson, D. A. 2006 Computer Architecture, Fourth Edition: a Quantitative Approach. Morgan Kaufmann Publishers Inc. <br />
<br />
@book{hennessy06computer,<br />
 author = {Hennessy, John L. and Patterson, David A.},<br />
 title = {Computer Architecture, Fourth Edition: A Quantitative Approach},<br />
 year = {2006},<br />
 isbn = {0123704901},<br />
 publisher = {Morgan Kaufmann Publishers Inc.},<br />
 address = {San Francisco, CA, USA},<br />
}]]></description>
			<content:encoded><![CDATA[Hennessy, J. L. and Patterson, D. A. 2006 Computer Architecture, Fourth Edition: a Quantitative Approach. Morgan Kaufmann Publishers Inc. <br />
<br />
@book{hennessy06computer,<br />
 author = {Hennessy, John L. and Patterson, David A.},<br />
 title = {Computer Architecture, Fourth Edition: A Quantitative Approach},<br />
 year = {2006},<br />
 isbn = {0123704901},<br />
 publisher = {Morgan Kaufmann Publishers Inc.},<br />
 address = {San Francisco, CA, USA},<br />
}]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Unified Linux logon and home directory using OpenLDAP and NFS/automount]]></title>
			<link>http://baijia.info/showthread.php?tid=443</link>
			<pubDate>Mon, 22 Feb 2010 05:21:18 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=443</guid>
			<description><![CDATA[0. System environment<br />
=====================<br />
<br />
LDAP and NFS server:<br />
IP: 10.0.0.2<br />
OS: CentOS 5.3 X86_64<br />
ldap base dn: "dc=lgcpu1"<br />
<br />
Clients:<br />
IP: 10.0.0.1/24<br />
OS: Fedora 11 X86_64<br />
<br />
1. LDAP server<br />
==============<br />
<br />
1.1 Package installation:<br />
-------------------------<br />
# yum install openldap-servers<br />
# /sbin/chkconfig ldap on<br />
# /sbin/service ldap start<br />
<br />
emacs /etc/openldap/slapd.conf<br />
<br />
1.2 Add or edit these configurations:<br />
-------------------------------------<br />
<br />
### begin ###<br />
<br />
include /etc/openldap/schema/redhat/autofs.schema<br />
<br />
#######################################################################<br />
# ldbm and/or bdb database definitions<br />
#######################################################################<br />
<br />
database ldbm<br />
suffix "dc=lgcpu1"<br />
rootdn "cn=Manager,dc=lgcpu1"<br />
<br />
rootpw {crypt}x<br />
<br />
# Access Control<br />
access to attr=userPassword<br />
by self write<br />
by anonymous auth<br />
by dn="cn=manager,dc=lgcpu1" write<br />
by * compare<br />
access to *<br />
by self write<br />
by dn="cn=manager,dc=lgcpu1" write<br />
by * read<br />
<br />
### end ###<br />
<br />
How to get the rootpw:<br />
<br />
perl -e "print crypt('passwd', 'salt_string',);"<br />
<br />
1.3 Add top.ldif<br />
----------------<br />
<br />
top.ldif:<br />
<br />
### begin ###<br />
<br />
dn: dc=lgcpu1<br />
objectclass: dcObject<br />
objectclass: organization<br />
o: lgcpu1 group<br />
dc: lgcpu1<br />
<br />
dn: cn=manager,dc=lgcpu1<br />
objectclass: organizationalRole<br />
cn: manager<br />
<br />
dn: ou=people,dc=lgcpu1<br />
ou: people<br />
objectclass: organizationalUnit<br />
objectclass: domainRelatedObject<br />
associatedDomain: lgcpu1<br />
<br />
dn: ou=contacts,ou=people,dc=lgcpu1<br />
ou: contacts<br />
ou: people<br />
objectclass: organizationalUnit<br />
objectclass: domainRelatedObject<br />
associatedDomain: lgcpu1<br />
<br />
dn: ou=group,dc=lgcpu1<br />
ou: group<br />
objectclass: organizationalUnit<br />
objectclass: domainRelatedObject<br />
associatedDomain: lgcpu1<br />
<br />
### end ###<br />
<br />
Add top.ldif to ldap server:<br />
<br />
&#36; ldapadd -x -D 'cn=manager,dc=lgcpu1' -W -f top.ldif<br />
<br />
1.4 Add users and groups from local configuration:<br />
--------------------------------------------------<br />
<br />
Copy passwd shadow group from /etc/ to some tmp location<br />
Edit them and only keep the normal users, that means no system users.<br />
<br />
&#36; emacs /usr/share/openldap/migration/migrate_common.ph<br />
<br />
Edit these values:<br />
<br />
### begin ###<br />
<br />
# Default DNS domain<br />
&#36;DEFAULT_MAIL_DOMAIN = "cse.ust.hk";<br />
<br />
# Default base<br />
&#36;DEFAULT_BASE = "dc=lgcpu1";<br />
<br />
### end ###<br />
<br />
&#36; /usr/share/openldap/migration/migrate_passwd.pl ./passwd &gt; people.ldif<br />
<br />
Then add the encryped password from shadow file to userPassword.<br />
<br />
Like this:<br />
userPassword: {crypt}&#36;1&#36;Zlkjsdf...<br />
<br />
Then add people.ldif to ldap server<br />
<br />
&#36; /usr/share/openldap/migration/migrate_group.ph ./group &gt; group.ldif<br />
<br />
Then add group.ldif to ldap server<br />
<br />
2. NFS server<br />
=============<br />
<br />
emacs /etc/exports<br />
------------------<br />
<br />
### begin ###<br />
/home 10.0.0.1/24(rw)<br />
### begin ###<br />
<br />
auto.master.ldif<br />
----------------<br />
<br />
### begin ###<br />
<br />
dn: ou=auto.master,dc=lgcpu1<br />
objectClass: top<br />
objectClass: automountMap<br />
ou: auto.master<br />
<br />
dn: cn=/home,ou=auto.master,dc=lgcpu1<br />
objectClass: automount<br />
automountInformation: ldap:ou=auto.home,dc=lgcpu1<br />
cn: /home<br />
<br />
dn: cn=/share,ou=auto.master,dc=lgcpu1<br />
objectClass: automount<br />
automountInformation: ldap:ou=auto.misc, dc=lgcpu1<br />
cn: /share<br />
<br />
### end ###<br />
<br />
add auto.master.ldif<br />
<br />
auto.home.ldif<br />
--------------<br />
Add for every users<br />
<br />
### begin ###<br />
<br />
dn: ou=auto.home,dc=lgcpu1<br />
objectClass: top<br />
objectClass: automountMap<br />
ou: auto.home<br />
<br />
dn: cn=zma,ou=auto.home,dc=lgcpu1<br />
objectClass: automount<br />
automountInformation: 10.0.0.2:/home/zma<br />
cn: zma<br />
<br />
### end ###<br />
<br />
add auto.home.ldif<br />
<br />
auto.misc.ldif<br />
--------------<br />
Add for some common share directories<br />
<br />
### begin ###<br />
<br />
dn: ou=auto.misc,dc=lgcpu1<br />
objectClass: top<br />
objectClass: automountMap<br />
ou: auto.misc<br />
<br />
### end ###<br />
<br />
add auto.misc.ldif<br />
<br />
3. Client configuration<br />
=======================<br />
<br />
3.1 Packages installation<br />
-------------------------<br />
<br />
# yum install nss_ldap autofs nfs-utils<br />
# chkconfig autofs on<br />
# chkconfig nfs on<br />
# service autofs start<br />
# service nfs start<br />
<br />
3.2 Configuration<br />
-----------------<br />
<br />
# authconfig-tui<br />
<br />
Select like this:<br />
<br />
| User Information Authentication │<br />
│ [ &#93; Cache Information [*&#93; Use MD5 Passwords │<br />
│ [ &#93; Use Hesiod [*&#93; Use Shadow Passwords │<br />
│ [*&#93; Use LDAP [*&#93; Use LDAP Authentication │<br />
│ [ &#93; Use NIS [ &#93; Use Kerberos │<br />
│ [ &#93; Use Winbind [ &#93; Use Fingerprint reader │<br />
│ [ &#93; Use Winbind Authentication │<br />
│ [*&#93; Local authorization is sufficient │<br />
<br />
In next step:<br />
<br />
│ [ &#93; Use TLS │<br />
│ Server: ldap://10.0.0.2/________________________ │<br />
│ Base DN: dc=lgcpu1_______________________________ │<br />
<br />
3.3 Delete old user entries in:<br />
-------------------------------<br />
/etc/passwd<br />
/etc/shadow<br />
/etc/group<br />
/etc/gshadow<br />
<br />
4. add individual person<br />
========================<br />
<br />
Add people.sample.ldif to ldap<br />
------------------------------<br />
<br />
### begin ###<br />
<br />
dn: uid=sample,ou=People,dc=lgcpu1<br />
uid: sample<br />
cn: sample<br />
sn: sample<br />
mail: sample@cse.ust.hk<br />
objectClass: person<br />
objectClass: organizationalPerson<br />
objectClass: inetOrgPerson<br />
objectClass: posixAccount<br />
objectClass: top<br />
userPassword: {crypt}&#36;6&#36;encryped password here<br />
loginShell: /bin/bash<br />
uidNumber: 507<br />
gidNumber: 507<br />
homeDirectory: /home/sample<br />
<br />
### end ###<br />
<br />
Add group.sample.ldif to ldap<br />
-----------------------------<br />
<br />
### begin ###<br />
<br />
dn: cn=sample,ou=Group,dc=lgcpu1<br />
objectClass: posixGroup<br />
objectClass: top<br />
cn: sample<br />
userPassword: {crypt}x<br />
gidNumber: 507<br />
<br />
### end ###<br />
<br />
Addauto.home.sample.ldif to ldap<br />
--------------------------------<br />
<br />
### begin ###<br />
<br />
dn: cn=sample,ou=auto.home,dc=lgcpu1<br />
objectClass: automount<br />
automountInformation: 10.0.0.2:/home/sample<br />
cn: sample<br />
<br />
### end ###<br />
<br />
Delete old entries in:<br />
----------------------<br />
<br />
/etc/passwd<br />
/etc/shadow<br />
/etc/group<br />
/etc/gshadow<br />
<br />
Create home directory on NFS server:<br />
------------------------------------<br />
<br />
# mkdir /home/sample<br />
# cp /etc/skel/.[a-z&#93; * /home/sample/<br />
# chmod -R sample\: /home/sample/<br />
<br />
Another copy is posted <a href="http://zhiqiangma.info/unified-linux-login-and-home-directory-using-openldap-and-nfsautomount/" target="_blank">here</a>.]]></description>
			<content:encoded><![CDATA[0. System environment<br />
=====================<br />
<br />
LDAP and NFS server:<br />
IP: 10.0.0.2<br />
OS: CentOS 5.3 X86_64<br />
ldap base dn: "dc=lgcpu1"<br />
<br />
Clients:<br />
IP: 10.0.0.1/24<br />
OS: Fedora 11 X86_64<br />
<br />
1. LDAP server<br />
==============<br />
<br />
1.1 Package installation:<br />
-------------------------<br />
# yum install openldap-servers<br />
# /sbin/chkconfig ldap on<br />
# /sbin/service ldap start<br />
<br />
emacs /etc/openldap/slapd.conf<br />
<br />
1.2 Add or edit these configurations:<br />
-------------------------------------<br />
<br />
### begin ###<br />
<br />
include /etc/openldap/schema/redhat/autofs.schema<br />
<br />
#######################################################################<br />
# ldbm and/or bdb database definitions<br />
#######################################################################<br />
<br />
database ldbm<br />
suffix "dc=lgcpu1"<br />
rootdn "cn=Manager,dc=lgcpu1"<br />
<br />
rootpw {crypt}x<br />
<br />
# Access Control<br />
access to attr=userPassword<br />
by self write<br />
by anonymous auth<br />
by dn="cn=manager,dc=lgcpu1" write<br />
by * compare<br />
access to *<br />
by self write<br />
by dn="cn=manager,dc=lgcpu1" write<br />
by * read<br />
<br />
### end ###<br />
<br />
How to get the rootpw:<br />
<br />
perl -e "print crypt('passwd', 'salt_string',);"<br />
<br />
1.3 Add top.ldif<br />
----------------<br />
<br />
top.ldif:<br />
<br />
### begin ###<br />
<br />
dn: dc=lgcpu1<br />
objectclass: dcObject<br />
objectclass: organization<br />
o: lgcpu1 group<br />
dc: lgcpu1<br />
<br />
dn: cn=manager,dc=lgcpu1<br />
objectclass: organizationalRole<br />
cn: manager<br />
<br />
dn: ou=people,dc=lgcpu1<br />
ou: people<br />
objectclass: organizationalUnit<br />
objectclass: domainRelatedObject<br />
associatedDomain: lgcpu1<br />
<br />
dn: ou=contacts,ou=people,dc=lgcpu1<br />
ou: contacts<br />
ou: people<br />
objectclass: organizationalUnit<br />
objectclass: domainRelatedObject<br />
associatedDomain: lgcpu1<br />
<br />
dn: ou=group,dc=lgcpu1<br />
ou: group<br />
objectclass: organizationalUnit<br />
objectclass: domainRelatedObject<br />
associatedDomain: lgcpu1<br />
<br />
### end ###<br />
<br />
Add top.ldif to ldap server:<br />
<br />
&#36; ldapadd -x -D 'cn=manager,dc=lgcpu1' -W -f top.ldif<br />
<br />
1.4 Add users and groups from local configuration:<br />
--------------------------------------------------<br />
<br />
Copy passwd shadow group from /etc/ to some tmp location<br />
Edit them and only keep the normal users, that means no system users.<br />
<br />
&#36; emacs /usr/share/openldap/migration/migrate_common.ph<br />
<br />
Edit these values:<br />
<br />
### begin ###<br />
<br />
# Default DNS domain<br />
&#36;DEFAULT_MAIL_DOMAIN = "cse.ust.hk";<br />
<br />
# Default base<br />
&#36;DEFAULT_BASE = "dc=lgcpu1";<br />
<br />
### end ###<br />
<br />
&#36; /usr/share/openldap/migration/migrate_passwd.pl ./passwd &gt; people.ldif<br />
<br />
Then add the encryped password from shadow file to userPassword.<br />
<br />
Like this:<br />
userPassword: {crypt}&#36;1&#36;Zlkjsdf...<br />
<br />
Then add people.ldif to ldap server<br />
<br />
&#36; /usr/share/openldap/migration/migrate_group.ph ./group &gt; group.ldif<br />
<br />
Then add group.ldif to ldap server<br />
<br />
2. NFS server<br />
=============<br />
<br />
emacs /etc/exports<br />
------------------<br />
<br />
### begin ###<br />
/home 10.0.0.1/24(rw)<br />
### begin ###<br />
<br />
auto.master.ldif<br />
----------------<br />
<br />
### begin ###<br />
<br />
dn: ou=auto.master,dc=lgcpu1<br />
objectClass: top<br />
objectClass: automountMap<br />
ou: auto.master<br />
<br />
dn: cn=/home,ou=auto.master,dc=lgcpu1<br />
objectClass: automount<br />
automountInformation: ldap:ou=auto.home,dc=lgcpu1<br />
cn: /home<br />
<br />
dn: cn=/share,ou=auto.master,dc=lgcpu1<br />
objectClass: automount<br />
automountInformation: ldap:ou=auto.misc, dc=lgcpu1<br />
cn: /share<br />
<br />
### end ###<br />
<br />
add auto.master.ldif<br />
<br />
auto.home.ldif<br />
--------------<br />
Add for every users<br />
<br />
### begin ###<br />
<br />
dn: ou=auto.home,dc=lgcpu1<br />
objectClass: top<br />
objectClass: automountMap<br />
ou: auto.home<br />
<br />
dn: cn=zma,ou=auto.home,dc=lgcpu1<br />
objectClass: automount<br />
automountInformation: 10.0.0.2:/home/zma<br />
cn: zma<br />
<br />
### end ###<br />
<br />
add auto.home.ldif<br />
<br />
auto.misc.ldif<br />
--------------<br />
Add for some common share directories<br />
<br />
### begin ###<br />
<br />
dn: ou=auto.misc,dc=lgcpu1<br />
objectClass: top<br />
objectClass: automountMap<br />
ou: auto.misc<br />
<br />
### end ###<br />
<br />
add auto.misc.ldif<br />
<br />
3. Client configuration<br />
=======================<br />
<br />
3.1 Packages installation<br />
-------------------------<br />
<br />
# yum install nss_ldap autofs nfs-utils<br />
# chkconfig autofs on<br />
# chkconfig nfs on<br />
# service autofs start<br />
# service nfs start<br />
<br />
3.2 Configuration<br />
-----------------<br />
<br />
# authconfig-tui<br />
<br />
Select like this:<br />
<br />
| User Information Authentication │<br />
│ [ ] Cache Information [*] Use MD5 Passwords │<br />
│ [ ] Use Hesiod [*] Use Shadow Passwords │<br />
│ [*] Use LDAP [*] Use LDAP Authentication │<br />
│ [ ] Use NIS [ ] Use Kerberos │<br />
│ [ ] Use Winbind [ ] Use Fingerprint reader │<br />
│ [ ] Use Winbind Authentication │<br />
│ [*] Local authorization is sufficient │<br />
<br />
In next step:<br />
<br />
│ [ ] Use TLS │<br />
│ Server: ldap://10.0.0.2/________________________ │<br />
│ Base DN: dc=lgcpu1_______________________________ │<br />
<br />
3.3 Delete old user entries in:<br />
-------------------------------<br />
/etc/passwd<br />
/etc/shadow<br />
/etc/group<br />
/etc/gshadow<br />
<br />
4. add individual person<br />
========================<br />
<br />
Add people.sample.ldif to ldap<br />
------------------------------<br />
<br />
### begin ###<br />
<br />
dn: uid=sample,ou=People,dc=lgcpu1<br />
uid: sample<br />
cn: sample<br />
sn: sample<br />
mail: sample@cse.ust.hk<br />
objectClass: person<br />
objectClass: organizationalPerson<br />
objectClass: inetOrgPerson<br />
objectClass: posixAccount<br />
objectClass: top<br />
userPassword: {crypt}&#36;6&#36;encryped password here<br />
loginShell: /bin/bash<br />
uidNumber: 507<br />
gidNumber: 507<br />
homeDirectory: /home/sample<br />
<br />
### end ###<br />
<br />
Add group.sample.ldif to ldap<br />
-----------------------------<br />
<br />
### begin ###<br />
<br />
dn: cn=sample,ou=Group,dc=lgcpu1<br />
objectClass: posixGroup<br />
objectClass: top<br />
cn: sample<br />
userPassword: {crypt}x<br />
gidNumber: 507<br />
<br />
### end ###<br />
<br />
Addauto.home.sample.ldif to ldap<br />
--------------------------------<br />
<br />
### begin ###<br />
<br />
dn: cn=sample,ou=auto.home,dc=lgcpu1<br />
objectClass: automount<br />
automountInformation: 10.0.0.2:/home/sample<br />
cn: sample<br />
<br />
### end ###<br />
<br />
Delete old entries in:<br />
----------------------<br />
<br />
/etc/passwd<br />
/etc/shadow<br />
/etc/group<br />
/etc/gshadow<br />
<br />
Create home directory on NFS server:<br />
------------------------------------<br />
<br />
# mkdir /home/sample<br />
# cp /etc/skel/.[a-z] * /home/sample/<br />
# chmod -R sample\: /home/sample/<br />
<br />
Another copy is posted <a href="http://zhiqiangma.info/unified-linux-login-and-home-directory-using-openldap-and-nfsautomount/" target="_blank">here</a>.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Hadoop setup tutorial]]></title>
			<link>http://baijia.info/showthread.php?tid=442</link>
			<pubDate>Mon, 22 Feb 2010 05:19:34 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=442</guid>
			<description><![CDATA[1. Packages<br />
===========<br />
<br />
Sun Java JDK:<br />
-------------<br />
<a href="http://java.sun.com/" target="_blank">http://java.sun.com/</a><br />
Installed in /usr/java/jdk1.6.0_16<br />
<br />
Hadoop:<br />
-------<br />
<a href="http://hadoop.apache.org/" target="_blank">http://hadoop.apache.org/</a><br />
<br />
Unpack it to somewhere. /lhome/zma/hadoop in this example<br />
For convenience:<br />
&#36; ln -s /lhome/zma/hadoop/bin/* /home/zma/bin/<br />
<br />
2. Hosts<br />
========<br />
<br />
Add lines like this to /etc/hosts of ALL hosts:<br />
We use four machines here.<br />
<br />
### begin ###<br />
10.0.0.103 vm103<br />
10.0.0.104 vm104<br />
10.0.0.105 vm105<br />
10.0.0.106 vm106<br />
### begin ###<br />
<br />
Change the host's name to the name described.<br />
---------------------------------------------<br />
<br />
Configure iptables:<br />
-------------------<br />
We use 9000 and 9001 in this example.<br />
<br />
3. SSH Login without password<br />
=============================<br />
<br />
Generate private and public key:<br />
<br />
&#36; ssh-keygen -t rsa<br />
&#36; chmod 700 .ssh<br />
&#36; cat .ssh/id_rsa &gt;&gt; .ssh/authorized_keys<br />
&#36; chmod 755 .ssh.authorized_keys<br />
&#36; scp -r .ssh "all hosts, one by one":/home/directory/<br />
<br />
Try to ssh hosts:<br />
<br />
&#36; for ((i=103; i&lt;=106; i++)); do ssh vm&#36;i ; done;<br />
<br />
4. Hadoop Configurations<br />
========================<br />
<br />
hadoop/conf/hadoop-env.h<br />
------------------------<br />
<br />
Add or change these lines:<br />
<br />
### begin ###<br />
<br />
export JAVA_HOME=/usr/java/jdk1.6.0_16<br />
export HADOOP_HOME=/lhome/zma/hadoop<br />
<br />
### end ###<br />
<br />
hadoop/conf/core-site.xml<br />
-------------------------<br />
<br />
Add these lines:<br />
Here namenode is vm103.<br />
### begin ###<br />
&lt;property&gt;<br />
&lt;name&gt;fs.default.name&lt;/name&gt;<br />
&lt;value&gt;hdfs://vm103:9000/&lt;/value&gt;<br />
&lt;/property&gt;<br />
### end ###<br />
<br />
hadoop/conf/hdfs-site.xml<br />
-------------------------<br />
<br />
Add these lines:<br />
### begin ###<br />
&lt;property&gt;<br />
&lt;name&gt;dfs.replication&lt;/name&gt;<br />
&lt;value&gt;2&lt;/value&gt;<br />
&lt;/property&gt;<br />
### end ###<br />
<br />
hadoop/conf/mapred-site.xml<br />
---------------------------<br />
<br />
Add these lines:<br />
Here jobtracker is vm104.<br />
### begin ###<br />
&lt;property&gt;<br />
&lt;name&gt;mapred.job.tracker&lt;/name&gt;<br />
&lt;value&gt;vm104:9001&lt;/value&gt;<br />
&lt;/property&gt;<br />
### end ###<br />
<br />
hadoop/conf/masters<br />
-------------------<br />
<br />
Delete localhost and add:<br />
### begin ###<br />
vm103<br />
vm104<br />
### end ###<br />
<br />
hadoop/conf/slaves<br />
------------------<br />
<br />
Delete localhost and add:<br />
### begin ###<br />
vm103<br />
vm104<br />
vm105<br />
vm106<br />
### end ###<br />
<br />
5. Duplicate hadoop to all hosts<br />
================================<br />
<br />
&#36; for ((i=104; i&lt;=106; i++)); do scp -r /lhome/zma/hadoop vm&#36;i:/lhome/zma/ ; done;<br />
<br />
Here we are on vm103.<br />
<br />
6. Start Hadoop<br />
===============<br />
<br />
On vm103 (namenode):<br />
<br />
Format a new distributed-filesystem:<br />
&#36; hadoop namenode -format<br />
<br />
Start hdfs:<br />
&#36; start-dfs.sh<br />
<br />
Check the hdfs status:<br />
&#36; hadoop hdfsadmin -report<br />
<br />
On vm104 (jobtracker):<br />
<br />
Start mpared:<br />
&#36; start-mapred.sh<br />
<br />
Check job status:<br />
&#36; hadoop job -list<br />
<br />
7. Enjoy fun now<br />
================<br />
<br />
A simple example<br />
----------------<br />
Copy the input files into the distributed filesystem:<br />
&#36; bin/hadoop fs -put conf input<br />
<br />
Run some of the examples provided:<br />
&#36; bin/hadoop jar hadoop-*-examples.jar grep input output 'dfs[a-z.&#93;+'<br />
<br />
Examine the output files:<br />
<br />
Copy the output files from the distributed filesystem to the local<br />
filesytem and examine them:<br />
&#36; bin/hadoop fs -get output output<br />
&#36; cat output/*<br />
<br />
or<br />
<br />
View the output files on the distributed filesystem:<br />
&#36; bin/hadoop fs -cat output/*<br />
<br />
8. Shutdown Hadoop<br />
==================<br />
&#36; stop-dfs.sh<br />
&#36; stop-mapred.sh<br />
<br />
or<br />
<br />
&#36; stop-all.sh<br />
<br />
Referrences<br />
===========<br />
[1&#93; <a href="http://hadoop.apache.org/common/docs/current/quick" target="_blank">http://hadoop.apache.org/common/docs/current/quick</a><br />
<br />
Another copy is posted <a href="http://zhiqiangma.info/hadoop-tutorial/" target="_blank">here</a>]]></description>
			<content:encoded><![CDATA[1. Packages<br />
===========<br />
<br />
Sun Java JDK:<br />
-------------<br />
<a href="http://java.sun.com/" target="_blank">http://java.sun.com/</a><br />
Installed in /usr/java/jdk1.6.0_16<br />
<br />
Hadoop:<br />
-------<br />
<a href="http://hadoop.apache.org/" target="_blank">http://hadoop.apache.org/</a><br />
<br />
Unpack it to somewhere. /lhome/zma/hadoop in this example<br />
For convenience:<br />
&#36; ln -s /lhome/zma/hadoop/bin/* /home/zma/bin/<br />
<br />
2. Hosts<br />
========<br />
<br />
Add lines like this to /etc/hosts of ALL hosts:<br />
We use four machines here.<br />
<br />
### begin ###<br />
10.0.0.103 vm103<br />
10.0.0.104 vm104<br />
10.0.0.105 vm105<br />
10.0.0.106 vm106<br />
### begin ###<br />
<br />
Change the host's name to the name described.<br />
---------------------------------------------<br />
<br />
Configure iptables:<br />
-------------------<br />
We use 9000 and 9001 in this example.<br />
<br />
3. SSH Login without password<br />
=============================<br />
<br />
Generate private and public key:<br />
<br />
&#36; ssh-keygen -t rsa<br />
&#36; chmod 700 .ssh<br />
&#36; cat .ssh/id_rsa &gt;&gt; .ssh/authorized_keys<br />
&#36; chmod 755 .ssh.authorized_keys<br />
&#36; scp -r .ssh "all hosts, one by one":/home/directory/<br />
<br />
Try to ssh hosts:<br />
<br />
&#36; for ((i=103; i&lt;=106; i++)); do ssh vm&#36;i ; done;<br />
<br />
4. Hadoop Configurations<br />
========================<br />
<br />
hadoop/conf/hadoop-env.h<br />
------------------------<br />
<br />
Add or change these lines:<br />
<br />
### begin ###<br />
<br />
export JAVA_HOME=/usr/java/jdk1.6.0_16<br />
export HADOOP_HOME=/lhome/zma/hadoop<br />
<br />
### end ###<br />
<br />
hadoop/conf/core-site.xml<br />
-------------------------<br />
<br />
Add these lines:<br />
Here namenode is vm103.<br />
### begin ###<br />
&lt;property&gt;<br />
&lt;name&gt;fs.default.name&lt;/name&gt;<br />
&lt;value&gt;hdfs://vm103:9000/&lt;/value&gt;<br />
&lt;/property&gt;<br />
### end ###<br />
<br />
hadoop/conf/hdfs-site.xml<br />
-------------------------<br />
<br />
Add these lines:<br />
### begin ###<br />
&lt;property&gt;<br />
&lt;name&gt;dfs.replication&lt;/name&gt;<br />
&lt;value&gt;2&lt;/value&gt;<br />
&lt;/property&gt;<br />
### end ###<br />
<br />
hadoop/conf/mapred-site.xml<br />
---------------------------<br />
<br />
Add these lines:<br />
Here jobtracker is vm104.<br />
### begin ###<br />
&lt;property&gt;<br />
&lt;name&gt;mapred.job.tracker&lt;/name&gt;<br />
&lt;value&gt;vm104:9001&lt;/value&gt;<br />
&lt;/property&gt;<br />
### end ###<br />
<br />
hadoop/conf/masters<br />
-------------------<br />
<br />
Delete localhost and add:<br />
### begin ###<br />
vm103<br />
vm104<br />
### end ###<br />
<br />
hadoop/conf/slaves<br />
------------------<br />
<br />
Delete localhost and add:<br />
### begin ###<br />
vm103<br />
vm104<br />
vm105<br />
vm106<br />
### end ###<br />
<br />
5. Duplicate hadoop to all hosts<br />
================================<br />
<br />
&#36; for ((i=104; i&lt;=106; i++)); do scp -r /lhome/zma/hadoop vm&#36;i:/lhome/zma/ ; done;<br />
<br />
Here we are on vm103.<br />
<br />
6. Start Hadoop<br />
===============<br />
<br />
On vm103 (namenode):<br />
<br />
Format a new distributed-filesystem:<br />
&#36; hadoop namenode -format<br />
<br />
Start hdfs:<br />
&#36; start-dfs.sh<br />
<br />
Check the hdfs status:<br />
&#36; hadoop hdfsadmin -report<br />
<br />
On vm104 (jobtracker):<br />
<br />
Start mpared:<br />
&#36; start-mapred.sh<br />
<br />
Check job status:<br />
&#36; hadoop job -list<br />
<br />
7. Enjoy fun now<br />
================<br />
<br />
A simple example<br />
----------------<br />
Copy the input files into the distributed filesystem:<br />
&#36; bin/hadoop fs -put conf input<br />
<br />
Run some of the examples provided:<br />
&#36; bin/hadoop jar hadoop-*-examples.jar grep input output 'dfs[a-z.]+'<br />
<br />
Examine the output files:<br />
<br />
Copy the output files from the distributed filesystem to the local<br />
filesytem and examine them:<br />
&#36; bin/hadoop fs -get output output<br />
&#36; cat output/*<br />
<br />
or<br />
<br />
View the output files on the distributed filesystem:<br />
&#36; bin/hadoop fs -cat output/*<br />
<br />
8. Shutdown Hadoop<br />
==================<br />
&#36; stop-dfs.sh<br />
&#36; stop-mapred.sh<br />
<br />
or<br />
<br />
&#36; stop-all.sh<br />
<br />
Referrences<br />
===========<br />
[1] <a href="http://hadoop.apache.org/common/docs/current/quick" target="_blank">http://hadoop.apache.org/common/docs/current/quick</a><br />
<br />
Another copy is posted <a href="http://zhiqiangma.info/hadoop-tutorial/" target="_blank">here</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[git tutorial]]></title>
			<link>http://baijia.info/showthread.php?tid=441</link>
			<pubDate>Mon, 22 Feb 2010 05:17:53 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=441</guid>
			<description><![CDATA[A git server has been set up on one of the virtual machines: vm111 (ip: 10.0.0.111).<br />
<br />
Add isa_key.pub to git's .ssh/authorized_keys<br />
=============================================<br />
ssh lgcpu1.cse.ust.hk -p 22111 # log on to vm111, using the account that can sudo<br />
cp .ssh/id_rsa.pub /dev/shm/ # copy pub key to a temp directory<br />
sudo su # operate in git's home as root<br />
cd /lhome/git/.ssh<br />
cp authorized_keys authorized_keys.bak # backup before changing is a good habit<br />
cat /dev/shm/id_rsa.pub &gt;&gt; authorized_keys # append pub key to git's autorized keys list<br />
<br />
Create repository<br />
=================<br />
log on lgcpu1.cse.ust.h -p 22111 # using the account that can sudo<br />
<br />
sudo su git<br />
cd /lhome/git<br />
mkdir example.git # the repository directory<br />
cd example.git<br />
git --bare init # initial the repository, --bare means only objects is stored on server<br />
<br />
First commit:<br />
=============<br />
on local laptop:<br />
<br />
mkdir example<br />
cd example<br />
git init<br />
touch README<br />
git add README<br />
git commit -m 'first commit'<br />
git remote add origin ssh://git@lgcpu1.cse.ust.hk:22111/~/example.git<br />
git push origin master<br />
<br />
When programming:<br />
=================<br />
git clone ssh://git@gate.example.org:22111/~/example.git # we need to do this for only one time<br />
<br />
# every time we want to edit some files:<br />
<br />
cd example<br />
git pull # pull the newest version from the repository<br />
<br />
# edit some files<br />
<br />
git commit -a -m 'msg' # commit the changes<br />
git push # push the changes to the repository<br />
<br />
Another copy of this post can be found <a href="http://zhiqiangma.info/set-up-git-server-through-ssh-connection/" target="_blank">here</a>.]]></description>
			<content:encoded><![CDATA[A git server has been set up on one of the virtual machines: vm111 (ip: 10.0.0.111).<br />
<br />
Add isa_key.pub to git's .ssh/authorized_keys<br />
=============================================<br />
ssh lgcpu1.cse.ust.hk -p 22111 # log on to vm111, using the account that can sudo<br />
cp .ssh/id_rsa.pub /dev/shm/ # copy pub key to a temp directory<br />
sudo su # operate in git's home as root<br />
cd /lhome/git/.ssh<br />
cp authorized_keys authorized_keys.bak # backup before changing is a good habit<br />
cat /dev/shm/id_rsa.pub &gt;&gt; authorized_keys # append pub key to git's autorized keys list<br />
<br />
Create repository<br />
=================<br />
log on lgcpu1.cse.ust.h -p 22111 # using the account that can sudo<br />
<br />
sudo su git<br />
cd /lhome/git<br />
mkdir example.git # the repository directory<br />
cd example.git<br />
git --bare init # initial the repository, --bare means only objects is stored on server<br />
<br />
First commit:<br />
=============<br />
on local laptop:<br />
<br />
mkdir example<br />
cd example<br />
git init<br />
touch README<br />
git add README<br />
git commit -m 'first commit'<br />
git remote add origin ssh://git@lgcpu1.cse.ust.hk:22111/~/example.git<br />
git push origin master<br />
<br />
When programming:<br />
=================<br />
git clone ssh://git@gate.example.org:22111/~/example.git # we need to do this for only one time<br />
<br />
# every time we want to edit some files:<br />
<br />
cd example<br />
git pull # pull the newest version from the repository<br />
<br />
# edit some files<br />
<br />
git commit -a -m 'msg' # commit the changes<br />
git push # push the changes to the repository<br />
<br />
Another copy of this post can be found <a href="http://zhiqiangma.info/set-up-git-server-through-ssh-connection/" target="_blank">here</a>.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[How to duplicate Xen DomU virtual machines]]></title>
			<link>http://baijia.info/showthread.php?tid=440</link>
			<pubDate>Mon, 22 Feb 2010 05:15:45 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=440</guid>
			<description><![CDATA[Assumption:<br />
There is VBD based Xen DomU virtual machine stored under /lhome/xen/vm-f11-sample/. There are two files under vm-f11-sample: vm0-f11.run (The configuration file) and vmdisk0 (The virtual disk).<br />
<br />
Now we want to duplicate the virtual machine vm0 stored under vm-f11-sample to vm213 stored under vm213. And vm213’s ip will be 10.0.0.213. The steps to duplicate this virtual machine:<br />
<br />
1) Duplicate the virtual disk and configuration files<br />
<br />
# cp -rf vm-f11-sample vm213<br />
<br />
For security reason, the owner of the virtual machine’s files is root. So we need to copy these files as root. The destination directory is vm213. And here we assume that vm0 is power off. If vm0 is power on before this step, we need to shut it down first.<br />
<br />
2) Change the file names and the configuration file<br />
<br />
# cd vm213<br />
# mv vmdisk0 vmdisk213<br />
# mv vm0-f11.run vm213-f11.run<br />
# vim vm213-f11.run<br />
<br />
This is the content of vm213-f11.run:<br />
<br />
name="vm213"<br />
memory=1024<br />
disk = ['tap:aio:/lhome/xen/vm213/vmdisk213,xvda,w' &#93;<br />
vif = [ 'bridge=eth0' &#93;<br />
bootloader = "/usr/bin/pygrub"<br />
vcpus=2<br />
on_reboot = 'restart'<br />
on_crash = 'restart'<br />
<br />
The name and disk entry is changed.<br />
<br />
3) Start the new virtual machine and configure the new virtual machine<br />
# xm create /lhome/xen/vm213/vm213-f11.run<br />
# xm console vm213<br />
<br />
After log in to vm213:<br />
# vi /etc/sysconfig/network-scripts/ifcfg-eth0<br />
Change the IPADDR to 10.0.0.213. Then restart eth0:<br />
# ifdown eth0<br />
# ifup eth0<br />
<br />
Log out of vm213 and then use “Ctrl + &#93;” to exit the xm console.<br />
<br />
Reset vm213 on Dom0:<br />
#xm reset vm213<br />
<br />
The new virtual machine vm213 is running now.<br />
<br />
Another copy is posted <a href="http://zhiqiangma.info/how-to-duplicate-xen-domu-virtual-machines/" target="_blank">here</a>]]></description>
			<content:encoded><![CDATA[Assumption:<br />
There is VBD based Xen DomU virtual machine stored under /lhome/xen/vm-f11-sample/. There are two files under vm-f11-sample: vm0-f11.run (The configuration file) and vmdisk0 (The virtual disk).<br />
<br />
Now we want to duplicate the virtual machine vm0 stored under vm-f11-sample to vm213 stored under vm213. And vm213’s ip will be 10.0.0.213. The steps to duplicate this virtual machine:<br />
<br />
1) Duplicate the virtual disk and configuration files<br />
<br />
# cp -rf vm-f11-sample vm213<br />
<br />
For security reason, the owner of the virtual machine’s files is root. So we need to copy these files as root. The destination directory is vm213. And here we assume that vm0 is power off. If vm0 is power on before this step, we need to shut it down first.<br />
<br />
2) Change the file names and the configuration file<br />
<br />
# cd vm213<br />
# mv vmdisk0 vmdisk213<br />
# mv vm0-f11.run vm213-f11.run<br />
# vim vm213-f11.run<br />
<br />
This is the content of vm213-f11.run:<br />
<br />
name="vm213"<br />
memory=1024<br />
disk = ['tap:aio:/lhome/xen/vm213/vmdisk213,xvda,w' ]<br />
vif = [ 'bridge=eth0' ]<br />
bootloader = "/usr/bin/pygrub"<br />
vcpus=2<br />
on_reboot = 'restart'<br />
on_crash = 'restart'<br />
<br />
The name and disk entry is changed.<br />
<br />
3) Start the new virtual machine and configure the new virtual machine<br />
# xm create /lhome/xen/vm213/vm213-f11.run<br />
# xm console vm213<br />
<br />
After log in to vm213:<br />
# vi /etc/sysconfig/network-scripts/ifcfg-eth0<br />
Change the IPADDR to 10.0.0.213. Then restart eth0:<br />
# ifdown eth0<br />
# ifup eth0<br />
<br />
Log out of vm213 and then use “Ctrl + ]” to exit the xm console.<br />
<br />
Reset vm213 on Dom0:<br />
#xm reset vm213<br />
<br />
The new virtual machine vm213 is running now.<br />
<br />
Another copy is posted <a href="http://zhiqiangma.info/how-to-duplicate-xen-domu-virtual-machines/" target="_blank">here</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Create and manage virtual machines on Xen]]></title>
			<link>http://baijia.info/showthread.php?tid=439</link>
			<pubDate>Mon, 22 Feb 2010 05:14:25 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=439</guid>
			<description><![CDATA[In this post, these content are introduced:<br />
<br />
    * Create and manage file-backed virtual block device (VBD) for virtual machines on xen.<br />
    * Install Fedora 11 via internet as DomU on top of xen.<br />
    * Manage virtual machines using xm.<br />
<br />
Working Platform:<br />
<br />
Details can found here.<br />
<br />
Create file-backed VBD:<br />
<br />
The actual space of VBD will be the amount of disk the virtual machine used. And it will be convenient if the virtual machine will be duplicated since the work is just copying the VBD file and changing some configurations. But file-backed VBDs may not be appropriate for I/O-intensive domains because of the I/O handling cost to support file-backed VBDs in dom0.<br />
Create a 20GB sparse file-backed VBD:<br />
<br />
# dd if=/dev/zero of=vmdisk1 bs=1k seek=20480k count=1<br />
<br />
Make a ext3 file system in the disk file:<br />
<br />
# mkfs -t ext3 vmdisk1<br />
<br />
Install Fedora 11 Linux via Internet:<br />
<br />
First download the pxeboot kernel of Fedora 11 for installation via Internet. Download vmlinuz and initrd.img from here:<br />
<br />
<a href="http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/x86_64/os/images/pxeboot/" target="_blank">http://download.fedora.redhat.com/pub/fe...http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/x86_64/os/image</a><br />
<br />
Create an installation profile f11.install:<br />
<br />
name="F11INSTALL"<br />
memory=1536<br />
disk = ['tap:aio:/home/xen/vmdisk1,xvda,w' &#93;<br />
vif = [ 'bridge=eth0' &#93;<br />
kernel = "/home/xen/fedora/vmlinuz"<br />
ramdisk = "/home/xen/fedora/initrd.img"<br />
vcpus=2<br />
on_reboot = 'restart'<br />
on_crash = 'restart'<br />
<br />
The virtual machine’s name is “F11INSTALL”, memory is 1.5G, CPU number is 2, disk, kernel and ramdisk is prepared in the above steps.<br />
<br />
Start this virtual machine:<br />
<br />
# xm create f11.install<br />
<br />
Connect to this virtual machine’s console and complete the installation:<br />
<br />
# xm console F11INSTALL<br />
<br />
The installation of Fedora 11 will start. The URL of installation source I used during installation is:<br />
<br />
<a href="http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/x86_64/os/" target="_blank">http://download.fedora.redhat.com/pub/fe...http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/</a><br />
<br />
Load DomU:<br />
<br />
Create a profile vm1.run for loading the virtual machine:<br />
<br />
name="vm1"<br />
memory=1536<br />
disk = ['tap:aio:/home/xen/vm1/vmdisk1,xvda,w' &#93;<br />
vif = [ 'bridge=eth0' &#93;<br />
bootloader = "/usr/bin/pygrub"<br />
vcpus=2<br />
on_reboot = 'restart'<br />
on_crash = 'restart'<br />
<br />
Here we use the PyGrub (“/usr/bin/pygrub”) as the bootloader. PyGrub starts Linux DomUs with the kernels that lie in the filesystem of the DomU instead of the kernels that lie in the filesystem of the Dom0. That makes the kernel update and management easier.<br />
<br />
Then the DomU can be started using this profile:<br />
<br />
# xm create vm1.run<br />
<br />
The console of this DomU can be connected to:<br />
<br />
# xm console vm1<br />
<br />
Manage DomUs:<br />
<br />
Start Domu:<br />
<br />
 # xm create DomU_profile<br />
<br />
List running DomUs:<br />
<br />
 # xm list<br />
<br />
Shutdown DomU:<br />
<br />
 # xm shutdown DomU_name<br />
<br />
Console of DomU:<br />
<br />
 # xm console DomU_name<br />
<br />
Top of DomUs:<br />
<br />
 # xm top<br />
<br />
Reset a DomU:<br />
<br />
 # xm reset DomU_name<br />
<br />
And others more which can be find in the xm manuals.<br />
<br />
After configured a DomU, duplication of the DomU is easy: Just make a copy of the VBD file and the profile, and then change the profile.<br />
<br />
I have set up 8 DomUs on the server. There are total 9 machines on top of xen and a lot of interesting things can be done with these “machines” <img src="http://baijia.info/images/smilies/wink.gif" style="vertical-align: middle;" border="0" alt="Wink" title="Wink" /><br />
<br />
# xm list<br />
Name                                        ID   Mem VCPUs      State   Time(s)<br />
Domain-0                                     0  1826    16     r—–    244.8<br />
vm1                                         25  1536     2     -b—-      4.9<br />
vm2                                         24  1536     2     -b—-      5.4<br />
vm3                                         23  1536     2     -b—-      5.4<br />
vm4                                         22  1536     2     -b—-      5.8<br />
vm5                                         27  1536     2     -b—-      5.4<br />
vm6                                         20  1536     2     -b—-      6.0<br />
vm7                                         19  1536     2     -b—-      6.3<br />
vm8                                         18  1536     2     -b—-     18.8<br />
<br />
References:<br />
<br />
<a href="http://tx.downloads.xensource.com/downloads/docs/user/#SECTION03300000000000000000" target="_blank">http://tx.downloads.xensource.com/downlo...http://tx.downloads.xensource.com/downloads/docs/user/#SECTION0330000000</a><br />
<br />
<a href="http://bderzhavets.wordpress.com/2009/06/10/setup-fedora-11-pv-domu-at-xen-3-4-1-dom0-kernel-2-6-30-rc6-tip-on-top-of-fedora-11/" target="_blank">http://bderzhavets.wordpress.com/2009/06...http://bderzhavets.wordpress.com/2009/06/10/setup-fedora-11-pv-domu-at-xen-3-4-1-dom0-kernel-2-6-30-rc6-tip-on-top-of-</a><br />
<br />
<a href="http://wiki.xensource.com/xenwiki/PyGrub" target="_blank">http://wiki.xensource.com/xenwiki/PyGrub</a><br />
<br />
Another copy is posted <a href="http://zhiqiangma.info/create-and-manage-virtual-machines-on-xen/" target="_blank">here</a>]]></description>
			<content:encoded><![CDATA[In this post, these content are introduced:<br />
<br />
    * Create and manage file-backed virtual block device (VBD) for virtual machines on xen.<br />
    * Install Fedora 11 via internet as DomU on top of xen.<br />
    * Manage virtual machines using xm.<br />
<br />
Working Platform:<br />
<br />
Details can found here.<br />
<br />
Create file-backed VBD:<br />
<br />
The actual space of VBD will be the amount of disk the virtual machine used. And it will be convenient if the virtual machine will be duplicated since the work is just copying the VBD file and changing some configurations. But file-backed VBDs may not be appropriate for I/O-intensive domains because of the I/O handling cost to support file-backed VBDs in dom0.<br />
Create a 20GB sparse file-backed VBD:<br />
<br />
# dd if=/dev/zero of=vmdisk1 bs=1k seek=20480k count=1<br />
<br />
Make a ext3 file system in the disk file:<br />
<br />
# mkfs -t ext3 vmdisk1<br />
<br />
Install Fedora 11 Linux via Internet:<br />
<br />
First download the pxeboot kernel of Fedora 11 for installation via Internet. Download vmlinuz and initrd.img from here:<br />
<br />
<a href="http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/x86_64/os/images/pxeboot/" target="_blank">http://download.fedora.redhat.com/pub/fe...http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/x86_64/os/image</a><br />
<br />
Create an installation profile f11.install:<br />
<br />
name="F11INSTALL"<br />
memory=1536<br />
disk = ['tap:aio:/home/xen/vmdisk1,xvda,w' ]<br />
vif = [ 'bridge=eth0' ]<br />
kernel = "/home/xen/fedora/vmlinuz"<br />
ramdisk = "/home/xen/fedora/initrd.img"<br />
vcpus=2<br />
on_reboot = 'restart'<br />
on_crash = 'restart'<br />
<br />
The virtual machine’s name is “F11INSTALL”, memory is 1.5G, CPU number is 2, disk, kernel and ramdisk is prepared in the above steps.<br />
<br />
Start this virtual machine:<br />
<br />
# xm create f11.install<br />
<br />
Connect to this virtual machine’s console and complete the installation:<br />
<br />
# xm console F11INSTALL<br />
<br />
The installation of Fedora 11 will start. The URL of installation source I used during installation is:<br />
<br />
<a href="http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/x86_64/os/" target="_blank">http://download.fedora.redhat.com/pub/fe...http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/</a><br />
<br />
Load DomU:<br />
<br />
Create a profile vm1.run for loading the virtual machine:<br />
<br />
name="vm1"<br />
memory=1536<br />
disk = ['tap:aio:/home/xen/vm1/vmdisk1,xvda,w' ]<br />
vif = [ 'bridge=eth0' ]<br />
bootloader = "/usr/bin/pygrub"<br />
vcpus=2<br />
on_reboot = 'restart'<br />
on_crash = 'restart'<br />
<br />
Here we use the PyGrub (“/usr/bin/pygrub”) as the bootloader. PyGrub starts Linux DomUs with the kernels that lie in the filesystem of the DomU instead of the kernels that lie in the filesystem of the Dom0. That makes the kernel update and management easier.<br />
<br />
Then the DomU can be started using this profile:<br />
<br />
# xm create vm1.run<br />
<br />
The console of this DomU can be connected to:<br />
<br />
# xm console vm1<br />
<br />
Manage DomUs:<br />
<br />
Start Domu:<br />
<br />
 # xm create DomU_profile<br />
<br />
List running DomUs:<br />
<br />
 # xm list<br />
<br />
Shutdown DomU:<br />
<br />
 # xm shutdown DomU_name<br />
<br />
Console of DomU:<br />
<br />
 # xm console DomU_name<br />
<br />
Top of DomUs:<br />
<br />
 # xm top<br />
<br />
Reset a DomU:<br />
<br />
 # xm reset DomU_name<br />
<br />
And others more which can be find in the xm manuals.<br />
<br />
After configured a DomU, duplication of the DomU is easy: Just make a copy of the VBD file and the profile, and then change the profile.<br />
<br />
I have set up 8 DomUs on the server. There are total 9 machines on top of xen and a lot of interesting things can be done with these “machines” <img src="http://baijia.info/images/smilies/wink.gif" style="vertical-align: middle;" border="0" alt="Wink" title="Wink" /><br />
<br />
# xm list<br />
Name                                        ID   Mem VCPUs      State   Time(s)<br />
Domain-0                                     0  1826    16     r—–    244.8<br />
vm1                                         25  1536     2     -b—-      4.9<br />
vm2                                         24  1536     2     -b—-      5.4<br />
vm3                                         23  1536     2     -b—-      5.4<br />
vm4                                         22  1536     2     -b—-      5.8<br />
vm5                                         27  1536     2     -b—-      5.4<br />
vm6                                         20  1536     2     -b—-      6.0<br />
vm7                                         19  1536     2     -b—-      6.3<br />
vm8                                         18  1536     2     -b—-     18.8<br />
<br />
References:<br />
<br />
<a href="http://tx.downloads.xensource.com/downloads/docs/user/#SECTION03300000000000000000" target="_blank">http://tx.downloads.xensource.com/downlo...http://tx.downloads.xensource.com/downloads/docs/user/#SECTION0330000000</a><br />
<br />
<a href="http://bderzhavets.wordpress.com/2009/06/10/setup-fedora-11-pv-domu-at-xen-3-4-1-dom0-kernel-2-6-30-rc6-tip-on-top-of-fedora-11/" target="_blank">http://bderzhavets.wordpress.com/2009/06...http://bderzhavets.wordpress.com/2009/06/10/setup-fedora-11-pv-domu-at-xen-3-4-1-dom0-kernel-2-6-30-rc6-tip-on-top-of-</a><br />
<br />
<a href="http://wiki.xensource.com/xenwiki/PyGrub" target="_blank">http://wiki.xensource.com/xenwiki/PyGrub</a><br />
<br />
Another copy is posted <a href="http://zhiqiangma.info/create-and-manage-virtual-machines-on-xen/" target="_blank">here</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[New method to create VM]]></title>
			<link>http://baijia.info/showthread.php?tid=438</link>
			<pubDate>Mon, 22 Feb 2010 05:12:28 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=438</guid>
			<description><![CDATA[I have change the the old configuration files management method that create one configuration file for each VM to a unified one (/lhome/xen/vm.run). The usage is also much simpler:<br />
<br />
When we want to create vmvmid with vmmem kb memory, just follow these steps:<br />
<br />
# cd /lhome/xen<br />
# xm create vm.run vmid=vmid vmmem=vmmem]]></description>
			<content:encoded><![CDATA[I have change the the old configuration files management method that create one configuration file for each VM to a unified one (/lhome/xen/vm.run). The usage is also much simpler:<br />
<br />
When we want to create vmvmid with vmmem kb memory, just follow these steps:<br />
<br />
# cd /lhome/xen<br />
# xm create vm.run vmid=vmid vmmem=vmmem]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Set up Xen 3.4.1 dom0 on top of Fedora 11 with kernel 2.6.29]]></title>
			<link>http://baijia.info/showthread.php?tid=437</link>
			<pubDate>Mon, 22 Feb 2010 05:11:06 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=437</guid>
			<description><![CDATA[Hardware:<br />
Platform 1:<br />
IBM eServer X3650M2:<br />
2 x Intel Xeon X5570 2.93 8MB Cache Processor<br />
4 x 4GB DDR3-1333 Memory<br />
2 x 300GB 10K-SFF Hot-Swap HD – RAID 0<br />
<br />
Platform 2:<br />
2 x Intel Xeon E5520 2.27GHz 8MB cache<br />
6 x 4G DDRIII REG ECC 1333<br />
2 x ST 1000G NS 32M<br />
<br />
The instruction below is based on platform 1.<br />
<br />
Disk Partitions:<br />
<br />
# df -hT<br />
Filesystem    Type    Size  Used Avail Use% Mounted on<br />
/dev/sda2     ext4     58G  6.3G   49G  12% /<br />
/dev/sda1     ext3    388M   52M  316M  15% /boot<br />
/dev/sda5     ext4    490G   14G  452G   3% /home<br />
<br />
Linux:<br />
Fedora 11, updated to 23-09-2009.<br />
<br />
No xen and libvirt installed:<br />
<br />
# rpm -qa | grep xen<br />
# rpm -qa | grep virt<br />
<br />
And SELinux is diabled.<br />
<br />
Packages:<br />
Xen 3.4.1: <a href="http://bits.xensource.com/oss-xen/release/3.4.1/xen-3.4.1.tar.gz" target="_blank">http://bits.xensource.com/oss-xen/releas...http://bits.xensource.com/oss-xen/release/3.4.1/xen-3.</a><br />
<br />
linux-2.6.29-xen-r4-aka-suse-xenified-2.6.29-62.1: <a href="http://x17.eu/xen/linux-2.6.29-xen-r4-aka-suse-xenified-2.6.29-62.1.tar.gz" target="_blank">http://x17.eu/xen/linux-2.6.29-xen-r4-ak...http://x17.eu/xen/linux-2.6.29-xen-r4-aka-suse-xenified-2.6.29-6</a><br />
<br />
download these packages and unzip them.<br />
<br />
Installation:<br />
1. Install Xen:<br />
<br />
# sh ./install.sh<br />
<br />
<br />
1. Install Xen:<br />
copy the all the content of xen to “/usr/src/xen/3.4.1/xen-3.4.1/”<br />
<br />
&#36; make world<br />
# make install<br />
<br />
2. Install Kernel<br />
The .config file I used can be downloaded here: <a href="https://sites.google.com/site/ericzqma/linux/kernel_config_xen_zma?attredirects=0" target="_blank">https://sites.google.com/site/ericzqma/l...https://sites.google.com/site/ericzqma/linux/kernel_config_xen_zma?attr</a><br />
<br />
My .config file can be used directly. Or menuconfig can be used:<br />
<br />
# make menuconfig<br />
<br />
When using “make menuconfig”, some options require special attention:<br />
<br />
Subarchitecture Type (Enable Xen compatible kernel)<br />
( ) PC-compatible<br />
(X) Enable Xen compatible kernel<br />
( ) Support for ScaleMP vSMP<br />
Device Drivers ---&gt;<br />
XEN ---&gt;<br />
[*&#93; Privileged Guest (domain 0)<br />
&lt;*&gt;Backend driver support<br />
&lt;*&gt;Block-device backend driver<br />
&lt;*&gt;Block-device tap backend driver<br />
&lt;*&gt; Network-device backend driver<br />
<br />
After configuration:<br />
<br />
# make<br />
# make modules_install install<br />
<br />
3. Create a Grub entry:<br />
<br />
title xen 3.4.1 - kernel 2.6.29-xen-r4<br />
    root (hd0,0)<br />
    kernel /xen-3.4.1.gz console=vga vga=ask noreboot<br />
    module /vmlinuz-2.6.29-xen-r4 ro \<br />
        root=UUID=ac0c173e-abca-4795-a7d6-23444e730d40<br />
    module /initrd-2.6.29-xen-r4.img<br />
<br />
The “root=UUID=ac0c173e-abca-4795-a7d6-23444e730d40″ will be different depending on the partitions of the system.<br />
<br />
4. Add xend and xendomains to services that automatically start when system boot.<br />
<br />
# chkconfig --add xend<br />
# chkconfig --add xendomains<br />
# chkconfig --list | grep xend<br />
xend            0:off   1:off   2:off   3:on    4:on    5:on    6:off<br />
xendomains      0:off   1:off   2:off   3:on    4:on    5:on    6:off<br />
<br />
Then boot the system in the xen environment. the xm should can be used:<br />
<br />
# xm info<br />
host                   : lgcpu3<br />
release                : 2.6.29-xen-r4<br />
version                : #2 SMP Wed Sep 16 11:10:45 EDT 2009<br />
machine                : x86_64<br />
nr_cpus                : 16<br />
nr_nodes               : 1<br />
cores_per_socket       : 4<br />
threads_per_core       : 2<br />
cpu_mhz                : 2933<br />
hw_caps                : bfebfbff:28100800:00000000:00000340:009ce3bd:00000000:00000001:00000000<br />
virt_caps              : hvm<br />
total_memory           : 16373<br />
free_memory            : 127<br />
node_to_cpu            : node0:0-15<br />
node_to_memory         : node0:127<br />
xen_major              : 3<br />
xen_minor              : 4<br />
xen_extra              : .1<br />
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64<br />
xen_scheduler          : credit<br />
xen_pagesize           : 4096<br />
platform_params        : virt_start=0xffff800000000000<br />
xen_changeset          : unavailable<br />
cc_compiler            : gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)<br />
cc_compile_by          : root<br />
cc_compile_domain      : ibm.net<br />
cc_compile_date        : Wed Sep 16 08:17:31 EDT 2009<br />
xend_config_format     : 4<br />
<br />
# xm list<br />
Name                                        ID   Mem VCPUs      State   Time(s)<br />
Domain-0                                     0 16043    16     r—–   3903.8<br />
<br />
Then xm can be used to create and manage virtual machines on the server.<br />
<br />
Problems:<br />
<br />
There are problems with ipv6 modules.<br />
<br />
If ipv6 is not used, just diable it:<br />
<br />
In /etc/modprobe.conf<br />
<br />
add:<br />
alias net-pf-10 off<br />
alias ipv6 off<br />
<br />
Problems:<br />
<br />
Some time some CPU stuck! We can get a message like this from Dom0:<br />
<br />
“soft lockup – CPU#x stuck for xxx s!”<br />
<br />
There is a trick to by pass this problem:<br />
<br />
Change in the /etc/xen/xend-config.sxp file the line<br />
<br />
- (dom0-cpus 0)<br />
+ (dom0-cpus 1)<br />
<br />
The Dom0 will switch to UP mode from SMP mode.<br />
<br />
Another copy is posted <a href="http://zhiqiangma.info/set-up-xen-341-dom0-on-top-of-fedora-11-with-kernel-2-6-29/" target="_blank">here</a>]]></description>
			<content:encoded><![CDATA[Hardware:<br />
Platform 1:<br />
IBM eServer X3650M2:<br />
2 x Intel Xeon X5570 2.93 8MB Cache Processor<br />
4 x 4GB DDR3-1333 Memory<br />
2 x 300GB 10K-SFF Hot-Swap HD – RAID 0<br />
<br />
Platform 2:<br />
2 x Intel Xeon E5520 2.27GHz 8MB cache<br />
6 x 4G DDRIII REG ECC 1333<br />
2 x ST 1000G NS 32M<br />
<br />
The instruction below is based on platform 1.<br />
<br />
Disk Partitions:<br />
<br />
# df -hT<br />
Filesystem    Type    Size  Used Avail Use% Mounted on<br />
/dev/sda2     ext4     58G  6.3G   49G  12% /<br />
/dev/sda1     ext3    388M   52M  316M  15% /boot<br />
/dev/sda5     ext4    490G   14G  452G   3% /home<br />
<br />
Linux:<br />
Fedora 11, updated to 23-09-2009.<br />
<br />
No xen and libvirt installed:<br />
<br />
# rpm -qa | grep xen<br />
# rpm -qa | grep virt<br />
<br />
And SELinux is diabled.<br />
<br />
Packages:<br />
Xen 3.4.1: <a href="http://bits.xensource.com/oss-xen/release/3.4.1/xen-3.4.1.tar.gz" target="_blank">http://bits.xensource.com/oss-xen/releas...http://bits.xensource.com/oss-xen/release/3.4.1/xen-3.</a><br />
<br />
linux-2.6.29-xen-r4-aka-suse-xenified-2.6.29-62.1: <a href="http://x17.eu/xen/linux-2.6.29-xen-r4-aka-suse-xenified-2.6.29-62.1.tar.gz" target="_blank">http://x17.eu/xen/linux-2.6.29-xen-r4-ak...http://x17.eu/xen/linux-2.6.29-xen-r4-aka-suse-xenified-2.6.29-6</a><br />
<br />
download these packages and unzip them.<br />
<br />
Installation:<br />
1. Install Xen:<br />
<br />
# sh ./install.sh<br />
<br />
<br />
1. Install Xen:<br />
copy the all the content of xen to “/usr/src/xen/3.4.1/xen-3.4.1/”<br />
<br />
&#36; make world<br />
# make install<br />
<br />
2. Install Kernel<br />
The .config file I used can be downloaded here: <a href="https://sites.google.com/site/ericzqma/linux/kernel_config_xen_zma?attredirects=0" target="_blank">https://sites.google.com/site/ericzqma/l...https://sites.google.com/site/ericzqma/linux/kernel_config_xen_zma?attr</a><br />
<br />
My .config file can be used directly. Or menuconfig can be used:<br />
<br />
# make menuconfig<br />
<br />
When using “make menuconfig”, some options require special attention:<br />
<br />
Subarchitecture Type (Enable Xen compatible kernel)<br />
( ) PC-compatible<br />
(X) Enable Xen compatible kernel<br />
( ) Support for ScaleMP vSMP<br />
Device Drivers ---&gt;<br />
XEN ---&gt;<br />
[*] Privileged Guest (domain 0)<br />
&lt;*&gt;Backend driver support<br />
&lt;*&gt;Block-device backend driver<br />
&lt;*&gt;Block-device tap backend driver<br />
&lt;*&gt; Network-device backend driver<br />
<br />
After configuration:<br />
<br />
# make<br />
# make modules_install install<br />
<br />
3. Create a Grub entry:<br />
<br />
title xen 3.4.1 - kernel 2.6.29-xen-r4<br />
    root (hd0,0)<br />
    kernel /xen-3.4.1.gz console=vga vga=ask noreboot<br />
    module /vmlinuz-2.6.29-xen-r4 ro \<br />
        root=UUID=ac0c173e-abca-4795-a7d6-23444e730d40<br />
    module /initrd-2.6.29-xen-r4.img<br />
<br />
The “root=UUID=ac0c173e-abca-4795-a7d6-23444e730d40″ will be different depending on the partitions of the system.<br />
<br />
4. Add xend and xendomains to services that automatically start when system boot.<br />
<br />
# chkconfig --add xend<br />
# chkconfig --add xendomains<br />
# chkconfig --list | grep xend<br />
xend            0:off   1:off   2:off   3:on    4:on    5:on    6:off<br />
xendomains      0:off   1:off   2:off   3:on    4:on    5:on    6:off<br />
<br />
Then boot the system in the xen environment. the xm should can be used:<br />
<br />
# xm info<br />
host                   : lgcpu3<br />
release                : 2.6.29-xen-r4<br />
version                : #2 SMP Wed Sep 16 11:10:45 EDT 2009<br />
machine                : x86_64<br />
nr_cpus                : 16<br />
nr_nodes               : 1<br />
cores_per_socket       : 4<br />
threads_per_core       : 2<br />
cpu_mhz                : 2933<br />
hw_caps                : bfebfbff:28100800:00000000:00000340:009ce3bd:00000000:00000001:00000000<br />
virt_caps              : hvm<br />
total_memory           : 16373<br />
free_memory            : 127<br />
node_to_cpu            : node0:0-15<br />
node_to_memory         : node0:127<br />
xen_major              : 3<br />
xen_minor              : 4<br />
xen_extra              : .1<br />
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64<br />
xen_scheduler          : credit<br />
xen_pagesize           : 4096<br />
platform_params        : virt_start=0xffff800000000000<br />
xen_changeset          : unavailable<br />
cc_compiler            : gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)<br />
cc_compile_by          : root<br />
cc_compile_domain      : ibm.net<br />
cc_compile_date        : Wed Sep 16 08:17:31 EDT 2009<br />
xend_config_format     : 4<br />
<br />
# xm list<br />
Name                                        ID   Mem VCPUs      State   Time(s)<br />
Domain-0                                     0 16043    16     r—–   3903.8<br />
<br />
Then xm can be used to create and manage virtual machines on the server.<br />
<br />
Problems:<br />
<br />
There are problems with ipv6 modules.<br />
<br />
If ipv6 is not used, just diable it:<br />
<br />
In /etc/modprobe.conf<br />
<br />
add:<br />
alias net-pf-10 off<br />
alias ipv6 off<br />
<br />
Problems:<br />
<br />
Some time some CPU stuck! We can get a message like this from Dom0:<br />
<br />
“soft lockup – CPU#x stuck for xxx s!”<br />
<br />
There is a trick to by pass this problem:<br />
<br />
Change in the /etc/xen/xend-config.sxp file the line<br />
<br />
- (dom0-cpus 0)<br />
+ (dom0-cpus 1)<br />
<br />
The Dom0 will switch to UP mode from SMP mode.<br />
<br />
Another copy is posted <a href="http://zhiqiangma.info/set-up-xen-341-dom0-on-top-of-fedora-11-with-kernel-2-6-29/" target="_blank">here</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Compute servers]]></title>
			<link>http://baijia.info/showthread.php?tid=436</link>
			<pubDate>Sun, 21 Feb 2010 02:51:35 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=436</guid>
			<description><![CDATA[Expecting one more compute server to be ready at the end of Feb or beginning of Mar.]]></description>
			<content:encoded><![CDATA[Expecting one more compute server to be ready at the end of Feb or beginning of Mar.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[About recent attacks to Google etc.]]></title>
			<link>http://baijia.info/showthread.php?tid=435</link>
			<pubDate>Sat, 20 Feb 2010 21:58:14 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=435</guid>
			<description><![CDATA[Recently WSJ posted an article about the recent attacks on Google and other companies inlcuding Adobe and Juniper ( <a href="http://chinese.wsj.com/gb/20100219/bch174542.asp?source=whatnews2" target="_blank">http://chinese.wsj.com/gb/20100219/bch17...http://chinese.wsj.com/gb/20100219/bch174542.asp?source</a> ). While this incident is made suspiciously dramatical and political, it is worth taking an honest look at the security and privacy issues in a cloud-based environment.<br />
<br />
Attacks are common -- both inside and outside the Internet. When PayPal started, Max Levchin was warned by bankders and credit card processing companies: "Fraud is going to eat you for lunch", and Max's response was "What fraud"? By mid-summer of 2001, PayPal was already losing around US&#36;10 million per month.<br />
<br />
Fraudulent banking is one form of attacks. It occurred in traditional banking. Traditional bankers knew it. And they knew the same would happen on the Internet!<br />
<br />
When there is value, there are potential attacks. When there is significant value, there will potentially be intense and sophisticated attacks.<br />
<br />
Albeit a large body of work on Internet security, the real protection for most of us is not from technicality but from our cyber poverty---We have little exposure of our valuables online, or we have some valuables online but they are not as significant as someone else's.<br />
<br />
Serving a collection of "poor" users, Internet content providers are able to use traditional cryptographic measures to provide reasonable protection to user data. In many cases, a practical protection can be the natural complexity of software systms. Modern web servicing architectures have multiple layers of complex software and cross-layer interactions, and the software changes over time. It is practically difficult for casual attackers to understand the system and its loopholes from outside, and this protects us well if the adversaries' interest is remains "casual".<br />
<br />
What if users started to own cyber assets with significant value? What if key business data were stored in the cloud? What if an adversary is an insider? The answer is self-evident---the existing technology is by no means sufficient to protect us, and the occurance of disastrous incidents is just a matter of time.<br />
<br />
What can we do as computer scientists and practitioners? Work.]]></description>
			<content:encoded><![CDATA[Recently WSJ posted an article about the recent attacks on Google and other companies inlcuding Adobe and Juniper ( <a href="http://chinese.wsj.com/gb/20100219/bch174542.asp?source=whatnews2" target="_blank">http://chinese.wsj.com/gb/20100219/bch17...http://chinese.wsj.com/gb/20100219/bch174542.asp?source</a> ). While this incident is made suspiciously dramatical and political, it is worth taking an honest look at the security and privacy issues in a cloud-based environment.<br />
<br />
Attacks are common -- both inside and outside the Internet. When PayPal started, Max Levchin was warned by bankders and credit card processing companies: "Fraud is going to eat you for lunch", and Max's response was "What fraud"? By mid-summer of 2001, PayPal was already losing around US&#36;10 million per month.<br />
<br />
Fraudulent banking is one form of attacks. It occurred in traditional banking. Traditional bankers knew it. And they knew the same would happen on the Internet!<br />
<br />
When there is value, there are potential attacks. When there is significant value, there will potentially be intense and sophisticated attacks.<br />
<br />
Albeit a large body of work on Internet security, the real protection for most of us is not from technicality but from our cyber poverty---We have little exposure of our valuables online, or we have some valuables online but they are not as significant as someone else's.<br />
<br />
Serving a collection of "poor" users, Internet content providers are able to use traditional cryptographic measures to provide reasonable protection to user data. In many cases, a practical protection can be the natural complexity of software systms. Modern web servicing architectures have multiple layers of complex software and cross-layer interactions, and the software changes over time. It is practically difficult for casual attackers to understand the system and its loopholes from outside, and this protects us well if the adversaries' interest is remains "casual".<br />
<br />
What if users started to own cyber assets with significant value? What if key business data were stored in the cloud? What if an adversary is an insider? The answer is self-evident---the existing technology is by no means sufficient to protect us, and the occurance of disastrous incidents is just a matter of time.<br />
<br />
What can we do as computer scientists and practitioners? Work.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Boden...Myrinet-a gigabit-per-second local-area network.MICRO95]]></title>
			<link>http://baijia.info/showthread.php?tid=434</link>
			<pubDate>Tue, 16 Feb 2010 11:02:19 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=434</guid>
			<description><![CDATA[Nanette J. Boden, Danny Cohen, Robert E. Felderman, Alan E. Kulawik, Charles L. Seitz, Jakov N. Seizovic, Wen-King Su, "Myrinet: A Gigabit-per-Second  Local Area Network," IEEE Micro, pp. 29-36, February, 1995 <br />
<br />
@article{boden95myrinet,<br />
author = {Nanette J. Boden and Danny Cohen and Robert E. Felderman and Alan E. Kulawik and Charles L. Seitz and Jakov N. Seizovic and Wen-King Su},<br />
title = {Myrinet: A Gigabit-per-Second  Local Area Network},<br />
journal ={IEEE Micro},<br />
volume = {15},<br />
issn = {0272-1732},<br />
year = {1995},<br />
pages = {29-36},<br />
doi = {http://doi.ieeecomputersociety.org/10.1109/40.342015},<br />
publisher = {IEEE Computer Society},<br />
address = {Los Alamitos, CA, USA},<br />
}]]></description>
			<content:encoded><![CDATA[Nanette J. Boden, Danny Cohen, Robert E. Felderman, Alan E. Kulawik, Charles L. Seitz, Jakov N. Seizovic, Wen-King Su, "Myrinet: A Gigabit-per-Second  Local Area Network," IEEE Micro, pp. 29-36, February, 1995 <br />
<br />
@article{boden95myrinet,<br />
author = {Nanette J. Boden and Danny Cohen and Robert E. Felderman and Alan E. Kulawik and Charles L. Seitz and Jakov N. Seizovic and Wen-King Su},<br />
title = {Myrinet: A Gigabit-per-Second  Local Area Network},<br />
journal ={IEEE Micro},<br />
volume = {15},<br />
issn = {0272-1732},<br />
year = {1995},<br />
pages = {29-36},<br />
doi = {http://doi.ieeecomputersociety.org/10.1109/40.342015},<br />
publisher = {IEEE Computer Society},<br />
address = {Los Alamitos, CA, USA},<br />
}]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Du...Experiences building an object-based storage system based on the OSD T-10.MSST06]]></title>
			<link>http://baijia.info/showthread.php?tid=432</link>
			<pubDate>Tue, 09 Feb 2010 04:13:06 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=432</guid>
			<description><![CDATA[Du, D.; He, D.; Hong, C.; Jeong, J.; Kher, V.; Kim, Yongdae; Lu, Y.; Raghuveer, A.; Sharafkandi, S. Experiences Building an Object-Based Storage System based on the OSD T-10 Standard. Conference on Mass Storage Systems and Technologies (2006)<br />
<br />
PDF from an author's site: <a href="http://www.cs.umn.edu/~kyd/paper/dhhjkklrs06.pdf" target="_blank">http://www.cs.umn.edu/~kyd/paper/dhhjkklrs06.pdf</a>]]></description>
			<content:encoded><![CDATA[Du, D.; He, D.; Hong, C.; Jeong, J.; Kher, V.; Kim, Yongdae; Lu, Y.; Raghuveer, A.; Sharafkandi, S. Experiences Building an Object-Based Storage System based on the OSD T-10 Standard. Conference on Mass Storage Systems and Technologies (2006)<br />
<br />
PDF from an author's site: <a href="http://www.cs.umn.edu/~kyd/paper/dhhjkklrs06.pdf" target="_blank">http://www.cs.umn.edu/~kyd/paper/dhhjkklrs06.pdf</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Du...Two emerging serial storage interfaces for supporting digital libraries.MTA00]]></title>
			<link>http://baijia.info/showthread.php?tid=431</link>
			<pubDate>Tue, 09 Feb 2010 04:08:44 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=431</guid>
			<description><![CDATA[Du, D. H., Chang, T., Hsieh, J., Shim, S., and Wang, Y. 2000. Two Emerging Serial Storage Interfaces for Supporting Digital Libraries: Serial Storage Architecture(SSA) and Fiber Channel-Arbitrated Loop (FC-AL). Multimedia Tools Appl. 10, 2-3 (Apr. 2000), 179-203.]]></description>
			<content:encoded><![CDATA[Du, D. H., Chang, T., Hsieh, J., Shim, S., and Wang, Y. 2000. Two Emerging Serial Storage Interfaces for Supporting Digital Libraries: Serial Storage Architecture(SSA) and Fiber Channel-Arbitrated Loop (FC-AL). Multimedia Tools Appl. 10, 2-3 (Apr. 2000), 179-203.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Reading lists]]></title>
			<link>http://baijia.info/showthread.php?tid=430</link>
			<pubDate>Tue, 09 Feb 2010 03:56:22 -0500</pubDate>
			<guid isPermaLink="false">http://baijia.info/showthread.php?tid=430</guid>
			<description><![CDATA[SSD (Based on Prof. David Du's summary)<br />
<br />
SSD Design<br />
 Design Tradeoffs for SSD Performance, Nitin Agrawal, Vijayan Prabhakaran, Ted Wobber, John D. Davis, Mark Manasse,and Rina Panigrahy. USENIX 2008.<br />
o Flash Translation Layer<br />
 A reconfigurable FTL (flash translation layer) architecture for NAND flash-based applications, CHANIK PARK, WONMOON CHEON, JEONGUK KANG, KANGHO ROH, WONHEE CHO, and JIN-SOO KIM. ACM Transactions on Embedded Computing Systems (TECS), July 2008.<br />
 A log buffer-based flash translation layer using fully-associative sector translation, Sang-Won Lee, Dong-Joo Park, Tae-Sun Chung, Dong-Ho Lee, Sangwon Park, and Ha-Joo Song. ACM Transactions on Embedded Computing Systems (TECS), July 2007.<br />
 An adaptive two-level management for the flash translation layer in embedded systems, Chin-Hsien Wu and Tei-Wei Kuo. ICCAD, 2006.<br />
o Flash Wear Levelling Algorithm<br />
 Endurance Enhancement of Flash-Memory Storage Systems: An Efficient Static Wear Leveling Design, Yuan-Hao Chang, Jen-Wei Hsieh, and Tei-Wei Kuo. DAC 2007.<br />
o Caching Algorithm for Flash<br />
 BPLRU: A Buffer Management Scheme for Improving Random Writes in Flash Storage , Hyojun Kim and Seongjun Ahn. FAST 2008.<br />
 FAB: Flash-Aware Buffer Management Policy for Portable Media Players , Heeseung Jo, Jeong-Uk Kang, Seon-Yeong Park, Jin-Soo Kim, and Joonwon Lee. IEEE Transactions on Consumer Electronics, 2006.<br />
 CFLRU: a replacement algorithm for flash memorys , Seon-yeong Park and Dawoon Jung and Jeong-uk Kang and Jin-soo Kim and Joonwon Lee. CASES 2006.<br />
• Using Flash as Primary Storage Device<br />
o Intel Turbo Memory: Nonvolatile disk caches in the storage hierarchy of mainstream computer systems, JEANNA MATTHEWS, SANJEEV TRIKA, DEBRA HENSGEN, RICK COULSON, and KNUT GRIMSRUD. ACM Transcations on Storage (TOS), May 2008.<br />
o Improving NAND Flash Based Disk Caches, Taeho Kgil, David Roberts, and Trevor Mudge. ISCA 2008.<br />
o A NOR Emulation Strategy over NAND Flash Memory, Jian-Hong Lin, Yuan-Hao Chang, Jen-Wei Hsieh, Tei-Wei Kuo, Cheng-Chih Yang. RTCSA 2007.<br />
• Data Accessing Method for Flash Memory<br />
o Tree Indexing on Flash Disks, Yinan Li, Bingsheng Hey, Qiong Luo, and Ke Yi. ICDE 2009.<br />
o An efficient B-tree layer implementation for flash-memory storage systems, Chin-Hsien Wu Tei-Wei Kuo Li Ping Chang. ACM Transactions on Embedded Computing Systems (TECS), 2007 .<br />
o FlashDB: Dynamic Self-tuning Database for NAND Flash, Suman Nath and Aman Kansal. ACM/IEEE IPSN 2007 .<br />
o MicroHash: An Efficient Index Structure for Flash-Based Sensor Devices, Demetrios Zeinalipour-Yazti, Song Lin, Vana Kalogeraki, Dimitrios Gunopulos, and Walid A. Najjar. FAST 2005.<br />
o An Efficient R-Tree Implementation over Flash Memory Storage Systems, Chin-Hsien Wu Tei-Wei Kuo Li Ping Chang. GIS 2003 .<br />
• Applications Enhancements to Use Flash Memory<br />
o Online Maintenance of Very Large Random Samples on Flash Storage, Suman Nath and Phillip B. Gibbons. VLDB 2008.<br />
o Flashing Up the Storage Layer, Ioannis Koltsidas and Stratis D. Viglas. VLDB 2008.<br />
o Design of Flash-Based DBMS: An In-Page Logging Approach, Sang-Won Lee and Bongki Moon. SIGMOD 2007.<br />
• Disk Based Caching Algorithms<br />
o ARC: A Self-Tuning, Low Overhead Replacement Cache, Nimrod Megiddo and Dharmendra S. Modha, FAST 2003.<br />
o WOW: Wise Ordering for Writes – Combining Spatial and Temporal Locality in Non-Volatile Caches, Binny S. Gill and Dharmendra S. Modha. FAST 2005.<br />
o Second-Tier Cache Management Using Write Hints, Xuhui Li , Ashraf Aboulnaga , Kenneth Salem , Aamer Sachedina, and Shaobo Ga. FAST 2005.<br />
o Karma: Know-it-All Replacement for a Multilevel cAche, Gala Yadgar, Micheal Factor, and Assaf Schuster. FAST 2007.<br />
o On Multi-level Exclusive Caching: Offline Optimality and Why promotions are better than demotions,, Binny S. Gill. FAST 2008.]]></description>
			<content:encoded><![CDATA[SSD (Based on Prof. David Du's summary)<br />
<br />
SSD Design<br />
 Design Tradeoffs for SSD Performance, Nitin Agrawal, Vijayan Prabhakaran, Ted Wobber, John D. Davis, Mark Manasse,and Rina Panigrahy. USENIX 2008.<br />
o Flash Translation Layer<br />
 A reconfigurable FTL (flash translation layer) architecture for NAND flash-based applications, CHANIK PARK, WONMOON CHEON, JEONGUK KANG, KANGHO ROH, WONHEE CHO, and JIN-SOO KIM. ACM Transactions on Embedded Computing Systems (TECS), July 2008.<br />
 A log buffer-based flash translation layer using fully-associative sector translation, Sang-Won Lee, Dong-Joo Park, Tae-Sun Chung, Dong-Ho Lee, Sangwon Park, and Ha-Joo Song. ACM Transactions on Embedded Computing Systems (TECS), July 2007.<br />
 An adaptive two-level management for the flash translation layer in embedded systems, Chin-Hsien Wu and Tei-Wei Kuo. ICCAD, 2006.<br />
o Flash Wear Levelling Algorithm<br />
 Endurance Enhancement of Flash-Memory Storage Systems: An Efficient Static Wear Leveling Design, Yuan-Hao Chang, Jen-Wei Hsieh, and Tei-Wei Kuo. DAC 2007.<br />
o Caching Algorithm for Flash<br />
 BPLRU: A Buffer Management Scheme for Improving Random Writes in Flash Storage , Hyojun Kim and Seongjun Ahn. FAST 2008.<br />
 FAB: Flash-Aware Buffer Management Policy for Portable Media Players , Heeseung Jo, Jeong-Uk Kang, Seon-Yeong Park, Jin-Soo Kim, and Joonwon Lee. IEEE Transactions on Consumer Electronics, 2006.<br />
 CFLRU: a replacement algorithm for flash memorys , Seon-yeong Park and Dawoon Jung and Jeong-uk Kang and Jin-soo Kim and Joonwon Lee. CASES 2006.<br />
• Using Flash as Primary Storage Device<br />
o Intel Turbo Memory: Nonvolatile disk caches in the storage hierarchy of mainstream computer systems, JEANNA MATTHEWS, SANJEEV TRIKA, DEBRA HENSGEN, RICK COULSON, and KNUT GRIMSRUD. ACM Transcations on Storage (TOS), May 2008.<br />
o Improving NAND Flash Based Disk Caches, Taeho Kgil, David Roberts, and Trevor Mudge. ISCA 2008.<br />
o A NOR Emulation Strategy over NAND Flash Memory, Jian-Hong Lin, Yuan-Hao Chang, Jen-Wei Hsieh, Tei-Wei Kuo, Cheng-Chih Yang. RTCSA 2007.<br />
• Data Accessing Method for Flash Memory<br />
o Tree Indexing on Flash Disks, Yinan Li, Bingsheng Hey, Qiong Luo, and Ke Yi. ICDE 2009.<br />
o An efficient B-tree layer implementation for flash-memory storage systems, Chin-Hsien Wu Tei-Wei Kuo Li Ping Chang. ACM Transactions on Embedded Computing Systems (TECS), 2007 .<br />
o FlashDB: Dynamic Self-tuning Database for NAND Flash, Suman Nath and Aman Kansal. ACM/IEEE IPSN 2007 .<br />
o MicroHash: An Efficient Index Structure for Flash-Based Sensor Devices, Demetrios Zeinalipour-Yazti, Song Lin, Vana Kalogeraki, Dimitrios Gunopulos, and Walid A. Najjar. FAST 2005.<br />
o An Efficient R-Tree Implementation over Flash Memory Storage Systems, Chin-Hsien Wu Tei-Wei Kuo Li Ping Chang. GIS 2003 .<br />
• Applications Enhancements to Use Flash Memory<br />
o Online Maintenance of Very Large Random Samples on Flash Storage, Suman Nath and Phillip B. Gibbons. VLDB 2008.<br />
o Flashing Up the Storage Layer, Ioannis Koltsidas and Stratis D. Viglas. VLDB 2008.<br />
o Design of Flash-Based DBMS: An In-Page Logging Approach, Sang-Won Lee and Bongki Moon. SIGMOD 2007.<br />
• Disk Based Caching Algorithms<br />
o ARC: A Self-Tuning, Low Overhead Replacement Cache, Nimrod Megiddo and Dharmendra S. Modha, FAST 2003.<br />
o WOW: Wise Ordering for Writes – Combining Spatial and Temporal Locality in Non-Volatile Caches, Binny S. Gill and Dharmendra S. Modha. FAST 2005.<br />
o Second-Tier Cache Management Using Write Hints, Xuhui Li , Ashraf Aboulnaga , Kenneth Salem , Aamer Sachedina, and Shaobo Ga. FAST 2005.<br />
o Karma: Know-it-All Replacement for a Multilevel cAche, Gala Yadgar, Micheal Factor, and Assaf Schuster. FAST 2007.<br />
o On Multi-level Exclusive Caching: Offline Optimality and Why promotions are better than demotions,, Binny S. Gill. FAST 2008.]]></content:encoded>
		</item>
	</channel>
</rss>