<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>海东天地</title>
	<atom:link href="http://haidong.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://haidong.wordpress.com</link>
	<description>Just another weblog</description>
	<lastBuildDate>Fri, 06 Mar 2009 06:27:21 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>zh-cn</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='haidong.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/617ceba43d48bda3669f8f38478ab441?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>海东天地</title>
		<link>http://haidong.wordpress.com</link>
	</image>
			<item>
		<title>Veritas Volume Replicator VVR quick start</title>
		<link>http://haidong.wordpress.com/2009/03/06/veritas-volume-replicator-vvr-quick-start/</link>
		<comments>http://haidong.wordpress.com/2009/03/06/veritas-volume-replicator-vvr-quick-start/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 06:27:21 +0000</pubDate>
		<dc:creator>shyjack</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://haidong.wordpress.com/?p=100</guid>
		<description><![CDATA[=== setup vvr
/etc/init.d/vras-vradmind.sh start                                              [master/secondary]
/etc/init.d/vxnm-vxnetd start                                                   [master/secondary]
vxassist -g repdg make mysrl 200M alloc=disk02                                  [master/secondary]
vradmin -g repdg createpri myrvg vol01 mysrl                                    [master]
vxdg list
put dgid into /etc/vx/vras/.rdg on the secondary site. eg
echo &#8220;1169092729.31.slave&#8221; &#62;&#62; /etc/vx/vras/.rdg  (on secondary only)            [secondary]
vradmin -g repdg addsec myrvg slave test01 prlink=link_slave srlink=link_test01 [master]
vradmin -g repdg -a startrep myrvg test01                                       [master]
===checking
vradmin -g repdg [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=100&subd=haidong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>=== setup vvr<br />
/etc/init.d/vras-vradmind.sh start                                              [master/secondary]<br />
/etc/init.d/vxnm-vxnetd start                                                   [master/secondary]<br />
vxassist -g repdg make mysrl 200M alloc=disk02                                  [master/secondary]<br />
vradmin -g repdg createpri myrvg vol01 mysrl                                    [master]<br />
vxdg list</p>
<p>put dgid into /etc/vx/vras/.rdg on the secondary site. eg<br />
echo &#8220;1169092729.31.slave&#8221; &gt;&gt; /etc/vx/vras/.rdg  (on secondary only)            [secondary]<br />
vradmin -g repdg addsec myrvg slave test01 prlink=link_slave srlink=link_test01 [master]<br />
vradmin -g repdg -a startrep myrvg test01                                       [master]<br />
===checking</p>
<p>vradmin -g repdg -l printrvg myrvg<br />
vradmin -g repdg repstatus myrvg<br />
vxrvg -g repdg getdatavols myrvg<br />
vxrvg -g repdg getrlinks myrvg<br />
vxrlink -g repdg status link_slave</p>
<p>vradmin -g repdg pauserep myrvg test01                                          [master]<br />
vradmin -g repdg resumerep myrvg test01                                         [master]</p>
<p>===remove vvr</p>
<p>vradmin -g repdg -f stoprep myrvg test01                                        [master]<br />
vradmin -g repdg delsec myrvg test01                                            [master]<br />
vradmin -g repdg -f delpri myrvg                                                [master]</p>
<p>vxedit -g repdg -f -r rm mysrl                                                  [master/secondary]</p>
<p>vxassist -g repdg remove log vol01  [delete one log each time],  need to run twice if there are 2 logs   [master/secondary]</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/haidong.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/haidong.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/haidong.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/haidong.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/haidong.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/haidong.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/haidong.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/haidong.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/haidong.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/haidong.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=100&subd=haidong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://haidong.wordpress.com/2009/03/06/veritas-volume-replicator-vvr-quick-start/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc3016e71dc03fc73662af4f38bad47f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shyjack</media:title>
		</media:content>
	</item>
		<item>
		<title>Veritas Cluster Server tip to manually import type/agent</title>
		<link>http://haidong.wordpress.com/2009/03/06/veritas-cluster-server-tip-to-manually-import-typeagent/</link>
		<comments>http://haidong.wordpress.com/2009/03/06/veritas-cluster-server-tip-to-manually-import-typeagent/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 06:23:16 +0000</pubDate>
		<dc:creator>shyjack</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://haidong.wordpress.com/?p=97</guid>
		<description><![CDATA[It&#8217;s convenient to import a new type from hagui, but under some case you might be unable to do so, like no Xserver, or slow network access etc.
Here I will show you how to import  the new agent type from command line.
/opt/VRTSvcs/bin/hacf -typetocmd /etc/VRTSvcs/conf/VVRTypes.cf -display &#124; ksh
easy and straightforward.  but maybe  you don&#8217;t know it.
hacf [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=97&subd=haidong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s convenient to import a new type from hagui, but under some case you might be unable to do so, like no Xserver, or slow network access etc.</p>
<p>Here I will show you how to import  the new agent type from command line.</p>
<p>/opt/VRTSvcs/bin/hacf -typetocmd /etc/VRTSvcs/conf/VVRTypes.cf -display | ksh</p>
<p>easy and straightforward.  but maybe  you don&#8217;t know it.</p>
<p>hacf -typetocmd is not showing from &#8220;hacf -help&#8221;.</p>
<p>test01:/opt/VRTSvcs/bin #hacf -help<br />
VCS INFO V-16-1-10601 Usage:<br />
         hacf -cftocmd   &lt;conf_dir&gt; [-dest &lt;dest_dir&gt;] [-display]<br />
         hacf -cmdtocf   &lt;conf_dir&gt; [-dest &lt;dest_dir&gt;]<br />
         hacf -verify    &lt;conf_dir&gt; [-display]<br />
         hacf -help</p>
<p>test01:/opt/VRTSvcs/bin #</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/haidong.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/haidong.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/haidong.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/haidong.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/haidong.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/haidong.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/haidong.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/haidong.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/haidong.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/haidong.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=97&subd=haidong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://haidong.wordpress.com/2009/03/06/veritas-cluster-server-tip-to-manually-import-typeagent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc3016e71dc03fc73662af4f38bad47f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shyjack</media:title>
		</media:content>
	</item>
		<item>
		<title>vxvm snapshot quick start</title>
		<link>http://haidong.wordpress.com/2009/03/06/vxvm-snapshot-quick-start/</link>
		<comments>http://haidong.wordpress.com/2009/03/06/vxvm-snapshot-quick-start/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 06:19:49 +0000</pubDate>
		<dc:creator>shyjack</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://haidong.wordpress.com/?p=95</guid>
		<description><![CDATA[source dg: testdg
source vol:  vol01
data volmune mounted at:  /slavefs
snapshot mounted at:  /snapfs
 
space-optimized instant snapshot
====================================
1. check dco
vxprint -g testdg -F%instant vol01
vxprint -g testdg -F%fastresync vol01
vxprint
2.if dco not available, create it by prepare
vxsnap -g testdg prepare vol01
vxprint -g testdg -F%instant vol01
vxprint -g testdg -F%fastresync vol01
3. create cache volume in preparation of space-optimized snap
vxassist -g testdg make cachevol [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=95&subd=haidong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>source dg: testdg<br />
source vol:  vol01<br />
data volmune mounted at:  /slavefs<br />
snapshot mounted at:  /snapfs</p>
<p> </p>
<p>space-optimized instant snapshot<br />
====================================<br />
1. check dco<br />
vxprint -g testdg -F%instant vol01<br />
vxprint -g testdg -F%fastresync vol01<br />
vxprint</p>
<p>2.if dco not available, create it by prepare<br />
vxsnap -g testdg prepare vol01<br />
vxprint -g testdg -F%instant vol01<br />
vxprint -g testdg -F%fastresync vol01</p>
<p>3. create cache volume in preparation of space-optimized snap<br />
vxassist -g testdg make cachevol 100M layout=nostripe init=active disk01<br />
normally it should be 10% of original volume size</p>
<p>4. create cache objects in preparation of space-optimized snap<br />
vxmake -g testdg cache mycacheobj cachevolname=cachevol autogrow=on<br />
vxcache -g testdg start mycacheobj<br />
vxprint -g testdg</p>
<p>5. create the instant snap with space-optimized<br />
vxsnap -g testdg make source=vol01/newvol=snapvol01/cache=mycacheobj alloc=disk02<br />
vxprint -g testdg -F%incomplete snapvol01<br />
6. check file system<br />
fsck -F vxfs /dev/vx/rdsk/testdg/snapvol01</p>
<p>7. mount file system<br />
mount -F vxfs /dev/vx/dsk/testdg/snapvol01 /snapfs/</p>
<p>8. refresh<br />
umount /snapfs<br />
vxsnap -g testdg refresh snapvol01 source=vol01<br />
fsck -F vxfs /dev/vx/rdsk/testdg/snapvol01<br />
mount -F vxfs /dev/vx/dsk/testdg/snapvol01 /snapfs/</p>
<p>9. restore data volume<br />
umount /slavefs  (data volume)<br />
vxsnap -g testdg restore vol01 source=snapvol01<br />
fsck -F vxfs /dev/vx/rdsk/testdg/vol01<br />
mount -F vxfs /dev/vx/dsk/testdg/vol01 /slavefs</p>
<p>10. remove instant space-optimized snapshot<br />
umount /snapfs<br />
vxedit -g testdg -r -f rm snapvol01     [-f is used as it is still enabled, otherwise stop it first]<br />
vxedit -g testdg -f -r rm mycacheobj<br />
vxsnap -g testdg -f unprepare vol01</p>
<p> </p>
<p> <br />
full-sized instant snapshot<br />
====================================<br />
source dg: testdg<br />
source vol:  vol01<br />
1. check dco<br />
vxprint -g testdg -F%instant vol01<br />
vxprint -g testdg -F%fastresync vol01<br />
vxprint</p>
<p>2.if dco not available, create it by prepare command<br />
vxsnap -g testdg prepare vol01<br />
vxprint -g testdg -F%instant vol01<br />
vxprint -g testdg -F%fastresync vol01</p>
<p>3. create a full-sized volume in preparation of space-optimized snap<br />
LEN=`vxprint -g testdg -F%len vol01`<br />
DCONAME=`vxprint -g testdg -F%dco_name vol01`<br />
RSZ=`vxprint -g testdg -F%regionsz $DCONAME`<br />
vxassist -g testdg make snapvol01 $LEN layout=nostripe init=active alloc=disk02<br />
vxsnap -g testdg prepare snapvol01 regionsize=$RSZ<br />
4. create the snapshot<br />
vxsnap -g testdg make source=vol01/snapvol=snapvol01 [syncing=off]<br />
vxprint -g testdg -F%incomplete snapvol01</p>
<p>5. check file system<br />
fsck -F vxfs /dev/vx/rdsk/testdg/snapvol01</p>
<p>6. mount file system<br />
mount -F vxfs /dev/vx/dsk/testdg/snapvol01 /snapfs</p>
<p>7. refresh<br />
umount /snapfs<br />
vxsnap -g testdg refresh snapvol01 source=vol01<br />
fsck -F vxfs /dev/vx/rdsk/testdg/snapvol01<br />
mount -F vxfs /dev/vx/dsk/testdg/snapvol01 /snapfs/<br />
8. restore data from snap<br />
umount /slavefs <br />
vxsnap -g testdg restore vol01 source=snapvol01<br />
fsck -F vxfs /dev/vx/rdsk/testdg/vol01<br />
mount -F vxfs /dev/vx/dsk/testdg/vol01 /slavefs<br />
9. remove snap<br />
vxprint -g testdg<br />
umount /snapfs<br />
vxedit -g testdg -f -r rm snapvol01<br />
vxsnap -g testdg -f unprepare vol01</p>
<p> </p>
<p>third-mirror break-off snapshots (must be instant ready)<br />
=================================<br />
1. dco/drl<br />
vxsnap -g testdg prepare vol01<br />
2. create mirror and run it in background<br />
vxsnap -b -g testdg addmir vol01 nmirror=1 alloc=disk01,disk02  <br />
You must spread into two disk for mirrored volume, as dcl is mirrored.</p>
<p>or</p>
<p>1. prepare volume<br />
vxsnap -g testdg prepare vol01 ndcomirs=1 alloc=disk01</p>
<p>2. create mirror<br />
vxsnap -b -g testdg addmir vol01 nmirror=1 alloc=disk02</p>
<p> </p>
<p>continue<br />
3. vxprint -g testdg  [to find out the plex with snapdone]/ vxtask list</p>
<p>4. vxsnap -g testdg make source=vol01/newvol=snapvol01/plex=vol01-02</p>
<p>5. fsck -F vxfs /dev/vx/rdsk/testdg/snapvol01</p>
<p>6. mount -F vxfs /dev/vx/dsk/testdg/snapvol01 /snapfs</p>
<p>7. refresh<br />
umount /snapfs<br />
vxsnap -g testdg refresh snapvol01 source=vol01<br />
fsck -F vxfs /dev/vx/rdsk/testdg/snapvol01<br />
mount -F vxfs /dev/vx/dsk/testdg/snapvol01 /snapfs/</p>
<p>8. restore<br />
umount /slavefs <br />
vxsnap -g testdg restore vol01 source=snapvol01<br />
fsck -F vxfs /dev/vx/rdsk/testdg/vol01<br />
mount -F vxfs /dev/vx/dsk/testdg/vol01 /slavefs<br />
9. remove snap<br />
vxprint -g testdg<br />
umount /snapfs<br />
vxedit -g testdg -f -r rm snapvol01<br />
vxsnap -g testdg -f unprepare vol01</p>
<p> <br />
traditional third-mirror break-off snaphost<br />
=============================================</p>
<p>1<br />
vxassist -b -g testdg snapstart nmirror=1 vol01</p>
<p>2.<br />
vxassist -g testdg snapshot vol01 snapvol01</p>
<p>3.<br />
fsck -F vxfs /dev/vx/rdsk/testdg/snapvol01</p>
<p>4.<br />
mount -F vxfs /dev/vx/dsk/testdg/snapvol01 /snapfs</p>
<p>5. refresh<br />
umount /snapfs<br />
vxassist -b -g testdg snapback snapvol01<br />
vxassist -g testdg snapshot vol01 snapvol01<br />
fsck -F vxfs /dev/vx/rdsk/testdg/snapvol01<br />
mount -F vxfs /dev/vx/dsk/testdg/snapvol01 /snapfs</p>
<p>6. restore<br />
umount /slavefs<br />
umount /snapfs<br />
vxassist -b -g testdg -o resyncfromreplica snapback snapvol01<br />
fsck -F vxfs /dev/vx/rdsk/testdg/vol01<br />
mount -F vxfs /dev/vx/dsk/testdg/vol01 /slavefs</p>
<p>after snapback,  snapvol-1 is gone. The plex will go back to vol01 for next split<br />
vxassist -g testdg snapshot vol01 snapvol01<br />
fsck -F vxfs /dev/vx/rdsk/testdg/snapvol01<br />
mount -F vxfs /dev/vx/dsk/testdg/snapvol01 /snapfs/</p>
<p>7. remove snap<br />
umount /snapfs<br />
vxedit -g testdg -r -f rm snapvol01</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/haidong.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/haidong.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/haidong.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/haidong.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/haidong.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/haidong.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/haidong.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/haidong.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/haidong.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/haidong.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=95&subd=haidong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://haidong.wordpress.com/2009/03/06/vxvm-snapshot-quick-start/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc3016e71dc03fc73662af4f38bad47f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shyjack</media:title>
		</media:content>
	</item>
		<item>
		<title>chroot for ftp/telnet/rsh/ssh on solaris 10</title>
		<link>http://haidong.wordpress.com/2009/03/06/chroot-for-ftptelnetrshssh-on-solaris-10/</link>
		<comments>http://haidong.wordpress.com/2009/03/06/chroot-for-ftptelnetrshssh-on-solaris-10/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 06:18:05 +0000</pubDate>
		<dc:creator>shyjack</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://haidong.wordpress.com/2009/03/06/chroot-for-ftptelnetrshssh-on-solaris-10/</guid>
		<description><![CDATA[By properly setting up a new root environment, you can fool the user and make them feel they are logging into a real root environment, rather than a jailed root. the funny part is to make a perfect root environment, with everything setting up, not exposure of the real /etc/passwd and /etc/shadow etc&#8230; The way [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=93&subd=haidong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>By properly setting up a new root environment, you can fool the user and make them feel they are logging into a real root environment, rather than a jailed root. the funny part is to make a perfect root environment, with everything setting up, not exposure of the real /etc/passwd and /etc/shadow etc&#8230; The way to make a root environment I can think of includes 1. copy all required files (binary files, libraries, configurations &#8230;) down to the new root. 2. loopback mount the relevant file systems down to the new root. (the drawback is it will expose the real /etc to the user) 3. set the root path to the root path of a non-global zone. (make sure zone is running if you are running a sparse local zone)</p>
<p> </p>
<div id="message10075966" class="t_msgfont">1. ftp</div>
<p>It is fairly simple to get chroot for ftp session, change home directory from /etc/passwd as below,<br />
usertest<img src="http://haidong.wordpress.com/wp-admin/images/smilies/icon_mad.gif" border="0" alt="" />:55502:0:comments:/export/home/usertest/newroot/./test:/bin/ksh</p>
<p>/export/home/usertest/newroot/./test  is the new home directory, of which, /export/home/usertest/newroot is the new root, and /test is relateive path to the new root.</p>
<p>ftp server will change root to &#8220;/export/home/usertest/newroot/&#8221; after ftp session established.</p>
<p>Pls make sure you copy some essential required file down to the new root, such as /bin /sbin /etc,  etc.<br />
the easy way is to loopback mount those file system as below</p>
<p>cd /export/home/usertest/newroot<br />
mkdir bin sbin etc usr lib<br />
mount -F lofs /bin  /export/home/usertest/newroot/bin<br />
mount -F lofs /sbin  /export/home/usertest/newroot/sbin<br />
mount -F lofs /usr  /export/home/usertest/newroot/usr<br />
mount -F lofs /etc  /export/home/usertest/newroot/etc<br />
mount -F lofs /lib  /export/home/usertest/newroot/lib</p>
<p>after user logs in via ftp, the session will be limited under the new root (/export/home/usertest/newroot)</p>
<p>pls note:  for ftp only, even the new root is total empty, the ftp session is still able to establish. But list functionality from ftp gui client doesn&#8217;t work, command line works well.<br />
           authentication is based /etc/passwd and /etc/shadow under real root.</p>
<div class="t_msgfont">
<div id="message10075983" class="t_msgfont">2.  telnet  (this example is based on solaris 10, change the procedure accordingly if you are running sol9 or sol<img src="http://haidong.wordpress.com/wp-admin/images/smilies/icon_cool.gif" border="0" alt="" /><br />
    it doesn&#8217;t matter if you do not change home directory in /etc/passwd</div>
<p>2.1 prepare the new root environment (/export/home/usertest/newroot)<br />
    copy all required files/directories down to the new root and test it.<br />
    eg:  /usr/sbin/chroot  /export/home/usertest/newroot  /bin/ksh</p>
<p>2.2<br />
    inetadm -l telnet  &gt; telnet.bak<br />
    inetadm -m telnet exec=&#8221;/usr/sbin/a.ksh&#8221;<br />
    svcadm restart telnet<br />
   <br />
    a.ksh<br />
    #!/bin/ksh<br />
    /usr/sbin/chroot /export/home/usertest/newroot/ /usr/sbin/in.telnetd<br />
   <br />
pls note, as chroot is explicitly run by a.ksh, the authentication will be based on /etc/passwd and /etc/shadow under new root, namely<br />
/export/home/usertest/newroot/etc/passwd and /export/home/usertest/newroot/etc/shadow</p>
<p>3.  rsh<br />
    it doesn&#8217;t matter if you do not change home directory in /etc/passwd<br />
    rsh is using SMF svc:/network/login:rlogin and associated daemon is /usr/sbin/in.rlogind<br />
   <br />
3.1 prepare the new root<br />
3.2 inetadm -m shell/rlogin exec=&#8221;/usr/sbin/b.ksh&#8221;</p>
<p>    b.ksh<br />
    #!/bin/ksh<br />
    /usr/sbin/chroot /export/home/usertest/newroot/ /usr/sbin/in.rlogind<br />
   <br />
pls note, authentication is based on /export/home/usertest/newroot/etc/passwd and /export/home/usertest/newroot/etc/shadow.</p></div>
<div class="t_msgfont">
<div id="message10075990" class="t_msgfont">4.  openssh   </div>
<p>    authentication is based /etc/passwd and /etc/shadow under real root.<br />
4.1  it is a must to change the home directory as above for ftp.<br />
4.2  prepare the new root and test it.<br />
4.3  download the below packages from sunfreeware.com and install them<br />
     <br />
     gcc<br />
     libiconv<br />
     openssl</p>
<p>4.4  download openssh source code and save into a temporary directory<br />
     modify session.c as stated below</p>
<p>+ #define CHROOT                     /* to be added (of course without + mark at the beginning) */</p>
<p>  /* func */</p>
<p>  Session *session_new(void);<br />
***************<br />
*** 1159,1164 ****<br />
&#8212; 1161,1171 &#8212;-<br />
  void<br />
  do_setusercontext(struct passwd *pw)<br />
  {<br />
+ #ifdef CHROOT                      /* to be added (of course without + mark at the beginning ) */<br />
+       char *user_dir;              /* to be added (of course without + mark at the beginning) */<br />
+       char *new_root;              /* to be added (of course without + mark at the beginning) */<br />
+ #endif /* CHROOT */                /* to be added (of course without + mark at the beginning) */<br />
+<br />
        char tty=&#8221;;</p>
<p>  #ifdef HAVE_CYGWIN</p>
<p>                if (setlogin(pw-&gt;pw_name) &lt; 0)<br />
                        error(&#8220;setlogin failed: %s&#8221;, strerror(errno));</p>
<p>+               #ifdef CHROOT                  /* to be added (of course without + mark at the beginning) */<br />
+                       user_dir = xstrdup(pw-&gt;pw_dir);  /* to be added (of course without + mark at the beginning) */<br />
+                       new_root = user_dir + 1;  /* to be added (of course without + mark at the beginning) */<br />
+<br />
+                       while((new_root = strchr(new_root, &#8216;.&#8217;)) != NULL) {   /* to be added (of course without + mark at the beginning) */<br />
+                               new_root&#8211;;                                   /* to be added (of course without + mark at the beginning) */<br />
+                               if(strncmp(new_root, &#8220;/./&#8221;, 3) == 0) {        /* to be added (of course without + mark at the beginning) */<br />
+                                       *new_root = &#8221;;                     /* to be added (of course without + mark at the beginning) */<br />
+                                       new_root += 2;                        /* to be added (of course without + mark at the beginning) */<br />
+<br />
+                                       if(chroot(user_dir) != 0)             /* to be added (of course without + mark at the beginning) */<br />
+                                               fatal(&#8220;Couldn&#8217;t chroot to user directory %s&#8221;, user_dir);   /* to be added (of course without + mark at the beginning) */<br />
+<br />
+                                       pw-&gt;pw_dir = new_root;                 /* to be added (of course without + mark at the beginning) */<br />
+                                       break;                                 /* to be added (of course without + mark at the beginning) */<br />
+                               }                                              /* to be added (of course without + mark at the beginning) */<br />
+                               new_root += 2;                                 /* to be added (of course without + mark at the beginning) */<br />
+                       }                                                      /* to be added (of course without + mark at the beginning) */<br />
+               #endif /* CHROOT */                                            /* to be added (of course without + mark at the beginning) */<br />
+<br />
                if (setgid(pw-&gt;pw_gid) &lt; 0) {<br />
                        perror(&#8220;setgid&#8221;);<br />
                        exit(1);<br />
     </p>
<p>4.5<br />
./configure &#8211;with-random=/dev/random \<br />
  &#8211;prefix=/usr/local &#8211;libexecdir=/usr/libexec/openssh \<br />
  &#8211;sysconfdir=/usr/local/etc &#8211;mandir=/usr/share/man</p>
<p>4.6<br />
make</p>
<p>4.7<br />
mkdir /var/empty<br />
chown root:sys /var/empty<br />
chmod 755 /var/empty<br />
groupadd sshd<br />
useradd -g sshd -c &#8217;sshd privsep&#8217; -d /var/empty -s /bin/false sshd</p>
<p>4.8<br />
make install</p>
<p>4.9<br />
/usr/local/bin/ssh-keygen -t rsa1 -f /usr/local/etc/ssh_host_key -N<br />
/usr/local/bin/ssh-keygen -t dsa -f /usr/local/etc/ssh_host_dsa_key -N<br />
/usr/local/bin/ssh-keygen -t rsa -f /usr/local/etc/ssh_host_rsa_key -N</p>
<p>4.10<br />
create file /etc/init.d/sshd</p>
<p>#!/bin/sh<br />
pid=`/usr/bin/ps -e | /usr/bin/grep sshd |   /usr/bin/sed -e &#8217;s/^  *//&#8217; -e &#8217;s/ .*//&#8217;`<br />
case $1 in<br />
&#8217;start&#8217;)<br />
  /usr/local/sbin/sshd;;<br />
&#8217;stop&#8217;)<br />
  if [ "${pid}" != "" ]; then<br />
  /usr/bin/kill ${pid}; fi;;<br />
*)<br />
  echo &#8220;usage: /etc/init.d/sshd (start|stop)&#8221;;;<br />
esac</p>
<p>4.11<br />
ln -s /etc/init.d/sshd /etc/rc2.d/S100sshd_chroot<br />
ln -s /etc/init.d/sshd /etc/rc0.d/K100sshd_chroot</p>
<p>4.12<br />
/etc/rc2.d/S100sshd_chroot start</p></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/haidong.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/haidong.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/haidong.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/haidong.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/haidong.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/haidong.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/haidong.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/haidong.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/haidong.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/haidong.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=93&subd=haidong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://haidong.wordpress.com/2009/03/06/chroot-for-ftptelnetrshssh-on-solaris-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc3016e71dc03fc73662af4f38bad47f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shyjack</media:title>
		</media:content>

		<media:content url="http://haidong.wordpress.com/wp-admin/images/smilies/icon_mad.gif" medium="image" />

		<media:content url="http://haidong.wordpress.com/wp-admin/images/smilies/icon_cool.gif" medium="image" />
	</item>
		<item>
		<title>call mum!</title>
		<link>http://haidong.wordpress.com/2008/12/31/call-mum/</link>
		<comments>http://haidong.wordpress.com/2008/12/31/call-mum/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 13:22:31 +0000</pubDate>
		<dc:creator>shyjack</dc:creator>
				<category><![CDATA[生活]]></category>

		<guid isPermaLink="false">http://haidong.wordpress.com/?p=90</guid>
		<description><![CDATA[today, being the last day of 2008,  when I finished my day and stepped out the office,  a plane was writing above words on the sky.
I took a picture and attached it here as a reminder that when you are less busy and have a moment, give your parents a ring, let them know you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=90&subd=haidong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>today, being the last day of 2008,  when I finished my day and stepped out the office,  a plane was writing above words on the sky.</p>
<p>I took a picture and attached it here as a reminder that when you are less busy and have a moment, give your parents a ring, let them know you are going well everything.</p>
<p><img class="aligncenter size-full wp-image-91" title="31122008" src="http://haidong.files.wordpress.com/2008/12/31122008.jpg?w=450&#038;h=337" alt="31122008" width="450" height="337" /></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/haidong.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/haidong.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/haidong.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/haidong.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/haidong.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/haidong.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/haidong.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/haidong.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/haidong.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/haidong.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=90&subd=haidong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://haidong.wordpress.com/2008/12/31/call-mum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc3016e71dc03fc73662af4f38bad47f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shyjack</media:title>
		</media:content>

		<media:content url="http://haidong.files.wordpress.com/2008/12/31122008.jpg" medium="image">
			<media:title type="html">31122008</media:title>
		</media:content>
	</item>
		<item>
		<title>two years already</title>
		<link>http://haidong.wordpress.com/2008/12/31/two-years-already/</link>
		<comments>http://haidong.wordpress.com/2008/12/31/two-years-already/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 00:40:10 +0000</pubDate>
		<dc:creator>shyjack</dc:creator>
				<category><![CDATA[生活]]></category>

		<guid isPermaLink="false">http://haidong.wordpress.com/?p=87</guid>
		<description><![CDATA[By today, I had been here, Sydney for two years.
on 31st, Dec 2006, I arrived in Sydney in the morning,  everying is still so fresh in my mind. My brother-in-law picked me up and drove me back his home, we live in his house for 20 days, then we rent another townhouse, and later on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=87&subd=haidong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>By today, I had been here, Sydney for two years.</p>
<p>on 31st, Dec 2006, I arrived in Sydney in the morning,  everying is still so fresh in my mind. My brother-in-law picked me up and drove me back his home, we live in his house for 20 days, then we rent another townhouse, and later on we bought a townhouse.</p>
<p>Then we got a baby, and now my baby is already nearly 4 months  old.</p>
<p>how time flies!!!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/haidong.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/haidong.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/haidong.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/haidong.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/haidong.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/haidong.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/haidong.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/haidong.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/haidong.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/haidong.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=87&subd=haidong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://haidong.wordpress.com/2008/12/31/two-years-already/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc3016e71dc03fc73662af4f38bad47f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shyjack</media:title>
		</media:content>
	</item>
		<item>
		<title>problem with disk capacity</title>
		<link>http://haidong.wordpress.com/2008/12/31/problem-with-disk-capacity/</link>
		<comments>http://haidong.wordpress.com/2008/12/31/problem-with-disk-capacity/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 00:33:27 +0000</pubDate>
		<dc:creator>shyjack</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://haidong.wordpress.com/?p=85</guid>
		<description><![CDATA[Yesterday, I was tasked to configure some new LUNs that allocated to a M500o server.  All luns worked very well except one.
syminq command showed the disk is with 18G space, luxadmin showed the same result as well.  But format command only recognize it as 9G.  
 
bash-3.00# syminq &#124; grep -i 195E
/dev/rdsk/c3t60060480000290100478533031393545d0s2 M(2) EMC SYMMETRIX 5771 780195E008 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=85&subd=haidong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Yesterday, I was tasked to configure some new LUNs that allocated to a M500o server.  All luns worked very well except one.</p>
<p>syminq command showed the disk is with 18G space, luxadmin showed the same result as well.  But format command only recognize it as 9G.  </p>
<p> </p>
<p><span style="font-size:x-small;color:#0000ff;">bash-3.00# syminq | grep -i 195E</p>
<p></span><strong><span style="font-size:x-small;color:#ff0000;">/dev/rdsk/c3t60060480000290100478533031393545d0s2 M(2) EMC SYMMETRIX 5771 780195E008 17677440 (here 18G)</p>
<p></span></strong><span style="font-size:x-small;color:#0000ff;">bash-3.00# luxadm display /dev/rdsk/c3t60060480000290100478533031393543d0s2</p>
<p>DEVICE PROPERTIES for disk: /dev/rdsk/c3t60060480000290100478533031393543d0s2</p>
<p>Vendor: EMC</p>
<p>Product ID: SYMMETRIX</p>
<p>Revision: 5771</p>
<p>Serial Num: 10047895C008</p>
<p></span><strong><span style="font-size:x-small;color:#ff0000;">Unformatted capacity: 17263.125 Mbytes &lt;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;18G</p>
<p></span></strong><span style="font-size:x-small;color:#0000ff;">Read Cache: Enabled</p>
<p>Minimum prefetch: 0&#215;0</p>
<p>Maximum prefetch: 0xffff</p>
<p>Device Type: Disk device</p>
<p>Path(s):</p>
<p>/dev/rdsk/c3t60060480000290100478533031393543d0s2</p>
<p>/devices/scsi_vhci/ssd@g60060480000290100478533031393543:c,raw</p>
<p>Controller /devices/pci@12,600000/SUNW,qlc@0/fp@0,0</p>
<p>Device Address 5006048452a53fb9,6a</p>
<p>Host controller port WWN 2100001b320f2023</p>
<p>Class primary</p>
<p>State ONLINE</p>
<p>Controller /devices/pci@12,600000/SUNW,qlc@0,1/fp@0,0</p>
<p>Device Address 5006048452a53fb6,6a</p>
<p>Host controller port WWN 2101001b322f2023</p>
<p>Class primary</p>
<p>State ONLINE</p>
<p> </p>
<p>But, with format</p>
<p>55. c3t60060480000290100478533031393545d0 &lt;EMC-SYMMETRIX-5771 cyl 18412 alt 2 hd 15 sec 128&gt;</p>
<p>/scsi_vhci/ssd@g60060480000290100478533031393545</p>
<p></span><strong><span style="font-size:x-small;color:#ff0000;">56. c3t60060480000290100478533031393543d0 &lt;EMC-SYMMETRIX-5771 cyl 9205 alt 2 hd 15 sec 128&gt; default4 &lt;&#8212; only 9205 cylinders</p>
<p></span></strong><span style="font-size:x-small;color:#0000ff;">/scsi_vhci/ssd@g60060480000290100478533031393543</p>
<p>57. c3t60060480000290100478533031343033d0 &lt;EMC-SYMMETRIX-5771 cyl 36826 alt 2 hd 30 sec 128&gt;</p>
<p>/scsi_vhci/ssd@g60060480000290100478533031343033</p>
<p>partition&gt; p</p>
<p>Volume: default4</p>
<p>Current partition table (original):</p>
<p>Total disk cylinders available: 9205 + 2 (reserved cylinders)</p>
<p>Part Tag Flag Cylinders Size Blocks</p>
<p>0 unassigned wu 0 0 (0/0/0) 0</p>
<p>1 unassigned wu 0 0 (0/0/0) 0</p>
<p></span><strong><span style="font-size:x-small;color:#ff0000;">2 backup wu 0 &#8211; 9204 8.43GB (9205/0/0) 17673600 &lt;&#8212;&#8211; 9G</p>
<p></span></strong><span style="font-size:x-small;color:#0000ff;">3 unassigned wu 0 0 (0/0/0) 0</p>
<p>4 unassigned wu 0 0 (0/0/0) 0</p>
<p>5 unassigned wu 0 0 (0/0/0) 0</p>
<p>6 unassigned wu 0 0 (0/0/0) 0</p>
<p>7 unassigned wu 0 0 (0/0/0) 0</p>
<p>partition&gt;</p>
<p> </p>
<p>This is becuase the disk got wrongly labelled before, we just need to manually destroy the label and re-label it.</p>
<p><span style="font-size:x-small;">dd if=/dev/zero of=/dev/rdsk/c3t60060480000290100478533031393543d0s2 bs=512k count=1</p>
<p>then go back to format and re-label the disk,  afterwards, format reported it as 18G emc disk.</p>
<p></span></p>
<p></span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/haidong.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/haidong.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/haidong.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/haidong.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/haidong.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/haidong.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/haidong.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/haidong.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/haidong.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/haidong.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=85&subd=haidong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://haidong.wordpress.com/2008/12/31/problem-with-disk-capacity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc3016e71dc03fc73662af4f38bad47f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shyjack</media:title>
		</media:content>
	</item>
		<item>
		<title>圣诞节还是来了</title>
		<link>http://haidong.wordpress.com/2008/12/24/%e5%9c%a3%e8%af%9e%e8%8a%82%e8%bf%98%e6%98%af%e6%9d%a5%e4%ba%86/</link>
		<comments>http://haidong.wordpress.com/2008/12/24/%e5%9c%a3%e8%af%9e%e8%8a%82%e8%bf%98%e6%98%af%e6%9d%a5%e4%ba%86/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 00:33:17 +0000</pubDate>
		<dc:creator>shyjack</dc:creator>
				<category><![CDATA[生活]]></category>

		<guid isPermaLink="false">http://haidong.wordpress.com/?p=82</guid>
		<description><![CDATA[因为对圣诞节没有太多的感受，因此没有选择在圣诞节期间休假。还是选择这段时间工作好阿，每天support  电话就响有限大几次，比较轻松。今天经理过来，说今天下午大家要是没事，可以提前走，让我想到了国内的时候，每次大年30的时候，领导都是说，没事的时候，大家可以早点走，而且，公司的班车都是1:30  就发车。
昨天还碰到一件有意思大事情，下班回家，开到 delhi  路和  epping  路交界处，等红灯，绿灯一亮，大家都准备发动，但是有个吉普车，超级强悍，它发出了我所见过大最强烈的大浓烟，导致它后面大5量车都不敢动地方，估计这车是烧柴禾的，而且还是那种湿柴禾。
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=82&subd=haidong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>因为对圣诞节没有太多的感受，因此没有选择在圣诞节期间休假。还是选择这段时间工作好阿，每天support  电话就响有限大几次，比较轻松。今天经理过来，说今天下午大家要是没事，可以提前走，让我想到了国内的时候，每次大年30的时候，领导都是说，没事的时候，大家可以早点走，而且，公司的班车都是1:30  就发车。</p>
<p>昨天还碰到一件有意思大事情，下班回家，开到 delhi  路和  epping  路交界处，等红灯，绿灯一亮，大家都准备发动，但是有个吉普车，超级强悍，它发出了我所见过大最强烈的大浓烟，导致它后面大5量车都不敢动地方，估计这车是烧柴禾的，而且还是那种湿柴禾。</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/haidong.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/haidong.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/haidong.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/haidong.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/haidong.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/haidong.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/haidong.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/haidong.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/haidong.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/haidong.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=82&subd=haidong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://haidong.wordpress.com/2008/12/24/%e5%9c%a3%e8%af%9e%e8%8a%82%e8%bf%98%e6%98%af%e6%9d%a5%e4%ba%86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc3016e71dc03fc73662af4f38bad47f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shyjack</media:title>
		</media:content>
	</item>
		<item>
		<title>还是关于修改主机名，也要照顾VCS的感受！</title>
		<link>http://haidong.wordpress.com/2008/12/17/%e8%bf%98%e6%98%af%e5%85%b3%e4%ba%8e%e4%bf%ae%e6%94%b9%e4%b8%bb%e6%9c%ba%e5%90%8d%ef%bc%8c%e4%b9%9f%e8%a6%81%e7%85%a7%e9%a1%bevcs%e7%9a%84%e6%84%9f%e5%8f%97%ef%bc%81/</link>
		<comments>http://haidong.wordpress.com/2008/12/17/%e8%bf%98%e6%98%af%e5%85%b3%e4%ba%8e%e4%bf%ae%e6%94%b9%e4%b8%bb%e6%9c%ba%e5%90%8d%ef%bc%8c%e4%b9%9f%e8%a6%81%e7%85%a7%e9%a1%bevcs%e7%9a%84%e6%84%9f%e5%8f%97%ef%bc%81/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 11:07:56 +0000</pubDate>
		<dc:creator>shyjack</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://haidong.wordpress.com/?p=80</guid>
		<description><![CDATA[上周末，成功将一个cluster中的两个节点替换了。原有系统是一个四节点的cluster，节点app1和app2  是两台 v480, db1和db2 是两台F6800。用两台M4000替换app1和app2。两台M4000分别命名为app11, app21，建立一个2节点的cluster，测试成功后，rename app11, app21 to app1，app2。 修改/etc/llttab /etc/llthosts,  相应的修改了main.cf 后，新节点加入后，一直显示节点app11加入，真是气人啊。
后来仔细看看文档， 发现还有个文件需要修改 /etc/VRTSvcs/conf/sysname, 如果该文件存在，cluster中的节点名字就来自它，如果不存在，就来在&#8221;uname -n&#8221;, 修改了这个文件后，成功将节点app1,app2重新加入到cluster中。
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=80&subd=haidong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>上周末，成功将一个cluster中的两个节点替换了。原有系统是一个四节点的cluster，节点app1和app2  是两台 v480, db1和db2 是两台F6800。用两台M4000替换app1和app2。两台M4000分别命名为app11, app21，建立一个2节点的cluster，测试成功后，rename app11, app21 to app1，app2。 修改/etc/llttab /etc/llthosts,  相应的修改了main.cf 后，新节点加入后，一直显示节点app11加入，真是气人啊。</p>
<p>后来仔细看看文档， 发现还有个文件需要修改 /etc/VRTSvcs/conf/sysname, 如果该文件存在，cluster中的节点名字就来自它，如果不存在，就来在&#8221;uname -n&#8221;, 修改了这个文件后，成功将节点app1,app2重新加入到cluster中。</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/haidong.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/haidong.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/haidong.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/haidong.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/haidong.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/haidong.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/haidong.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/haidong.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/haidong.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/haidong.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=80&subd=haidong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://haidong.wordpress.com/2008/12/17/%e8%bf%98%e6%98%af%e5%85%b3%e4%ba%8e%e4%bf%ae%e6%94%b9%e4%b8%bb%e6%9c%ba%e5%90%8d%ef%bc%8c%e4%b9%9f%e8%a6%81%e7%85%a7%e9%a1%bevcs%e7%9a%84%e6%84%9f%e5%8f%97%ef%bc%81/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc3016e71dc03fc73662af4f38bad47f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shyjack</media:title>
		</media:content>
	</item>
		<item>
		<title>修改主机名，要考虑vxvm的感受</title>
		<link>http://haidong.wordpress.com/2008/12/12/%e4%bf%ae%e6%94%b9%e4%b8%bb%e6%9c%ba%e5%90%8d%ef%bc%8c%e8%a6%81%e8%80%83%e8%99%91vxvm%e7%9a%84%e6%84%9f%e5%8f%97/</link>
		<comments>http://haidong.wordpress.com/2008/12/12/%e4%bf%ae%e6%94%b9%e4%b8%bb%e6%9c%ba%e5%90%8d%ef%bc%8c%e8%a6%81%e8%80%83%e8%99%91vxvm%e7%9a%84%e6%84%9f%e5%8f%97/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 15:59:35 +0000</pubDate>
		<dc:creator>shyjack</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://haidong.wordpress.com/?p=76</guid>
		<description><![CDATA[一些时候，需要修改主机名，对于vcs，相应的配置比较明了，不再累叙。对于vxvm，可以
1.  collect a copy of vxexplorer
2. vxdg -h &#60;new-hostname&#62; deport dgname 
    这步是修改vxvm disk上的信息
3. vxdctl hostid &#60;newhostname&#62;
    这步是修改/etc/vx/volboot 文件，以便将来有新盘加入的时候，写入新的hostname信息。
4. Change the hostname and IP address of the system
5. reboot server

但是在vxvm4.1 以及 5.0上，未做如上修改，主机重启后，disk groups 也都全部被自动import进来了。所以，估计除了hostname，vxvm肯定还是在disk上写了其他的信息，主机重启后，能自动识别disk 就是应该属于本机，就自动import进来了。
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=76&subd=haidong&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>一些时候，需要修改主机名，对于vcs，相应的配置比较明了，不再累叙。对于vxvm，可以</p>
<p>1.  collect a copy of vxexplorer</p>
<p>2. vxdg -h &lt;new-hostname&gt; deport dgname </p>
<p>    这步是修改vxvm disk上的信息</p>
<p>3. vxdctl hostid &lt;newhostname&gt;</p>
<p>    这步是修改/etc/vx/volboot 文件，以便将来有新盘加入的时候，写入新的hostname信息。</p>
<p>4. Change the hostname and IP address of the system</p>
<div>5. reboot server</div>
<div></div>
<div>但是在vxvm4.1 以及 5.0上，未做如上修改，主机重启后，disk groups 也都全部被自动import进来了。所以，估计除了hostname，vxvm肯定还是在disk上写了其他的信息，主机重启后，能自动识别disk 就是应该属于本机，就自动import进来了。</div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/haidong.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/haidong.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/haidong.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/haidong.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/haidong.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/haidong.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/haidong.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/haidong.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/haidong.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/haidong.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=haidong.wordpress.com&blog=4964247&post=76&subd=haidong&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://haidong.wordpress.com/2008/12/12/%e4%bf%ae%e6%94%b9%e4%b8%bb%e6%9c%ba%e5%90%8d%ef%bc%8c%e8%a6%81%e8%80%83%e8%99%91vxvm%e7%9a%84%e6%84%9f%e5%8f%97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc3016e71dc03fc73662af4f38bad47f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shyjack</media:title>
		</media:content>
	</item>
	</channel>
</rss>