<?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/"
	>

<channel>
	<title>Admin&#039;s Choice</title>
	<atom:link href="http://adminschoice.com/feed" rel="self" type="application/rss+xml" />
	<link>http://adminschoice.com</link>
	<description>Unix adminstrators documents , tip and more</description>
	<lastBuildDate>Thu, 11 Feb 2010 02:53:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unix Date Format Examples</title>
		<link>http://adminschoice.com/unix-date-format-examples</link>
		<comments>http://adminschoice.com/unix-date-format-examples#comments</comments>
		<pubDate>Thu, 11 Feb 2010 02:53:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Unix Date Format Examples]]></category>

		<guid isPermaLink="false">http://adminschoice.com/?p=417</guid>
		<description><![CDATA[Unix date format is needed  in the scripts, timestamped log files and  script generated reports .  This article attempts to simply date formatting with several examples .  Date command in Unix is used to format date as well as time . First portion of this article covers Date  function and the second portion has the  [...]]]></description>
			<content:encoded><![CDATA[<p>Unix date format is needed  in the scripts, timestamped log files and  script generated reports .  This article attempts to simply date formatting with several examples .  Date command in Unix is used to format date as well as time . First portion of this article covers Date  function and the second portion has the  time function covered .</p>
<p><strong>Unix   Basic date format</strong></p>
<p>$date &#8220;+&lt;Parameter&gt;&lt;seprator&gt;&lt;Parameter&gt;&lt;seprator&gt;&lt;Parameter&gt;</p>
<p>Where Parameters  is  any one or more Parameter from the list below and separator is a any field separator like  hyphen( &#8211; ) , slash \ , colon :   and it is optional.</p>
<p><strong>Unix Date Format Examples</strong></p>
<p>lets get the parameter for year , month and date and produce a hyphen separated  date format</p>
<p><strong><em>$date &#8220;+%Y-%m-%d&#8221;</em></strong></p>
<p><strong><em>2010-02-10</em></strong></p>
<p>%Y is keyword for four digit year<br />
%m is keyword for two digit month<br />
%d is keyword for two digit date<br />
Hyphen is separator here .</p>
<p>If you change the separator here  to  slash the format would look like</p>
<p><em><strong>$date &#8220;+%Y/%m/%d&#8221;<br />
2010/02/10</strong></em></p>
<p>You can switch date keyword anyway you want , if you need month first and year last  ,</p>
<p><em><strong>$date &#8220;+%m-%d-%Y&#8221;<br />
02-10-2010</strong></em></p>
<h2>Weekdays </h2>
<p>You can have  additional weekday information in your date with %A as</p>
<p><strong><em>$date &#8220;+%m-%d-%Y %A&#8221;<br />
02-10-2010 Wednesday</em></strong></p>
<p>or</p>
<p><em><strong>$date &#8220;+%A %m-%d-%Y&#8221;<br />
Wednesday 02-10-2010</strong></em></p>
<p>These are options you can select for weekday</p>
<p>%a 	weekday, abbreviated 	Wed<br />
%A 	weekday, full 	Wednesday<br />
%d 	day of the month (dd), zero padded 	10<br />
%e 	day of the month (dd) 	10<br />
%j 	day of year, zero padded 	000-366<br />
%u 	day of week starting with Monday (1), i.e. mtwtfss 	3<br />
%w 	day of week starting with Sunday (0), i.e. smtwtfs 	3</p>
<h2>Month </h2>
<p>You can have additional month information in your date with %B as</p>
<p><strong><em>$date &#8220;+%m-%d-%Y %B&#8221;<br />
02-10-2010 Februrary</em></strong></p>
<p>or</p>
<p><em><strong>$date &#8220;+%B %m-%d-%Y&#8221;<br />
February 02-10-2010</strong></em></p>
<p>These are options you can select for month</p>
<p>%m 	mm month as two digits<br />
%b 	Mon, locale&#8217;s abbreviated 	Feb<br />
%B 	locale&#8217;s full month, variable length 	February</p>
<h2>Year</h2>
<p>You can have additional year information as two digit or four digit with %y or %Y as</p>
<p><em><strong>$date &#8220;+%m-%d-%y &#8221;<br />
02-10-10</strong></em></p>
<p>or</p>
<p><strong><em>$date &#8220;+%m-%d-%Y &#8221;<br />
02-10-2010</em></strong></p>
<p>These are options you can select for year</p>
<p>%y 	yy two digit year 	00–99<br />
%Y 	ccyy year 	2010</p>
<p>Additional date format parameters which can be used :</p>
<h2>Week</h2>
<p>%U 	week number Sunday as first day of week 	01–53<br />
%W 	week number Monday as first day of week 	01–53<br />
%V 	week of the year 	01–53</p>
<h2>Century</h2>
<p>%C 	cc century 	00–99</p>
<h2>Date</h2>
<p>%D 	mm/dd/yy 	02/10/10<br />
%x 	locale&#8217;s date representation (mm/dd/yy) 	02/10/2010<br />
%F 	%Y-%m-%d 	2010-02-10</p>
<h2>Date and Time time stamp</h2>
<p>%c 	locale&#8217;s date and time 	Wed Feb 10 10:02:33 PST 2010</p>
<hr />
<h2>Time function </h2>
<p>Time function is simple to use and date command is used to format &amp; display time as well . You can use date and time parameters to format your date time stamp as per your requirment</p>
<p>A simple time stamp with date  can be generated as :</p>
<p><em><strong>$date &#8220;+%c&#8221;</strong></em><br />
%c 	locale&#8217;s date and time 	Sat Nov 04 12:02:33 EST 1989</p>
<p>Date function have some preformated time stamps to make things easier</p>
<p><strong>Example :</strong></p>
<p><em><strong>$date &#8220;+%r&#8221;<br />
05:28:55 PM</strong></em></p>
<p>More preformated options :</p>
<p>%R 	hours, minutes (24 hour clock) 	hh:mm e.g. 17:28<br />
%T 	hours, minutes, seconds (24-hour clock) 	17:28:55<br />
%X 	locale&#8217;s time representation (%H:%M:%S)       05:28:55 PM</p>
<p>Custom time format</p>
<p>Examples</p>
<p>Time stamp with  12 hr clock</p>
<p><em><strong>$date &#8220;+%l:%M:%S<br />
5:22:45</strong></em></p>
<p>Time stamp with  24 hr clock</p>
<p><em><strong>$date &#8220;+%H:%M:%S&#8221;<br />
20:22:45<br />
</strong></em></p>
<p>Time stamp with  AM/PM</p>
<p><em><strong>$date &#8220;+%l:%M:%S %p&#8221;<br />
5:22:45  PM<br />
</strong></em></p>
<p>Additional date time parameters :</p>
<p><strong>Hours</strong><br />
%l (Lowercase L) 	hour (12 hour clock) 	8<br />
%I (Uppercase I) 	hour (12 hour clock) zero padded 	08<br />
%k 	hour (24 hour clock) 	20<br />
%H 	hour (24 hour clock) zero padded 	20<br />
%p 	locale&#8217;s upper case AM or PM (blank in many locales) 	PM<br />
%P 	locale&#8217;s lower case am or pm (really!) 	pm</p>
<p><strong>Minutes</strong><br />
%M 	MM minutes 	28</p>
<p><strong>Seconds</strong><br />
%s 	seconds since 00:00:00 1970-01-01 UTC (Unix epoch) 	1265833735<br />
%S 	SS second 	00–60<br />
%N 	nanoseconds 	000000000–999999999</p>
<p><strong>Time zone</strong><br />
%z 	-zzzz RFC-822 style numeric timezone 	-0500<br />
%Z 	time zone (e.g., EDT) nothing if no time zone is determinable 	EST</p>
]]></content:encoded>
			<wfw:commentRss>http://adminschoice.com/unix-date-format-examples/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php Date Format</title>
		<link>http://adminschoice.com/php-date-format</link>
		<comments>http://adminschoice.com/php-date-format#comments</comments>
		<pubDate>Sat, 06 Feb 2010 02:09:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://adminschoice.com/?p=397</guid>
		<description><![CDATA[Date time formatting in PHP 
Many scripts written in php need date and time function . PHP has many predfined date formats and you can also customized it as per your need .
Here are some of the date format examples and additional details for php.
Examples 
Variable $today has different formats as we set the format [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Date time formatting in PHP </strong><br />
Many scripts written in php need date and time function . PHP has many predfined date formats and you can also customized it as per your need .</p>
<p>Here are some of the date format examples and additional details for php.</p>
<p><strong>Examples </strong><br />
Variable $today has different formats as we set the format types in the following examples : </p>
<p>$today = date(&#8221;F j, Y, g:i a&#8221;);       ->        February 5, 2010, 6:20 pm<br />
$today = date(&#8221;m.d.y&#8221;);               ->          02.05.10<br />
$today = date(&#8221;j, n, Y&#8221;);               ->        5, 2, 2010<br />
$today = date(&#8221;Ymd&#8221;);                  ->         20100205<br />
$today = date(&#8217;h-i-s, j-m-y, it is w Day&#8217;); ->   06-20-25, 5-02-10, 2028 2025 5 Fripm10<br />
$today = date(&#8217;\i\t \i\s \t\h\e jS \d\a\y.&#8217;); ->  it is the 5th day.<br />
$today = date(&#8221;D M j G:i:s T Y&#8221;);      ->          Fri Feb 5 18:20:25 PST 2010<br />
$today = date(&#8217;H:m:s \m \i\s\ \m\o\n\t\h&#8217;);  ->    18:02:25 m is month</p>
<p><strong>Options for php date format</strong></p>
<div align="left">
<table width="570" border="0" height="1953">
<tr>
<td width="81" valign="top" bgcolor="#808080" height="38">
<b><font color="#FFFFFF">Character</font></b></p>
<td width="195" valign="top" bgcolor="#808080" height="38"><b><font color="#FFFFFF">Description</font></b></td>
<td width="274" valign="top" bgcolor="#808080" height="38"><b><font color="#FFFFFF">Example</font></b></td>
<tr>
<td width="81" valign="top" height="40">
d</p>
<td width="195" valign="top" height="40">Day of the month, 2 digits with leading zeros</td>
<td width="274" valign="top" height="40">01 to 31</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">D</td>
<td width="195" valign="top" bordercolor="#E4E4E4" bgcolor="#E4E4E4" height="40">A textual representation of a day, three letters</td>
<td width="274" valign="top" bordercolor="#E4E4E4" bgcolor="#E4E4E4" height="40">Mon through Sun</td>
<tr>
<td width="81" valign="top" height="40">j</td>
<td width="195" valign="top" height="40">Day of the month without leading zeros</td>
<td width="274" valign="top" height="40">1 to 31</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">l (lowercase &#8216;L&#8217;)</td>
<td width="195" valign="top" bgcolor="#E4E4E4" height="40">A full textual representation of the day of the week</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="40">Sunday through Saturday</td>
<tr>
<td width="81" valign="top" height="59">N</td>
<td width="195" valign="top" height="59">ISO-8601 numeric representation of the day of the week (added in PHP 5.1.0)</td>
<td width="274" valign="top" height="59">1 (for Monday) through 7 (for Sunday)</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">S</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="40">English ordinal suffix for the day of the month, 2 characters</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="40">st, nd, rd or th. Works well with j</td>
<tr>
<td width="81" valign="top" height="40">w</td>
<td width="195" valign="top" height="40">Numeric representation of the day of the week</td>
<td width="274" valign="top" height="40">0 (for Sunday) through 6 (for Saturday)</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">z</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="40">The day of the year (starting from 0)</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="40">0 through 365</td>
<tr>
<td width="550" valign="top" colspan="3" bgcolor="#808080" height="21"><b><font color="#FFFFFF">Week</font></b></td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="59">W</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="59">ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="59">Example: 42 (the 42nd week in the year)</td>
<tr>
<td width="550" valign="top" colspan="3" bgcolor="#808080" height="21"><font color="#FFFFFF"><b>Month</b></font></td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="59">F</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="59">A full textual representation of a month, such as January or March</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="59">January through December</td>
<tr>
<td width="81" valign="top" height="40">m</td>
<td width="195" valign="top" height="40">Numeric representation of a month, with leading zeros</td>
<td width="274" valign="top" height="40">01 through 12</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">M</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="40">A short textual representation of a month, three letters</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="40">Jan through Dec</td>
<tr>
<td width="81" valign="top" height="40">n</td>
<td width="195" valign="top" height="40">Numeric representation of a month, without leading zeros</td>
<td width="274" valign="top" height="40">1 through 12</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">t</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="40">Number of days in the given month</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="40">28 through 31</td>
<tr>
<td width="81" valign="top" bgcolor="#808080" height="21"><font color="#FFFFFF"><b>Year</b></font></td>
<td width="195" valign="top" bgcolor="#808080" height="21"><font color="#FFFFFF"><b>&nbsp;</b></font></td>
<td width="274" valign="top" bgcolor="#808080" height="21">&nbsp;</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="21">L</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="21">Whether it&#8217;s a leap year</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="21">1 if it is a leap year, 0 otherwise.</td>
<tr>
<td width="81" valign="top" height="116">o</td>
<td width="195" valign="top" height="116">ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. (added in PHP 5.1.0)</td>
<td width="274" valign="top" height="116">Examples: 1999 or 2003</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">Y</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="40">A full numeric representation of a year, 4 digits</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="40">Examples: 1999 or 2003</td>
<tr>
<td width="81" valign="top" height="40">y</td>
<td width="195" valign="top" height="40">A two digit representation of a year</td>
<td width="274" valign="top" height="40">Examples: 99 or 03</td>
<tr>
<td width="550" valign="top" bgcolor="#808080" colspan="3" height="21"><b><font color="#FFFFFF">Time</font></b></td>
<tr>
<td width="81" valign="top" height="40">a</td>
<td width="195" valign="top" height="40">Lowercase Ante meridiem and Post meridiem</td>
<td width="274" valign="top" height="40">am or pm</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">A</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" bordercolor="#E4E4E4" height="40">Uppercase Ante meridiem and Post meridiem</td>
<td width="274" valign="top" bordercolor="#E4E4E4" bgcolor="#E4E4E4" height="40">AM or PM</td>
<tr>
<td width="81" valign="top" height="21">B</td>
<td width="195" valign="top" height="21">Swatch Internet time</td>
<td width="274" valign="top" height="21">000 through 999</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">g</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="40">12-hour format of an hour without leading zeros</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="40">1 through 12</td>
<tr>
<td width="81" valign="top" height="40">G</td>
<td width="195" valign="top" height="40">24-hour format of an hour without leading zeros</td>
<td width="274" valign="top" height="40">0 through 23</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">h</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="40">12-hour format of an hour with leading zeros</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="40">01 through 12</td>
<tr>
<td width="81" valign="top" height="40">H</td>
<td width="195" valign="top" height="40">24-hour format of an hour with leading zeros</td>
<td width="274" valign="top" height="40">00 through 23</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="21">i</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="21">Minutes with leading zeros</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="21">00 to 59</td>
<tr>
<td width="81" valign="top" height="21">s</td>
<td width="195" valign="top" height="21">Seconds, with leading zeros</td>
<td width="274" valign="top" height="21">00 through 59</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">u</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="40">Microseconds (added in PHP 5.2.2)</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="40">Example: 654321</td>
<tr>
<td width="81" valign="top" bgcolor="#808080" height="21"><b><font color="#FFFFFF">Time zone</font></b></td>
<td width="195"  bgcolor="#808080"  valign="top" height="21">&nbsp;</td>
<td width="274" valign="top" bgcolor="#808080" height="21">&nbsp;</td>
<tr>
<td width="81" valign="top" height="40">e</td>
<td width="195" valign="top" height="40">Timezone identifier (added in PHP 5.1.0)</td>
<td width="274" valign="top" height="40">Examples: UTC, GMT, Atlantic/Azores</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">I (capital i)</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="40">Whether or not the date is in daylight saving time</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="40">1 if Daylight Saving Time, 0 otherwise.</td>
<tr>
<td width="81" valign="top" height="40">O</td>
<td width="195" valign="top" height="40">Difference to Greenwich time (GMT) in hours</td>
<td width="274" valign="top" height="40">Example: +0200</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="78">P</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="78">Difference to Greenwich time (GMT) with colon between hours and minutes (added in PHP 5.1.3)</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="78">Example: +02:00</td>
<tr>
<td width="81" valign="top" height="21">T</td>
<td width="195" valign="top" height="21">Timezone abbreviation</td>
<td width="274" valign="top" height="21">Examples: EST, MDT &#8230;</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="97">Z</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="97">Timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive.</td>
<td width="274"  bgcolor="#E4E4E4"  valign="top" height="97">-43200 through 50400</td>
<tr>
<td width="550" valign="top" colspan="3" bgcolor="#808080" height="21"><b><font color="#FFFFFF">Full Date/Time</font></b></td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="40">c</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="40">ISO 8601 date (added in PHP 5)</td>
<td width="274"  bgcolor="#E4E4E4"  valign="top" height="40">2004-02-12T15:19:21+00:00</td>
<tr>
<td width="81" valign="top" height="21">r</td>
<td width="195" valign="top" height="21">» RFC 2822 formatted date</td>
<td width="274" valign="top" height="21">Example: Thu, 21 Dec 2000 16:01:07 +0200</td>
<tr>
<td width="81" valign="top" bgcolor="#E4E4E4" height="59">U</td>
<td width="195"  bgcolor="#E4E4E4"  valign="top" height="59">Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)</td>
<td width="274" valign="top" bgcolor="#E4E4E4" height="59">See also time()</td>
</table>
</div>
<ul  >
<p>
<h2>Special Purpose Date time formatting </h2>
<p>
<strong>DateTime::ATOM</strong><br />
DATE_ATOM    Atom (example: 2005-08-15T15:52:01+00:00)<br />
<strong>DateTime::COOKIE</strong><br />
DATE_COOKIE    HTTP Cookies (example: Monday, 15-Aug-05 15:52:01 UTC)<br />
<strong>DateTime::ISO8601</strong><br />
DATE_ISO8601    ISO-8601 (example: 2005-08-15T15:52:01+0000)<br />
<strong>DateTime::RFC822</strong><br />
DATE_RFC822    RFC 822 (example: Mon, 15 Aug 05 15:52:01 +0000)<br />
<strong>DateTime::RFC850</strong><br />
DATE_RFC850    RFC 850 (example: Monday, 15-Aug-05 15:52:01 UTC)<br />
<strong>DateTime::RFC1036</strong><br />
DATE_RFC1036    RFC 1036 (example: Mon, 15 Aug 05 15:52:01 +0000)<br />
<strong>DateTime::RFC1123</strong><br />
DATE_RFC1123    RFC 1123 (example: Mon, 15 Aug 2005 15:52:01 +0000)<br />
<strong>DateTime::RFC2822</strong><br />
DATE_RFC2822    RFC 2822 (Mon, 15 Aug 2005 15:52:01 +0000)<br />
<strong>DateTime::RFC3339</strong><br />
DATE_RFC3339    Same as DATE_ATOM (since PHP 5.1.3)<br />
<strong>DateTime::RSS</strong><br />
DATE_RSS    RSS (Mon, 15 Aug 2005 15:52:01 +0000)<br />
<strong>DateTime::W3C</strong><br />
DATE_W3C    World Wide Web Consortium (example: 2005-08-15T15:52:01+00:00)</p>
<p><h2>Date Time Operations &#038;  Preformating in PHP </h2>
<li><a href="http://www.php.net/manual/en/datetime.add.php">DateTime::add</a><br />
    — Adds an amount of days, months, years, hours, minutes and seconds to a<br />
    DateTime object</li>
<li><a href="http://www.php.net/manual/en/datetime.construct.php">DateTime::__construct</a><br />
    — Returns new DateTime object</li>
<li><a href="http://www.php.net/manual/en/datetime.createfromformat.php">DateTime::createFromFormat</a><br />
    — Returns new DateTime object formatted according to the specified format</li>
<li><a href="http://www.php.net/manual/en/datetime.diff.php">DateTime::diff</a><br />
    — Returns the difference between two DateTime objects</li>
<li><a href="http://www.php.net/manual/en/datetime.format.php">DateTime::format</a><br />
    — Returns date formatted according to given format</li>
<li><a href="http://www.php.net/manual/en/datetime.getlasterrors.php">DateTime::getLastErrors</a><br />
    — Returns the warnings and errors</li>
<li><a href="http://www.php.net/manual/en/datetime.getoffset.php">DateTime::getOffset</a><br />
    — Returns the timezone offset</li>
<li><a href="http://www.php.net/manual/en/datetime.gettimestamp.php">DateTime::getTimestamp</a><br />
    — Gets the Unix timestamp</li>
<li><a href="http://www.php.net/manual/en/datetime.gettimezone.php">DateTime::getTimezone</a><br />
    — Return time zone relative to given DateTime</li>
<li><a href="http://www.php.net/manual/en/datetime.modify.php">DateTime::modify</a><br />
    — Alters the timestamp</li>
<li><a href="http://www.php.net/manual/en/datetime.set-state.php">DateTime::__set_state</a><br />
    — The __set_state handler</li>
<li><a href="http://www.php.net/manual/en/datetime.setdate.php">DateTime::setDate</a><br />
    — Sets the date</li>
<li><a href="http://www.php.net/manual/en/datetime.setisodate.php">DateTime::setISODate</a><br />
    — Sets the ISO date</li>
<li><a href="http://www.php.net/manual/en/datetime.settime.php">DateTime::setTime</a><br />
    — Sets the time</li>
<li><a href="http://www.php.net/manual/en/datetime.settimestamp.php">DateTime::setTimestamp</a><br />
    — Sets the date and time based on an Unix timestamp</li>
<li><a href="http://www.php.net/manual/en/datetime.settimezone.php">DateTime::setTimezone</a><br />
    — Sets the time zone for the DateTime object</li>
<li><a href="http://www.php.net/manual/en/datetime.sub.php">DateTime::sub</a><br />
    — Subtracts an amount of days, months, years, hours, minutes and seconds<br />
    from a DateTime object</li>
<li><a href="http://www.php.net/manual/en/datetime.wakeup.php">DateTime::__wakeup</a><br />
    — The __wakeup handler</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://adminschoice.com/php-date-format/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NISplus Installation &amp; Administration</title>
		<link>http://adminschoice.com/nisplus-installation-administration</link>
		<comments>http://adminschoice.com/nisplus-installation-administration#comments</comments>
		<pubDate>Tue, 29 Dec 2009 22:08:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[NIS]]></category>

		<guid isPermaLink="false">http://adminschoice.com/?p=377</guid>
		<description><![CDATA[
NISplus&#160; is network which allows you to store client information at a
          central place where all the clients have access. This enables system
          administrators to manage a group of servers from a central place.
    [...]]]></description>
			<content:encoded><![CDATA[
<p><b>NISplus</b>&nbsp; is network which allows you to store client information at a<br />
          central place where all the clients have access. This enables system<br />
          administrators to manage a group of servers from a central place.<br />
          This article discusses the nisplus objects , installation of servers ,clients and administration commands.</p>
<p align="left"><b>1.0&nbsp; <a href="#Introduction%20to%20NIS+%C2%A0">Introduction to NIS+</a></b>         </p>
<p align="left"><b>1.1&nbsp; <a href="#Objects%20in%20NIS%20+">Objects in NIS+</a></b></p>
<p align="left"><b>1.2&nbsp; <a href="#Standard%20Tables%20in%20NIS+">Standard tables in NIS+</a></b></p>
<p align="left"><b>1.3&nbsp; <a href="#Groups%20in%20NIS+">Groups  in NIS+</a></b></p>
<p align="left"><b>2.0&nbsp; <a href="#Preparing%20for%20Install">Preparing for Install</a></b></p>
<p align="left"><b>2.1&nbsp; <a href="#Installing%20Server">Installing Server</a></b></p>
<p align="left"><b>3.0&nbsp; <a href="#Installing%20Client">Installing Client</a></b></p>
<p align="left"><b>4.0&nbsp; <a href="#Administration%20Commands">Administration commands&nbsp;</a></b><br />
___________________________________<br />
            &nbsp;<br />
            <b>1.0&nbsp;<a name="Introduction to NIS+&nbsp;">Introduction to<br />
              NIS+&nbsp;</a></b></p>
<ul style="margin-top: 0in;" type="disc">
<li class="MsoNormal">NIS +&nbsp; is network information services&nbsp;<br />
              which allows you to store client information at a central place<br />
              where all the clients have access. &nbsp;&nbsp; The information<br />
              can be user passwords , home directories, network services .<span style="position: relative;" class="preLoadWrap" id="preLoadWrap5"></p>
<div style="position: absolute; z-index: 4000; top: -32px; left: -18px; display: none;" id="preLoadLayer5">
                <img style="border: 0px none ;" src="http://kona.kontera.com/javascript/lib/imgs/grey_loader.gif" width="22" height="22">
              </div>
<p>              </span>etc .</li>
<li class="MsoNormal">The information is stored in NIS+ tables .<br />
              Some of the standard tables (16 in number) comes with predefined<br />
              structure when NIS+ is installed . The other tables can be created<br />
              as per requirement using NIS+ commands.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li class="MsoNormal">NIS+ uses&nbsp; hierarchical structure and can<br />
              have multiple domains servers&nbsp; .</li>
<li class="MsoNormal">NIS+ uses the client server model . The<br />
              primary server is called master server and the <font style="font-weight: 400; position: static"><span class="kLink" style="font-weight: 400; position: static">backup<br />
              server</span></font> is called the replica server . Both server<br />
              runs NIS+ and have copies of tables . The changes in master server&nbsp;<br />
              are propagated to replica servers in increments.</li>
<li class="MsoNormal">For security it uses both authentication and<br />
              authorization for securing the access to system and resources.<br />
              Authentication verifies validity of a user ; Authorization<br />
              verifies if the user is allowed to&nbsp; have access to the<br />
              resources. Access to any NIS+ table can be controlled through the<br />
              table permissions.</li>
<li class="MsoNormal">Clients&nbsp; have a configuration file /etc/nsswitch.com<br />
              ; entries in this file determines where the clients should look<br />
              for the information , in local files or NIS+ maps at the server.&nbsp;</li>
</ul>
<dl>
<p>  <b>1.1 <a name="Objects in NIS +">Objects in NIS +</a></b><br />
  There&nbsp; are three objects in NIS+&nbsp;<br />
  1. Parent domain -&nbsp; represented by&nbsp; <font style="font-weight: 400; position: static"><span class="kLink" style="font-weight: 400; position: static">domain<br />
    name</span></font> e.g.&nbsp; planet.com.: (Parent &nbsp; domain )</p>
<p>  2. org_dir&nbsp; &#8211; which contains all the NIS+&nbsp; tables .<br />
  3. groups_dir &#8211; contains the groups information , by default only admin<br />
    group is there.&nbsp;<br />
  &nbsp;<br />
  <b>1.2 <a name="Standard Tables in NIS+">Standard Tables in NIS+</p>
<p>    </a></b><br />
  They contain same type of information&nbsp; as standard files of the same<br />
    name .The passwd table however contains the encrypted password information<br />
    also .<br />
  passwd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    auto_master&nbsp;&nbsp;&nbsp;&nbsp; auto_home</p>
<p>  Bootparams&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cred&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ethers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    hosts</p>
<p>  mail_aliases&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sendmailvars&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    netmasks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; netgroup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>  networks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protocols&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    rpc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    services</p>
<p>  timezone&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; client_info</p>
<p>  <b>1.3 <a name="Groups in NIS+">Groups in NIS+</a></b><br />
  By default only admin group is created at the time of installation of NIS+<br />
    .<br />
  &nbsp;<br />
  <b>2.0 <a name="Preparing for Install">Preparing for Install</a></b><br />
  First step is to prepare the data files for NIS+ maps .This can be done by<br />
    coping the files which needs to be put in the nis+ tables for centralized<br />
    administration . The files are located in /etc and mostly have the same name<br />
    as NIS+&nbsp; tables</p>
<p>If you want only passwords , groups , hosts , home directories to be<br />
administered then you need to copy the these files in some other directory &#8211; say<br />
nisfiles. You can make additional changes here .</p>
<dl>
  <b>#cp /etc/passwd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /export/home/nisfiles</b><br />
  <b>#cp /etc/group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /export/home/nisfiles</b><br />
  <b>#cp /etc/hosts &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /export/home/nisfiles</b>
</dl>
<p>auto_home can&nbsp; be created by editing a copy of passwd file and keeping<br />
only the login name and home directory .</p>
<p>A typical auto_home will consists of following entries</p>
<dl>
  <b>#vi auto_home</b><br />
  +auto_home<br />
  peter&nbsp;&nbsp; 10.20.30.40:/home/&amp;<br />
  john&nbsp;&nbsp;&nbsp; 10.20.30.40:/home/&amp;
</dl>
<p>First column is user names&nbsp; followed by&nbsp; name of the machine<br />
providing home directories &amp; home&nbsp; directory path.</p>
<dl>
  <b>2.1 <a name="Installing Server">Installing Server</a></b><br />
  a) Define a default&nbsp; domain&nbsp; if not defined already in /etc/defaultdomain.<br />
  &nbsp;<br />
  &nbsp;&nbsp;&nbsp; <b>#domainname</b><br />
  &nbsp;&nbsp;&nbsp; planet.com<br />
  &nbsp;&nbsp;&nbsp; <b>#domainname &gt; /etc/defaultdomain</b><br />
  &nbsp;<br />
  b) As root ; change directory to the /usr/lib/nis or add PATH to this<br />
    directory.<br />
  &nbsp;&nbsp;&nbsp; Run server initialization program.<br />
  &nbsp;<br />
  &nbsp;&nbsp;&nbsp; <b>#nisserver -r</p>
<p>    </b>To setup server in NIS compatibility mode</p>
<p>    <b>#nisserver -r -Y<br />
    </b><br />
  <br />
    The above commands will setup the NIS+ server software.
</dl>
<p>Reboot the server</p>
<dl>
  c) Login as root ; change directory to the one containing the files<br />
    auto_home , passwd&nbsp; and group.<br />
  &nbsp;&nbsp;&nbsp; Run the command to populate the empty nis+ tables.<br />
  &nbsp;<br />
  &nbsp;&nbsp;&nbsp; <b>#cd /export/home/nisfiles</b><br />
  <b>&nbsp;&nbsp;&nbsp; #nispopulate –v –F</b><br />
  &nbsp;&nbsp;&nbsp; This will try to populate all the standard tables from<br />
    the files in local directory .&nbsp; you can also&nbsp;<br />
  &nbsp;&nbsp;&nbsp; specify a particular file name in&nbsp; for populating<br />
    a&nbsp; single&nbsp;&nbsp;&nbsp;&nbsp;table e.g.<br />
  &nbsp;<br />
  &nbsp;&nbsp;&nbsp;<b> #nispopulate –v –F&nbsp; auto_home&nbsp;</b><br />
  &nbsp;&nbsp;&nbsp; auto_home is the local file containg the entries in<br />
    proper format.<br />
  &nbsp;<br />
  <b>3.0 <a name="Installing Client">Installing Client</a></b><br />
  a.) Login as root in client<br />
  &nbsp;&nbsp; Define a default domain&nbsp; name – planet&nbsp; here.<br />
  b.) Run the client initialsation programme.<br />
  &nbsp;&nbsp; <b>#nisclient –i&nbsp; -h jupiter -d panet.com</b><br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h&nbsp;&nbsp;&nbsp;&nbsp; is<br />
    for nis+ server host name .<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d&nbsp;&nbsp;&nbsp;&nbsp; is<br />
    for nis+ domain name .<br />
  &nbsp;<br />
  &nbsp;&nbsp;&nbsp;&nbsp; reboot the&nbsp; client machine.<br />
  c.) Login again and open /etc/nsswitch.conf<br />
  &nbsp;&nbsp;&nbsp; check to see that only entries coreesponding to the<br />
    populated tables are&nbsp;<br />
  &nbsp;&nbsp;&nbsp; pointing to nisplus first&nbsp; and then files. Rest of<br />
    them should be&nbsp; files and nisplus.<br />
  &nbsp;</p>
<p style="text-align: justify">
<b>4.0 <a name="Administration Commands">Administration Commands</a></b>
<p style="text-align: justify">Following are some of the useful command for administering nis+</p>
<p style="text-align: justify;">&nbsp;</p>
<p>  <u><b>Listing&nbsp; table &amp; objects&nbsp; in NIS+</b></u>
</dl>
<ul>
<li><b>#nisls</b>&nbsp;&nbsp; ;Gives the total objects in NIS+
</li>
<li><b>#nisls org_dir</b>&nbsp; ;Lists the&nbsp; tables listed in the<br />
    directory. </p>
</li>
</ul>
<p><u><b>Listing a contents of tables</b></u></p>
<ul>
<li><b>#niscat passwd.org_dir</b></li>
</ul>
<dl>
  <u><b>Listing table structure</b></u>
</dl>
<ul>
<li><b>#niscat -o passwd.org_dir</b>&nbsp;&nbsp;&nbsp; ;lists structure of<br />
    password table.</li>
</ul>
<dl>
<p style="margin-left: 0in"><u><b>Adding A user</b></u>
</dl>
<ul>
<li><b>#nistbladm -a name=john&nbsp; uid=123 gid=111&nbsp; home=/home/john<br />
    shell=/bin/sh&nbsp;&nbsp; passwd.org_dir</b></li>
</ul>
<dl>
  <u><b>Changing the user information in passwd table (Super user only</b></u>
</dl>
<p>Fill in the corresponding values&nbsp; in &lt;&gt;</p>
<ul>
<li>#nistbladm –a&nbsp; name=&lt;&gt; passwd=&lt;&gt; uid=&lt;&gt; gid=&lt;&gt;<br />
    home=&lt;&gt; shelll=&lt;&gt; passwd.org_d</li>
</ul>
<dl>
  example&nbsp;
</dl>
<ul>
<li><b>#nistbladm -a name=john uid=123 gid=234 home=/home/john&nbsp;<br />
    shell=/bin/sh&nbsp; passwd.org_di</b></li>
</ul>
<dl>
  <u><b>to change only shell</b></u></p>
</dl>
<ul>
<li><b>#nistbladm -m shell=/usr/local/bin/bash&nbsp; [name=john],passwd.org_dir
<p>    </b></li>
</ul>
<dl>
  <u><b>Changing user passwd</b></u><br />
  &nbsp;<br />
  &nbsp;&nbsp;As root
</dl>
<ul>
<li><b># nispasswd&nbsp; &lt;user_name&gt; </b>;user has to update his key<br />
    through chkey -p</li>
</ul>
<dl>
  &nbsp;&nbsp;As user
</dl>
<ul>
<li><b>$ nispasswd&nbsp;</b>&nbsp; ;update encrypted key
</li>
<li><b>$chkey -p&nbsp;</b>&nbsp; ;(user NIS+ passwd and login passwd are the<br />
    same.)</p>
</li>
</ul>
<dl>
  <u><b>Adding user credentials</b></u>
</dl>
<ul>
<li><b>#nisaddcred -p 123 -P john local</b></li>
<li><b># nisaddcred -p unix.123@planet.com&nbsp;&nbsp; -P john.planet.com. des</b></li>
</ul>
<p>123 is userid and john is the user name.</p>
<p><u><b>Adding / removing a user dir entry in&nbsp; auto_home table :</b></u></p>
<ul>
<li><b>#nistbladm -a key=john value=10.20.30.40:/home/john&nbsp;<br />
    auto_home.org_dir</b></li>
<li><b>#nistbladm -r key=john auto_home.org_dir</b>&nbsp; ;If&nbsp; key is not<br />
    unique then more fields needs to be defined .</li>
</ul>
<p><u><b>Removing a user</b></u></p>
<ul>
<li>
<p align="left"><b>#nistbladm -r name=john passwd.org_dir</b></p>
</li>
</ul>
<p style="margin-left: 0in;"><u><b>Modifying the tables&nbsp; for multiple<br />
entries.</b></u></p>
<ul>
<li>
<p align="left"><b>#nisaddent -d passwd &gt; /tmp/passwd&nbsp; </b>;Dump the<br />
    table to &nbsp;&nbsp; a file </p>
</li>
<li>
<p align="left"><b>#vi /tmp/passwd</b> ;Edit the dumped file</p>
</li>
<li>
<p align="left"><b>#&nbsp;nisaddent -r -f /tmp/passwd passwd </b>;Put back<br />
    the dumped file.</p>
</li>
</ul>
<p>nisaddent command&nbsp; is available only for&nbsp; some of the&nbsp;<br />
standard tables, for others either nispopulate or&nbsp; nistbladm has to&nbsp;<br />
be used .</p>
]]></content:encoded>
			<wfw:commentRss>http://adminschoice.com/nisplus-installation-administration/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sun Certification FAQs</title>
		<link>http://adminschoice.com/solaris-certification-faqs</link>
		<comments>http://adminschoice.com/solaris-certification-faqs#comments</comments>
		<pubDate>Tue, 29 Dec 2009 22:01:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Exam]]></category>

		<guid isPermaLink="false">http://adminschoice.com/?p=375</guid>
		<description><![CDATA[Frequently asked questions about Solaris Certification are discussed]]></description>
			<content:encoded><![CDATA[<p><iframe width=550px height=4000px src=http://www.sun.com/training/certification/faq/index.html ></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://adminschoice.com/solaris-certification-faqs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strategy for Multiple Choice Certification Exams</title>
		<link>http://adminschoice.com/strategy-for-multiple-choice-exams</link>
		<comments>http://adminschoice.com/strategy-for-multiple-choice-exams#comments</comments>
		<pubDate>Tue, 29 Dec 2009 21:58:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Exam]]></category>

		<guid isPermaLink="false">http://adminschoice.com/?p=372</guid>
		<description><![CDATA[Strategies for Multiple Choice Certification Exams are discussed ]]></description>
			<content:encoded><![CDATA[<table style="border-collapse: collapse;" id="AutoNumber1" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="81%"><b><font size="4">Basics</font></b></p>
<ul>
<li>Take&nbsp; the list of exam objective and study carefully its<br />
            scope</li>
<li>Organize your study keeping these objectives in mind.</li>
</ul>
<p>        You may be knowing theoretical or practical much and is confident but<br />
        still you need to check up the objectives carefully so that you do not<br />
        miss anything in your study. This will narrow down your focus area to<br />
        individual topic or subtopic.</p>
<p><b><font size="4">Study material</font></b></p>
<p>        Once you know the topics look around&nbsp; you for the study material.<br />
        Generally the official web sites will have most of&nbsp; the<br />
        documentations&nbsp; and some commercially available books specifically<br />
        written for the purpose of exams are also available . But always try to<br />
        refer to two – three different sources&nbsp; as this gives a more<br />
        clear view of a topic and makes understanding clear.&nbsp;</p>
<p><b><font size="4">How to study</font></b></p>
<p>        We have been taking the exams since the school days and people have<br />
        developed&nbsp; their own style of study .some like to study in the day<br />
        time others in the night still others like a background music while<br />
        studying . Whatever may be your style stick to it&nbsp; but keep in mind<br />
        that in multiple choice questions you have to be exact and should be<br />
        able to differentiate between very similar answers.</p>
<ul>
<li>
<p>You must have a peaceful&nbsp; place of study without any<br />
            distraction so that you can read between the lines . A distracted<br />
            study results in surfing the text&nbsp; &#8211; missing the key points.</p>
</li>
<li>
<p>Understand and visualize the process as whole – this will help<br />
            in addressing to practical problems in real environment&nbsp; as<br />
            well as some unsuspecting questions .</p>
</li>
<li>
<p>Note down important point&nbsp; -&nbsp; note down important point&nbsp;<br />
            while reading&nbsp; look for something which is not obvious and<br />
            different from the rest .</p>
</li>
<li>
<p>Try to recollect these point later -&nbsp; This will give an idea<br />
            of your preparation&nbsp; and helpful in revising later on .</p>
</li>
</ul>
<dl>
<dd><b><font size="4">In the exam</font></b></dd>
<dd>In multiple choice type questions&nbsp; there is one advantage&nbsp;<br />
            &#8211; answers are already there and one has to simply&nbsp; choose the<br />
            correct one&nbsp; but the problem&nbsp; is&nbsp; each answer looks<br />
            like correct one .So&nbsp; until your concepts are very clear it is<br />
            very likely that wrong answer is selected .But no one is&nbsp;<br />
            perfect&nbsp; so you will have to&nbsp; think a bit if you don’t<br />
            know the answer to a question . Since the answers are already there<br />
            you can start eliminating the incorrect answers by using your<br />
            knowledge and some logical thinking .&nbsp;</dd>
</dl>
<p>One common mistake is to select the first obvious looking answers<br />
        without checking the other options&nbsp; so always examine all the<br />
        options , think&nbsp; &amp; choose the right answer .&nbsp;</p>
<p>It is always better to pass the questions ,of which your are not<br />
        sure, &amp; come back&nbsp; there are few advantages for this</p>
<ul>
<li>You avoid the tension and frustration of a suspected answer&nbsp;<br />
            which could affect the rest of answers.</li>
<li>You are able to use the time thus saved to answer the questions<br />
            you&nbsp;&nbsp; know</li>
<li>The solution may come to your mind&nbsp; till the time you come<br />
            back again</li>
<li>The later part of the&nbsp; questions may contains some clues to<br />
            the answers .</li>
</ul>
<dl>
<dd>
            <b><font size="4">Time management&nbsp; in the exam</font></b></dd>
<dd>Generally the time is sufficient to answer all the questions but<br />
            if too much time is wasted on a few questions then it becomes<br />
            difficult&nbsp; . The best strategy would be to pass the difficult<br />
            question after carefully reading&nbsp; and attempt to them later.</dd>
<dd>&nbsp;</dd>
<dd><b><font size="4">Making it second time</font></b></dd>
<dd>If you can’t make it in first attempt&nbsp; &#8211; Prepare for the<br />
            second attempt , stay calm and focused . Don’t feel over confident<br />
            that &nbsp;it will be a piece of cake next time .If you can<br />
            recollect and write down the questions asked in the exam it will<br />
            help you in providing a focused area of study .</dd>
</dl>
<p>&nbsp;</p>
</td>
<td align="right" valign="top" width="19%">
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://adminschoice.com/strategy-for-multiple-choice-exams/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sample Question &#8211; Solaris Certification</title>
		<link>http://adminschoice.com/sample-question-solaris-certification</link>
		<comments>http://adminschoice.com/sample-question-solaris-certification#comments</comments>
		<pubDate>Tue, 29 Dec 2009 21:52:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Exam]]></category>

		<guid isPermaLink="false">http://adminschoice.com/?p=369</guid>
		<description><![CDATA[Sample Question &#8211; Solaris Certification
Following are  some sample questions . These are some of the representative questions and is meant to demonstrate the type of question you might expect in Solaris Certification examination and plan your study accordingly. No answers are given out of the belief that anyone preparing for the exam should be [...]]]></description>
			<content:encoded><![CDATA[<p><B>Sample Question &#8211; Solaris Certification<br />
</B>Following are  some sample questions . These are some of the representative questions and is meant to demonstrate the type of question you might expect in Solaris Certification examination and plan your study accordingly. No answers are given out of the belief that anyone preparing for the exam should be able to work it out .</p>
<p>Choose all the correct answers. </p>
<p><B>1) In Solaris how many disk slices a disk can have ?<br />
</B><br />
a) 8     b)  7    c) 6     d)1</p>
<p><B>2)Which file is used to set the default mask in Solaris ?<br />
</B><br />
 a)/etc/profile     b) .profile      c) /etc/system   d) /etc/inittab<br />
<B><br />
3)What are the advantage for making disk partitions ?<br />
</B><br />
a) Easy to maintain    b) Easy for backing up<br />
c) Limits problems to one partition only   d) Space can be monitored easily.</p>
<p><B>4 )What does a + sign in /etc/hosts.equiv indicates ?<br />
</B><br />
 a)  All hosts are allowed   b) Only known hosts are allowed  c) All users are allowed  d) Unknown hosts are also allowed .</p>
<p><B>5 )Which command is used to mount local file system ?<br />
</B><br />
 a) mount -l     b) mountall     c) mount     d) mount  -r</p>
<p><B>6) Which command line option gives a run level and output headings ?<br />
</B><br />
 <B>a) who -b        b) who -r         c)  who -rh   d) who -rH<br />
</B><br />
<B>7) which command is used to change the auto-boot feature in sun ultra ?<br />
</B><br />
 a) eeprom &#8220;auto-boot?&#8221;=true  b) eeprom auto-boot?=true  c) eeprom autoboot? true  d) eeprom auto-boot = true ..</p>
<p><B>8 )  If patch id is 123456-10 then its revision number is -<br />
</B><br />
 a)123               b)456            c)10            d)6-10</p>
<p><B>9)Which commands can be used to make a device alias<br />
</B><br />
 a) devalias ay OK prompt  b) dvalias at root prompt<br />
 c) nvram at ok prompt         d) drvconfig at root prompt.</p>
<p><B>10) Where in Solaris encrypted passwords are stored ?<br />
</B><br />
a) /etc/passwd  b) /etc/shadow c)/etc/default/passswd  d)/etc/initttab</p>
<p><B>11) What is required in a diskless workstation for Solaris workstation<br />
</B><br />
a) cpu, monitor, keyboard, hard disk    b)    cpu, monitor, keyboard, cdrom drive<br />
c)   cpu, monitor, keyboard, Ethernet card    d)  cpu and Ethernet card only.</p>
<p><B>12)Which of the following points to virtual file system ?<br />
</B><br />
 a) /dev/dsk/c0t0d0s3           b) /dev/rdsk/c0t0d0s3<br />
 c) /dev/md/dsk/c0t0d0s3   d) /dev/vx/rdsk/data/vol1</p>
<p><B>13) Which Solaris command is used to correct  filesystem problems?.<br />
</B><br />
 a) newfs      b) fssck          c) mkfs       d) format</p>
<p><B>14) Which is the configuration file for the tip command<br />
</B><br />
 a)/etc/tip.conf    b) /etc/remote  c) /etc/inittab.d   d) .profile</p>
<p><B>15) When automounter daemon needs to be restarted ?.<br />
</B><br />
 a) When direct map is changes    b) When indirect map is changes<br />
 c) No need to restart                    d) When a new user is created</p>
<p><B>16) What is the default configuration cluster in Solaris installation ?.<br />
</B><br />
 a) Developer    b) Core       c) End user     d) Entire Distriidution</p>
<p><B>17)  Which utility is used to administer the port monitor ?<br />
</B><br />
 a)sacadm      b) pmadm     c) ttyadm       d) admintool</p>
<p><B>18) What is the command to assign a ip address to qfe network interface ?<br />
</B><br />
 Write the command &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..</p>
<p><B>19) 10 30  *  *  4  /usr/bin/loginfo  entry in crontab will execute the program<br />
</B><br />
 a) Every Friday at 10.30      b) Every Thursday at 10.30<br />
 c) Every Saturday 10.30       d) Every Wednesday at 10.30</p>
<p><B>20) What do you need for a fresh Solaris Installation ?.<br />
</B><br />
 a) Host Name  b) IP Address  c) Net mask   d) Domain name</p>
<p><B>21) How can you see the prom version ?<br />
</B><br />
 a) show version       b) prom        c) banner       d) version</p>
<p><B>22) Which file enables you to disable root login on terminals ?.<br />
</B><br />
 a) /etc/profile           b) .profile<br />
 c) /etc/default/login     d) /etc/system</p>
<p><B>23 ) Which directory contain run level control scripts ?.<br />
</B><br />
 a) /etc/rc2.d      b) /etc/init.d        c) /etc/rc3.d       d) /usr/bin</p>
<p><B>24) Which command show the patch installed in the system ?<br />
</B><br />
 a) patchadd -p   b) showrev -p    c) showpatch  d) patchlist</p>
<p><B>25)  What are the advantage of having a virtual file system ?.<br />
</B><br />
 a) Large capacity volumes         b) Increased File system size<br />
 c) Performance enhancement   d)  backup becomes easy</p>
<p> <B>26) Which file is used to define default run level for init process at booting time ?.<br />
</B><br />
 a) /etc/ttyyab         b)  /etc//ttyadm<br />
 c) /etc/inittab        d) /etc/profile</p>
<p> <B>27) Which command shows kernel parameters and and driver module information ?.<br />
</B><br />
 a) sysconfig      b) prtconfig<br />
 c) dmesg          d) prtconf</p>
<p> <B>28) A multiuser operating system is one &#8211; in which<br />
</B><br />
 a) Many users can work simultaneously        b) Many Processes can work simultaneously<br />
 c)  A large number of users can be created   d) A number of user home directories can be created.</p>
<p> <B>29) What is true about software packages ?.<br />
</B><br />
 a) It is group of files &#038; directories  b) They are grouped to form clusters</p>
<p> c) It is standard way of delivering software in Solaris d) They can be installed using pkgadd  command.</p>
<p> <B>30)What type of names are used for administering disk drives in Solaris environment<br />
</B><br />
 a) Physical  b) Logical  c) Virtual  d) disk instance</p>
]]></content:encoded>
			<wfw:commentRss>http://adminschoice.com/sample-question-solaris-certification/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solstice DiskSuite &#8211; Admin&#8217;s Guide</title>
		<link>http://adminschoice.com/solstice-disksuite-guide</link>
		<comments>http://adminschoice.com/solstice-disksuite-guide#comments</comments>
		<pubDate>Tue, 29 Dec 2009 21:17:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Volumes]]></category>
		<category><![CDATA[Solstice DiskSuite]]></category>
		<category><![CDATA[sun volume manager]]></category>

		<guid isPermaLink="false">http://adminschoice.com/?p=354</guid>
		<description><![CDATA[Understanding and setting up Solstice DiskSuite 4.2.1 in Solaris]]></description>
			<content:encoded><![CDATA[<table border="0" >
<caption><b><u><font size="4">Table of Contents</font></u></b></caption>
<tr>
<td width="49%" align="left" valign="top" height="315">
<dl>
<dt>1.<a href="#Advantages of Disksuite">Advantages of Disksuite</a></dt>
<dt>2. <a href="#Disksuite terms">Disksuite terms</a></dt>
<dt>3. <a href="#Disksuite Packages :">Disksuite Packages</a> </dt>
<dt>4. <a href="#Installing DiskSuite 4.2.1 in Solaris 8">Installing<br />
      DiskSuite 4.2.1 in Solaris 8</a></dt>
<dt>5. <a href="#Installing DiskSuite 4.2.1 in Solaris 8">Creating State<br />
      Database </a></dt>
<dt>6. <a href="#Creating MetaDevices :">Creating MetaDevices</a> </dt>
<dt>6.1. <a href="#1.) Creating a concatenated Metadevice :">Concatenated<br />
      Metadevice</a></dt>
<dt>6.2. <a href="#2.) Creating a stripe of 32k interleave">Striped<br />
      Metadevice</a></dt>
<dt>6.3 <a href="#3.) Creating a Mirror :">Mirrored Metadevice</a> </dt>
<dt>6.3.1 <a href="#6.3.1 ) Creating a simple mirror from new partitions"> Simple mirror</a></dt>
<dt>6.3.2 <a href="#6.3.2.) Mirroring a Partitions with data which can be unmounted">Mirroring a unmountable Partition </a></dt>
<dt>6.3.3 <a href="#6.3.3 ) Mirroring a Partitions with data which can not be unmounted - root and /usr">  root mirroring &amp; /usr mirroring</a></dt>
<dt>6.3.4 <a href="#· root mirroring">&nbsp;</a><a href="#6.3.4  ) Making Mirrored disk bootable">Making alternate&nbsp; root disk bootable</a></dt>
<dt>6.3.5&nbsp;<a href="#2.) Creating alterbate name for Mirrored boot disk">Setting<br />
      alternate boot path for root mirror</a></dt>
<dt>6.4 <a href="#4.) Creating a RAID 5 volume :">RAID 5 </a></dt>
</dl>
</td>
<td width="51%" align="left" valign="top" height="315">
<dl>
<dt>6.5 <a href="#B.)Trans Metadevice for a File System That Cannot Be Unmounted"> TransMeta Device</a></dt>
<dt>6.5.1 <a href="#6.5.1) Trans Metadevice for a File System That Can Be Unmounted"> TransMeta device for unmountable partition</a></dt>
<dt>6.5.2 <a href="#B.) Trans Metadevice for a File System That Cannot Be Unmounted">TransMeta device for non unmountable partition.</a></dt>
<dt>6.5.3 <a href="#6.5.3 ) TransMeta device using Mirrors">TransMeta<br />
      device using Mirror</a></dt>
<dt>6.6 <a href="#6.) HotSpare Pool">Hotspare Pool</a></dt>
<dt>6.6.1 <a href="#6.6.1) Associating a Hot Spare Pool with Submirrors">Adding a Hotspare to Mirror</a></dt>
<dt>6.6.2 <a href="#6.6.2 ) Associating or changing a Hot Spare Pool with a RAID5 Metadevice">Adding a Hotspare to RAID5</a></dt>
<dt>6.6.3 <a href="#6.6.3 ) Mirroring a Partitions with data which can not be unmounted - root and /usr">Adding a disk to Hotspare Pool.</a></dt>
<dt>6.7 <a href="#7.)Disksets">disksets</a></dt>
<dt>6.7.1 <a href="#6.7.1 ) Creating Two Disksets">Creating two diskset </a></dt>
<dt>6.7.2 <a href="#6.7.2 ) Adding Drives to a Diskset">Adding disk to diskset </a></dt>
<dt>6.7.3 <a href="#6.7.3 ) Creating  a Mirror in a Diskset">Creating Mirror in Diskse</a>t</dt>
<dt>7.&nbsp; <a href="#Trouble Shooting">TroubleShooting </a></dt>
<dt>7.1) <u><a href="#1.) Recovering from  Stale State Database Replicas"> Recovering from&nbsp; Stale State Database replicas</a></u></dt>
<dt>7.2) <u><a href="#2.) Metadevice Errors :">Metadevice Errors</a></u></dt>
</dl>
</td>
</tr>
</table>
<blockquote>
<blockquote></blockquote>
</blockquote>
<p><b></p>
<p>1.<a name="Advantages of Disksuite"> <u>Advantages of Disksuite</u></a><br />
</b><br />
  Solstice disk suite provides three major functionalities :</p>
<p><b>1.</b> Over come the disk size limitation by providing for joining of<br />
    multiple disk slices to form a bigger&nbsp; volume.&nbsp;</p>
<p><b><br />
 2.</b> Fault Tolerance by allowing mirroring of data from one disk to another<br />
    and keeping parity&nbsp;<br />
    &nbsp;&nbsp;&nbsp; information in RAID5.&nbsp;</p>
<p><b><br />
    3.</b> Performance enhancement by allowing spreading the data space over<br />
    multiple disks .</p>
<p>  <b></p>
<p>2. <u><a name="Disksuite terms">Disksuite terms</a><br />
  </u><br />
</b></p>
<dl>
<dd><b>Metadevice :</b>A virtual device composed of several physical devices -<br />
    slices/disks&nbsp; . All the operations are carried out using metadevice<br />
    name and transparently implemented on the individual device.</dd>
<dd><b>RAID : </b>A group of disks used for creating a virtual volume is called array and<br />
depending on disk/slice arrangement these are called various types of RAID<br />
(Redundant Array of Independent Disk ).</dd>
</dl>
<blockquote>
<dl>
<dd>RAID 0 Concatenation/Striping</dd>
<dd>RAID 1 Mirroring</dd>
<dd>RAID 5 Striped array with rotating parity.</dd>
</dl>
</blockquote>
<p><b>Concatenation :</b>Concatenation is joining of two or more disk slices to add up the disk space<br />
. Concatenation is serial in nature i.e. sequential data operation are performed<br />
serially on first disk then second disk and so on . Due to serial nature new<br />
slices can be added up without having to take the backup of entire concatenated<br />
volume ,adding slice and restoring backup .</p>
<p><b>Striping </b>:Spreading of data over multiple disk drives mainly to enhance the performance<br />
by distributing data in alternating chunks &#8211; 16 k interleave across the stripes<br />
. Sequential data operations are performed in parallel on all the stripes by<br />
reading/writing&nbsp; 16k data blocks alternatively form the disk stripes.</p>
<p><b>Mirroring </b>: Mirroring provides data redundancy by simultaneously writing data on to two<br />
sub mirrors of a mirrored device . A submirror can be a stripe or concatenated<br />
volume and a mirror can have three mirrors . Main concern here is that a mirror<br />
needs as much as the volume to be mirrored.</p>
<p><b>RAID 5</b> : RAID 5 provides data redundancy and advantage of striping and uses less space<br />
than mirroring . A RAID 5 is made up of at least three disk which are striped<br />
with parity information written alternately on all the disks . In case of a<br />
single disk failure the data can be rebuild using the parity information from<br />
the remaining disks .<br />
<b></p>
<p>3. <u><a name="Disksuite Packages :">Disksuite Packages :</a><br />
</u><br />
</b></p>
<p>Solstice disk suite is a part of server edition of the Solaris OS and is not<br />
included with desktop edition . The software is in pkgadd format &amp; can be<br />
found in following locations in CD :</p>
<dl>
<dd>
<p style="margin-left: 33">Solaris 2.6 &#8211; “Solaris Server Intranet Extensions 1.0” CD.</dd>
<dd>
<p style="margin-left: 33">Solaris 7 &#8211; “Solaris Easy Access Server 3.0”</dd>
<dd>
<p style="margin-left: 33">Solaris 8 &#8211; “Solaris 8 Software 2 of 2”</dd>
</dl>
<p>Solaris 2.6 &amp; 2.7 Solstice Disk suite version is 4.2 .&nbsp; Following packages are part of it but only the &quot;SUNWmd&quot; is the<br />
minimum required package and a patch.</p>
<dl>
<dd>
<p style="margin-left: 33">SUNWmd &#8211; Solstice DiskSuite</dd>
<dd>
<p style="margin-left: 33">SUNWmdg &#8211; Solstice DiskSuite Tool</dd>
<dd>
<p style="margin-left: 33">SUNWmdn &#8211; Solstice DiskSuite Log Daemon</dd>
<dd>
<p style="margin-left: 33">Patch No. 106627-04 (obtain latest revision)</dd>
</dl>
<p>Solaris 8 DiskSuite version is 4.2.1 .Following are the minimum required packages ..</p>
<dl>
<dd>
<p style="margin-left: 33">SUNWmdr Solstice DiskSuite Drivers (root)</dd>
<dd>
<p style="margin-left: 33">SUNWmdu Solstice DiskSuite Commands</dd>
<dd>
<p style="margin-left: 33">SUNWmdx Solstice DiskSuite Drivers (64-bit)</dd>
</dl>
<p><b></p>
<p>4. <u><a name="Installing DiskSuite 4.2.1 in Solaris 8">Installing DiskSuite 4.2.1 in Solaris 8</a><br />
</u><br />
</b></p>
<p><b>#</b> <b>cd /cdrom/sol_8_401_sparc_2/Solaris_8/EA/products/DiskSuite_4.2.1/sparc/Packages</b></p>
<p><b><font COLOR="#000000"># pkgadd -d .<br />
</font><br />
</b></p>
<dl>
<dd>
<p style="margin-left: 30">The following packages are available:</dd>
<dd>
<p style="margin-left: 30">1 SUNWmdg Solstice DiskSuite Tool</dd>
<dd>
<p style="margin-left: 30">(sparc) 4.2.1,REV=1999.11.04.18.29</dd>
<dd>
<p style="margin-left: 30">2 SUNWmdja Solstice DiskSuite Japanese<br />
      localization</dd>
<dd>
<p style="margin-left: 30">(sparc) 4.2.1,REV=1999.12.09.15.37</dd>
<dd>
<p style="margin-left: 30">3 SUNWmdnr Solstice DiskSuite Log Daemon<br />
      Configuration Files</dd>
<dd>
<p style="margin-left: 30">(sparc) 4.2.1,REV=1999.11.04.18.29</dd>
<dd>
<p style="margin-left: 30">4 SUNWmdnu Solstice DiskSuite Log Daemon</dd>
<dd>
<p style="margin-left: 30">(sparc) 4.2.1,REV=1999.11.04.18.29</dd>
<dd>
<p style="margin-left: 30">5 SUNWmdr Solstice DiskSuite Drivers</dd>
<dd>
<p style="margin-left: 30">(sparc) 4.2.1,REV=1999.12.03.10.00</dd>
<dd>
<p style="margin-left: 30">6 SUNWmdu Solstice DiskSuite Commands</dd>
<dd>
<p style="margin-left: 30">(sparc) 4.2.1,REV=1999.11.04.18.29</dd>
<dd>
<p style="margin-left: 30">7 SUNWmdx Solstice DiskSuite Drivers(64-bit)</dd>
<dd>
<p style="margin-left: 30">(sparc) 4.2.1,REV=1999.11.04.18.29</dd>
<dd>
<p style="margin-left: 30"><font COLOR="#000000"><br />
  Select 1,3,4,5,6,7 packages .<br />
</font></dd>
</dl>
<p><font COLOR="#000000"></p>
<p>Enter ‘yes’ for the questions asked during installation and reboot the<br />
system after installation .<br />
</font></p>
<p>Put /usr/opt/SUNWmd/bin in root PATH as the DISKSUITE commands are located in<br />
this directory<br />
<b></p>
<p>5. <u><a name="Creating State Database :">Creating State Database :</a><br />
</u><br />
</b></p>
<p>State meta database , metadb , keeps information of the metadevices and is<br />
needed for Disksuite operation . Disksuite can not function without metadb so a<br />
copy of replica databases is placed on different disks to ensure that a copy is<br />
available in case of a complete disk failure .</p>
<p>Metadb needs a dedicated disk slice so create partitions of about 5 Meg. on<br />
the disks for metadb. If there is no space available for metadb then it can be<br />
taken from swap . Having metadb on two disks can create problems as DISKSUITE<br />
looks for database replica number &gt; 50% of total replicas and if one of the<br />
two disks crashes the replica falls at 50% . On next reboot system will go to<br />
single user mode and one has to recreate additional replicas to correct the<br />
metadb errors.</p>
<p>The following command creates three replicas of metadb on three disk slices.<br />
<b></p>
<p>#metadb -a -f -c 3 /dev/dsk/c0t1d0s6&nbsp;&nbsp;&nbsp;&nbsp;<br />
/dev/dsk/c0t2d0s6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /dev/dsk/c0t3d0s6</p>
<p>6. <a name="Creating MetaDevices :">Creating<u> MetaDevices :</u></a></p>
<p>
</b>Metadevices can be created in two ways</p>
<blockquote>
<blockquote>
<dl>
<dd>1. Directly from the command line</dd>
<dd>2. Editing the /etc/opt/SUNWmd/<u>&lt;md.tab.html&gt;</u><br />
    file as per example given in the md.tab and</dd>
<dd>&nbsp;&nbsp;&nbsp; initializing devices on command<br />
    line using metainit &lt;device name&gt; .</dd>
</dl>
</blockquote>
</blockquote>
<p><b></p>
<p>6.<a name="1.) Creating a concatenated Metadevice :">1 ) Creating a concatenated Metadevice :</a><br />
</b></p>
<p style="margin-left: 50"><b>#<u>metainit</u>&nbsp;&nbsp;&nbsp; d0&nbsp;&nbsp;&nbsp;<br />
3&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; /dev/dsk/c0t0d0s4 1 /dev/dsk/c0t0d0s4<br />
1 /dev/dsk/c0t0d0s4 </b></p>
<dl>
<dd>
<p style="margin-left: 50">d0 &#8211; metadevice name</dd>
<dd>
<p style="margin-left: 50">3 &#8211; Total Number of Slices</dd>
<dd>
<p style="margin-left: 50">1 &#8211; Number of Slices to be added followed by slice name.</dd>
</dl>
<p><b></p>
<p>6.2<a name="2.) Creating a stripe of 32k interleave"> ) Creating a stripe</a></b><a name="2.) Creating a stripe of 32k interleave"><br />
<b>of 32k interleave</b></a></p>
<p style="margin-left: 50"># <b><u>metainit</u> d10&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; c0t1d0s2&nbsp;&nbsp;&nbsp;&nbsp; c0t2d0s2&nbsp;&nbsp;&nbsp;&nbsp; -i&nbsp;&nbsp; 32k<br />
</b></p>
<dl>
<dd>
<p style="margin-left: 50">d0 &#8211; metadevice name</dd>
<dd>
<p style="margin-left: 50">1 &#8211; Total Number of Stripe</dd>
<dd>
<p style="margin-left: 50">2- Number of Slices to be added to stripe followed by slice name .</dd>
<dd>
<p style="margin-left: 50">-i chunks of data written alternatively on stripes.</dd>
</dl>
<p><b></p>
<p>6.<a name="3.) Creating a Mirror :">3 ) Creating a Mirror :</a></p>
<blockquote><p>
</b><font COLOR="#000000"></p>
<p>A <b>mirror</b> is a metadevice composed of one or more <b>submirrors</b>. A<br />
submirror is made of one or more striped or concatenated metadevices. Mirroring<br />
data provides you with maximum data availability by maintaining multiple copies<br />
of your data. The system must contain at least three state database replicas<br />
before you can create mirrors. Any file system including root (</font>/<font COLOR="#000000">),<br />
</font>swap<font COLOR="#000000">, and </font>/usr<font COLOR="#000000">,<br />
or any application such as a database, can use a mirror.</font><br />
<font COLOR="#000000">
</p></blockquote>
<p><b></p>
<p><a name="6.3.1 ) Creating a simple mirror from new partitions">6.3.1 ) Creating a simple mirror from new partitions</a></p>
<p style="margin-left: 33">1</b>.<u>Create two stripes for two submirors as d21 &amp; d22<br />
</u></font></p>
<dl>
<dd>
<p style="margin-left: 33">#<b> <u><br />
  metainit</u> d21 1 1 c0t0d0s2</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d21: Concat/Stripe is setup</dd>
<dd>
<p style="margin-left: 33">#<b> <u><br />
  metainit </u>t<br />
d22 1 1 c1t0d0s2</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d22: Concat/Stripe is setup</dd>
</dl>
<p><b></p>
<p style="margin-left: 33">2</b>. <u>Create a mirror device (d20) using one of the submirror (d21)<br />
</u></p>
<dl>
<dd>
<p style="margin-left: 33">#<b> <u><br />
  metainit</u> &nbsp; d20&nbsp;&nbsp; -m&nbsp;&nbsp; d21</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d20: Mirror is setup</dd>
</dl>
<p><b></p>
<p style="margin-left: 33">3</b>. <u>Attach the second submirror (D21) to the main mirror device (D20)<br />
</u></p>
<dl>
<dd>
<p style="margin-left: 33">#<b> metattach d20 d22</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d50: Submirror d52 is attached.</dd>
</dl>
<p><b></p>
<p style="margin-left: 33">4</b>. <u>Make file system on new metadevice</u><br />
<b></p>
<dl>
<dd>
<p style="margin-left: 33">#newfs /dev/md/rdsk/d20</dd>
<p></b></p>
<dd>
<p style="margin-left: 33">edit /etc/vfstab to mount the /dev/dsk/d20 on a mount point.</dd>
</dl>
<p><b></p>
<p><a name="6.3.2.) Mirroring a Partitions with data which can be unmounted"><br />
6.3.2.) Mirroring a Partitions with data which can be unmounted</a><br />
</b></p>
<dl>
<dd>
<p style="margin-left: 33"># <b><u>metainit</u> f<br />
d1 1 1 c1t0d0s0</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d1: Concat/Stripe is setup</dd>
<dd>
<p style="margin-left: 33"># <b><u>metainit</u> d2 1<br />
1 c2t0d0s0</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d2: Concat/Stripe is setup</dd>
<dd>
<p style="margin-left: 33"># <b><u>metainit</u> d0 -m<br />
d1</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d0: Mirror is setup</dd>
<dd>
<p style="margin-left: 33"># <b>umount /local</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">(Edit the /etc/vfstab file so that the file system references the mirror)</dd>
<dd>
<p style="margin-left: 33">#<b>mount /local</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">#<b>metattach d0 d2</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d0: Submirror d2 is attached</dd>
</dl>
<p>&nbsp;<br />
<b></p>
<p>
<a name="6.3.3 ) Mirroring a Partitions with data which can not be unmounted - root and /usr"><br />
6.3.3 ) Mirroring a Partitions with data which can not be unmounted &#8211; root and /usr</a><br />
</b></p>
<blockquote>
<blockquote>
<p><a name="· /usr mirroring">· </a> <b><a name="· /usr mirroring">/usr mirroring</a><br />
    </b>
  </p></blockquote>
</blockquote>
<dl>
<dd>
<p style="margin-left: 33"># <b>metainit -f d12 1 1 c0t3d0s6</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d12: Concat/Stripe is setup</dd>
<dd>
<p style="margin-left: 33"># <b>metainit d22 1 1 c1t0d0s6</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d22: Concat/Stripe is setup</dd>
<dd>
<p style="margin-left: 33"># <b>metainit d2 -m d12</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d2: Mirror is setup</dd>
<dd>
<p style="margin-left: 33">(Edit the /etc/vfstab file so that /usr references the mirror)</dd>
<dd>
<p style="margin-left: 33"># <b>reboot</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">&#8230;</dd>
<dd>
<p style="margin-left: 33">&#8230;</dd>
<dd>
<p style="margin-left: 33"># <b>metattach d2 d22</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d2: Submirror d22 is attached</dd>
</dl>
<blockquote>
<blockquote>
<p><a name="· root mirroring">· </a> <b><a name="· root mirroring">root mirroring</a><br />
    </b>
  </p></blockquote>
</blockquote>
<dl>
<dd>
<p style="margin-left: 33"># <b>metainit -f d11 1 1 c0t3d0s0</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d11: Concat/Stripe is setup</dd>
<dd>
<p style="margin-left: 33"># <b>metainit d12 1 1 c1t3d0s0</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d12: Concat/Stripe is setup</dd>
<dd>
<p style="margin-left: 33"># <b>metainit d10 -m d11</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d10: Mirror is setup</dd>
<dd>
<p style="margin-left: 33"># <b>metaroot d10</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33"># <b>lockfs -fa</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33"># <b>reboot</dd>
<p> </b></p>
<dd>
<p style="margin-left: 33">…</dd>
<dd>
<p style="margin-left: 33">…</dd>
<dd>
<p style="margin-left: 33"># <b>metattach d10 d12</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d10: Submirror d12 is attached</dd>
</dl>
<p><b></p>
<p><a name="6.3.4  ) Making Mirrored disk bootable">6.3.4&nbsp; )</a></b><a name="6.3.4  ) Making Mirrored disk bootable"> <b>Making Mirrored disk bootable</b></a><br />
<b></p>
<p style="margin-left: 33">a.)</b> # installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk<br />
/dev/rdsk/c0t1d0s0<br />
<b></p>
<p><a name="2.) Creating alterbate name for Mirrored boot disk">6.3.5 &nbsp;)</a></b><a name="2.) Creating alterbate name for Mirrored boot disk"> <b>Creating alterbate name for Mirrored boot disk</b></a><br />
<b></p>
<p style="margin-left: 33">a</b>.) <u>Find physical path name for the second boot disk<br />
</u></p>
<p style="margin-left: 33"># <b>ls -l /dev/rdsk/c1t3d0s0<br />
</b></p>
<p style="margin-left: 33">lrwxrwxrwx 1 root root 55 Sep 12 11:19 /dev/rdsk/c1t3d0s0 -&gt;../../devices/sbus@1,f8000000/esp@1,200000/sd@3,0:a</p>
<p style="margin-left: 33"><b>b</b>.) <u>Create an alias for booting from disk2</u></p>
<p style="margin-left: 33"><b>ok&gt;</b> <b>nvalias bootdisk2 /sbus@1,f8000000/esp@1,200000/sd@3,0:a<br />
</b></p>
<p style="margin-left: 33"><b>ok&gt;</b> <b>boot bootdisk2</p>
<p>6.<a name="4.) Creating a RAID 5 volume :">4 <u>Creating a RAID 5 volume :</u></a><br />
</b></p>
<p><font COLOR="#000000">The system must contain at least three state<br />
database replicas before you can create RAID5 metadevices.<br />
</font></p>
<p><font COLOR="#000000">A RAID5 metadevice can only handle a single<br />
slice failure.A RAID5 metadevice can be grown by concatenating additional slices<br />
to the metadevice. The new slices do not store parity information, however they<br />
are parity protected. The resulting RAID5 metadevice continues to handle a<br />
single slice failure. </font>Create a RAID5 metadevice from a slice that<br />
contains an existing file system.will erase the data during the RAID5<br />
initialization process .The interlace value is key to RAID5 performance. It is<br />
configurable at the time the metadevice is created; thereafter, the value cannot<br />
be modified. The default interlace value is 16 Kbytes which is reasonable for<br />
most of the applications.</p>
<p>&nbsp;</p>
<p><a name="6.4.1.) To setup raid5 on three slices of different disks ."><b><br />
6.4.1.) <u>To setup raid5 on three slices of different disks .</u> </b> </a></p>
<dl>
<dd>
<p style="margin-left: 33"><b><br />
  # metainit d45 -r c2t3d0s2 c3t0d0s2 c4t0d0s2</b></dd>
<dd>
<p style="margin-left: 33">d45: RAID is setup</dd>
</dl>
<p>&nbsp;<br />
<b></p>
<p>6.<a name="5.) Creating a Trans Meta Device :">5.) <u><br />
Creating a Trans Meta Device :</u></a><br />
</b></p>
<p>Trans meta devices enables ufs logging . There is one logging device and a<br />
master device and all file system changes are written into logging device and<br />
posted on to master device . This greatly reduces the fsck time for very large<br />
file systems as fsck has to check only the logging device which is usually of 64<br />
M. maximum size.Logging device preferably should be mirrored and located on a different drive<br />
and controller than the master device .</p>
<p>Ufs logging can not be done for root partition.<br />
<b></p>
<p><a name="6.5.1) Trans Metadevice for a File System That Can Be Unmounted"><br />
6.5.1)</a></b><a name="6.5.1) Trans Metadevice for a File System That Can Be Unmounted"> <b>Trans Metadevice for a File System That Can Be Unmounted</b></a></p>
<blockquote>
<blockquote>
<p>· <b>/home2<br />
  </b>
</p></blockquote>
</blockquote>
<p><b></p>
<p style="margin-left: 33">1. </b><u>Setup metadevice<br />
</u></p>
<p style="margin-left: 33"># <b>umount /home2<br />
</b></p>
<p style="margin-left: 33"># <b>metainit d63 -t c0t2d0s2 c2t2d0s1<br />
</b></p>
<p style="margin-left: 33">d63: Trans is setup</p>
<p style="margin-left: 33">Logging becomes effective for the file system when it is remounted<br />
<b></p>
<p style="margin-left: 33">2. </b><u>Change vfstab entry &amp; reboot<br />
</u></p>
<dl>
<dd>
<p style="margin-left: 33">from<b></dd>
<p></b></p>
<dd>
<p style="margin-left: 33">/dev/md/dsk/d2 /dev/md/rdsk/d2 /home2 ufs 2 yes -</dd>
<dd>
<p style="margin-left: 33">to</dd>
<p><b></p>
<dd>
<p style="margin-left: 33">/dev/md/dsk/d63 /dev/md/rdsk/d63 /home2 ufs 2 yes -</dd>
<p></b></p>
<dd>
<p style="margin-left: 33"># <b>mount /home2</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">Next reboot displays the following message for logging device</dd>
<dd>
<p style="margin-left: 33"># <b>reboot</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">&#8230;</dd>
<dd>
<p style="margin-left: 33">/dev/md/rdsk/d63: is logging</dd>
</dl>
<p><b></p>
<p>6.5.2<a name="B.) Trans Metadevice for a File System That Cannot Be Unmounted"><br />
)</a></b><a name="B.) Trans Metadevice for a File System That Cannot Be Unmounted"> <b>Trans Metadevice for a File System That Cannot Be Unmounted</b></a></p>
<blockquote>
<blockquote>
<p>· <b>/usr
  </p></blockquote>
</blockquote>
<p style="margin-left: 33">1</b>.) <u>Setup metadevice<br />
</u></p>
<dl>
<dd>
<p style="margin-left: 33"># <b>metainit -f d20 -t c0t3d0s6 c1t2d0s1</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d20: Trans is setup</dd>
</dl>
<p><b></p>
<p style="margin-left: 33">2.) </b><u>Change vfstab entry &amp; reboot:<br />
</u></p>
<dl>
<dd>
<p style="margin-left: 33"><b>from</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33"><b>/dev/dsk/c0t3d0s6&nbsp;&nbsp;&nbsp;&nbsp; /dev/rdsk/c0t3d0s6&nbsp;&nbsp; /usr&nbsp;&nbsp; ufs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; no&nbsp;&nbsp;&nbsp;&nbsp; -</b></dd>
<dd>
<p style="margin-left: 33"><b>to</b></dd>
<dd><b><br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /dev/md/dsk/d20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /dev/md/rdsk/d20&nbsp;&nbsp;&nbsp;&nbsp; /usr&nbsp;&nbsp;&nbsp; ufs&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; no&nbsp;&nbsp;&nbsp;&nbsp; -</b></dd>
<p>  <b>
</dl>
<p></b></p>
<p style="margin-left: 33">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # <b>reboot</p>
<p><a name="6.5.3 ) TransMeta device using Mirrors">6.5.3 ) TransMeta device using Mirrors</a></p>
<p style="margin-left: 33">1</b>.) <u>Setup metadevice<br />
</u><b></p>
<dl>
<dd>
<p style="margin-left: 33">#umount /home2</dd>
<dd>
<p style="margin-left: 33">#metainit&nbsp;&nbsp;&nbsp;&nbsp; d64&nbsp;&nbsp;&nbsp;&nbsp; -t&nbsp;&nbsp;&nbsp;&nbsp; d30&nbsp;&nbsp;&nbsp;&nbsp; d12</dd>
<p></b></p>
<dd>
<p style="margin-left: 33">d64 trans is setup</dd>
</dl>
<p><b></p>
<p style="margin-left: 33">2.) </b><u>Change vfstab entry &amp; reboot:<br />
</u><b></p>
<dl>
<dd>
<p style="margin-left: 33">from</dd>
<p></b></p>
<dd>
<p style="margin-left: 33"><b>/dev/md/dsk/d30 /dev/md/rdsk/d30 /home2 ufs 2 yes</b></dd>
<p><i></p>
<dd>
<p style="margin-left: 33">to</dd>
<p></i><b></p>
<dd>
<p style="margin-left: 33">/dev/md/dsk/d64 /dev/md/rdsk/d64 /home2 ufs 2 yes</dd>
</dl>
<p><a name="6.) HotSpare Pool">6.6 ) <u>HotSpare Pool</u></a><br />
</b><font COLOR="#000000"><br />
A hot spare pool is a collection of slices reserved by DiskSuite to be<br />
automatically substituted in case of a slice failure in either a submirror or<br />
RAID5 metadevice . A hot spare cannot be a metadevice and it can be associated<br />
with multiple submirrors or RAID5 metadevices. However, a submirror or RAID5<br />
metadevice can only be asociated with one hot spare pool. .Replacement is based on a first fit for the failed slice and they need to be<br />
replaced with repaired or new slices. Hot spare pools may be allocated,<br />
deallocated, or reassigned at any time unless a slice in the hot spare pool is<br />
being used to replace damaged slice of its associated metadevice.</font>
<p><b><br />
  <a name="6.6.1) Associating a Hot Spare Pool with Submirrors">6.6.1) Associating a Hot Spare Pool with Submirrors<br />
</a><br />
</b></p>
<dl>
<dd>
<p style="margin-left: 33"># <b>metaparam -h&nbsp;&nbsp;&nbsp;&nbsp; hsp100&nbsp;&nbsp;&nbsp;&nbsp;<br />
d10</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33"># <b>metaparam -h&nbsp;&nbsp;&nbsp;&nbsp; hsp100&nbsp;&nbsp;&nbsp;&nbsp;<br />
d11</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33"># <b>metastat d0</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">d0: Mirror</dd>
<dd>
<p style="margin-left: 33">Submirror 0: d10</dd>
<dd>
<p style="margin-left: 33">State: Okay</dd>
<dd>
<p style="margin-left: 33">Submirror 1: d11</dd>
<dd>
<p style="margin-left: 33">State: Okay</dd>
<dd>
<p style="margin-left: 33">&#8230;</dd>
<dd>
<p style="margin-left: 33">d10: Submirror of d0</dd>
<dd>
<p style="margin-left: 33">State: Okay</dd>
<dd>
<p style="margin-left: 33">Hot spare pool: hsp100</dd>
<dd>
<p style="margin-left: 33">&#8230;</dd>
<dd>
<p style="margin-left: 33">d11: Submirror of d0</dd>
<dd>
<p style="margin-left: 33">State: Okay</dd>
<dd>
<p style="margin-left: 33">Hot spare pool: hsp100</dd>
</dl>
<blockquote>
<blockquote><p>
    <b>
    </p></blockquote>
</blockquote>
<p>
  <a name="6.6.2 ) Associating or changing a Hot Spare Pool with a RAID5 Metadevice">6.6.2 ) Associating or changing a Hot Spare Pool with a RAID5 Metadevice</a></p>
<dl>
<dd>
<p style="margin-left: 33">#metaparam&nbsp;&nbsp;&nbsp;&nbsp; -h&nbsp;&nbsp;&nbsp;<br />
    hsp001&nbsp;&nbsp;&nbsp;&nbsp; d10</b></dd>
<dd>
<p style="margin-left: 33"><b>#metastat&nbsp;&nbsp;&nbsp;&nbsp; d10</b></dd>
<dd>
<p style="margin-left: 33">d10:RAID</dd>
<dd>
<p style="margin-left: 33">State: Okay</dd>
<dd>
<p style="margin-left: 33">Hot spare Pool: hsp001</dd>
</dl>
<p>
    <b><br />
    <a name="6.6.3 ) Adding a Hot Spare Slice to All Hot Spare Pools">6.6.3 ) Adding a Hot Spare Slice to All Hot Spare Pools<br />
    </a><br />
</b></p>
<dl>
<dd>
<p style="margin-left: 33"># <b>metahs&nbsp;&nbsp; -a&nbsp;&nbsp;&nbsp; -all&nbsp;&nbsp;&nbsp;<br />
    /dev/dsk/c3t0d0s2</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">hsp001: Hotspare is added</dd>
<dd>
<p style="margin-left: 33">hsp002: Hotspare is added</dd>
<dd>
<p style="margin-left: 33">hsp003<b>:</b> Hotspare is added</dd>
<dd>&nbsp;</dd>
</dl>
<p><b></p>
<p>6.<a name="7.) Disksets">7 ) <u>Disksets</u></a></p>
<p>Few important points about disksets :<br />
</b></p>
<ul>
<li>
<p> A diskset is a set of shared <i>disk drives</i> containing<br />
        DiskSuite objects that can be shared exclusively (but not concurrently)<br />
        by one or two hosts. Disksets are used in high availability failover<br />
        situations where the ownership of the failed machine’s diskset is<br />
        transferred to other machine . Disksets are connected to two hosts for<br />
        sharing and must have&nbsp; same attributes , controller/target/drive ,<br />
        in both machines except for the ownership .</li>
</ul>
<ul>
<li>
DiskSuite must be installed on each host that will be connected to the<br />
        diskset.There is one metadevice state database per shared diskset and one on<br />
        the &quot;local&quot; diskset. Each host must have its local metadevice<br />
        state database set up before you can create disksets.</p>
<p>    Each host in a diskset must have a local diskset besides a shared diskset.A diskset can be created seprately on one host&nbsp; &amp;&nbsp; then<br />
        added to&nbsp; the second host later.</li>
</ul>
<ul>
<li>
Drive should not be in use by a&nbsp; file system, database, or any other<br />
application for adding in diskset .
        </li>
</ul>
<div align="left">
<ul>
<li>When a drive is added to disksuite it&nbsp; is&nbsp;<br />
        repartitioned&nbsp; so that the metadevice state database replica for<br />
        the diskset can be placed on the drive. Drives are repartitioned when<br />
        they are added to a diskset only if Slice 7 is not set up correctly. A<br />
        small portion of each drive is reserved in Slice 7 for use by DiskSuite.<br />
        The remainder of the space on each drive is placed into Slice 0.. After<br />
        adding a drive to a diskset, it may be repartitioned as necessary,<br />
        provided&nbsp; that no changes are made to Slice 7 . If Slice 7 starts<br />
        at cylinder 0, and is large enough to contain a state database replica,<br />
        the disk is not repartitioned.
        </li>
</ul></div>
<div align="left">
<ul>
<li>When drives are added to a diskset, DiskSuite re-balances the state<br />
        database replicas across the remaining drives. Later, if necessary, you<br />
        can change the replica layout with the metadb(1M)<br />
        command.
        </li>
</ul></div>
<div align="left">
<ul>
<li>To create a diskset, root<br />
        must be a member of Group 14, or the ./rhosts<br />
        file must contain an entry for each host.
        </li>
</ul></div>
<p><b></p>
<p>&nbsp;</p>
<p><a name="6.7.1 ) Creating Two Disksets">6.7.1 ) <u>Creating Two Disksets</u></a><br />
</b></p>
<dl>
<dd>
<p style="margin-left: 33">host1# <b>metaset&nbsp;&nbsp; -s&nbsp;&nbsp;&nbsp; diskset0&nbsp;&nbsp;<br />
    -a&nbsp;&nbsp; -h&nbsp;&nbsp;&nbsp; host1&nbsp;&nbsp;&nbsp; host2</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">host1# <b>metaset&nbsp;&nbsp; -s&nbsp;&nbsp;&nbsp;<br />
    diskset1&nbsp; -a&nbsp;&nbsp;&nbsp; -h&nbsp;&nbsp;&nbsp; host1&nbsp;&nbsp;&nbsp;<br />
    host2 </b>
  </dd>
<dd>
<p style="margin-left: 33">host1# <b>metaset</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">Set name = diskset0, Set number = 1</dd>
<dd>
<p style="margin-left: 33">Host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Owner</dd>
<dd>
<p style="margin-left: 33">host1</dd>
<dd>
<p style="margin-left: 33">host2</dd>
<dd>
<p style="margin-left: 33">Set name = diskset1, Set number = 2</dd>
<dd>
<p style="margin-left: 33">Host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Owner</dd>
<dd>
<p style="margin-left: 33">host1</dd>
<dd>
<p style="margin-left: 33">host2</dd>
</dl>
<p><b></p>
<p><a name="6.7.2 ) Adding Drives to a Diskset">6.7.2 ) <u>Adding Drives to a Diskset</u></a><br />
</b></p>
<dl>
<dd>
<p style="margin-left: 33">host1# <b>metaset&nbsp;&nbsp;&nbsp;&nbsp; -s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
diskset0&nbsp;&nbsp;&nbsp;&nbsp; -a&nbsp;&nbsp;&nbsp; c1t2d0&nbsp; c1t3d0&nbsp; c2t2d0&nbsp;&nbsp;<br />
c2t3d0&nbsp;&nbsp; c2t4d0&nbsp;&nbsp; c2t5d0 </b>
  </dd>
<dd>
<p style="margin-left: 33">&nbsp;</dd>
<dd>
<p style="margin-left: 33">host1# <b>metaset </b>
  </dd>
<dd>
<p style="margin-left: 33">Set name = diskset0, Set number = 1</dd>
<dd>
<p style="margin-left: 33">Host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Owner</dd>
<dd>
<p style="margin-left: 33">host1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes</dd>
<dd>
<p style="margin-left: 33">host2</dd>
<dd>
<p style="margin-left: 33">&nbsp;</dd>
<dd>
<p style="margin-left: 33">Drive&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dbase</dd>
<dd>
<p style="margin-left: 33">c1t2d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes</dd>
<dd>
<p style="margin-left: 33">c1t3d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes</dd>
<dd>
<p style="margin-left: 33">c2t2d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes</dd>
<dd>
<p style="margin-left: 33">c2t3d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes</dd>
<dd>
<p style="margin-left: 33">c2t4d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes</dd>
<dd>
<p style="margin-left: 33">c2t5d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes</dd>
<dd>
<p style="margin-left: 33">&nbsp;</dd>
<dd>
<p style="margin-left: 33">Set name = diskset1, Set number = 2</dd>
<dd>
<p style="margin-left: 33">Host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Owner</dd>
<dd>
<p style="margin-left: 33">host1</dd>
<dd>
<p style="margin-left: 33">host2</dd>
</dl>
<p><b></p>
<p><a name="6.7.3 ) Creating  a Mirror in a Diskset">6.7.3 ) <u>Creating&nbsp; a Mirror in a Diskset&nbsp;</u></a><br />
</b></p>
<dl>
<dd>
<p style="margin-left: 33"># <b>metainit -s diskset0 d51&nbsp;&nbsp; 1&nbsp;&nbsp;<br />
    1&nbsp;&nbsp; /dev/dsk/c0t0d0s2</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">diskset0/d51: Concat/Stripe is setup</dd>
<dd>
<p style="margin-left: 33">&nbsp;</dd>
<dd>
<p style="margin-left: 33"># <b>metainit -s diskset0 d52&nbsp;&nbsp; 1&nbsp;&nbsp;<br />
    1&nbsp;&nbsp; /dev/dsk/c1t0d0s2</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">diskset0/d52: Concat/Stripe is setup</dd>
<dd>
<p style="margin-left: 33">&nbsp;</dd>
<dd>
<p style="margin-left: 33"># <b>metainit -s diskset0 d50&nbsp;&nbsp; -m&nbsp;&nbsp;<br />
    d51</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">diskset0/d50: mirror is setup</dd>
<dd>
<p style="margin-left: 33">&nbsp;</dd>
<dd>
<p style="margin-left: 33"># <b>metattach -s diskset0&nbsp;&nbsp; d50&nbsp;&nbsp;&nbsp;&nbsp;<br />
    d52</dd>
<p>  </b></p>
<dd>
<p style="margin-left: 33">diskset0/d50: Submirror d52 is attached</dd>
</dl>
<p><b></p>
<p>7.0 <a name="Trouble Shooting">Trouble Shooting </a><br />
</b></p>
<p><b>7.<a name="1.) Recovering from  Stale State Database Replicas">1 ) <u>Recovering from&nbsp; Stale State Database Replicas</u></a></b></p>
<dl>
<dd><b>Problem&nbsp;&nbsp;&nbsp; : </b>State database<br />
  corrupted or unavailable .</dd>
<dd><b>Causes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : </b>Disk failure , Disk I/O<br />
  error.</dd>
<dd><b>Symptoms :</b> Error message at the booting time if databases are &lt;=<br />
  50% of total database. System comes to Single user mode.</dd>
</dl>
<p style="margin-left: 33">ok <b><kbd>boot</kbd></b><br />
&#8230;<br />
Hostname: host1<br />
metainit: Host1: stale databases<br />
Insufficient metadevice database replicas located.<br />
Use metadb to delete databases which are broken.<br />
Ignore any &quot;Read-only file system&quot; error messages.<br />
Reboot the system when finished to reload the metadevice<br />
database.<br />
After reboot, repair any broken database replicas which were<br />
deleted.<br />
Type Ctrl-d to proceed with normal startup,<br />
(or give root password for system maintenance): &lt;<var>root-password</var>&gt;<br />
Entering System Maintenance Mode.</p>
<p>1.) Use the <tt>metadb</tt> command to look at the metadevice state database<br />
and see which state database replicas are not available. Marked by unknown and M<br />
flag.</p>
<p style="margin-left: 33"># <b><kbd>/usr/opt/SUNWmd/metadb -i</kbd></b><br />
&nbsp;&nbsp; flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; first blk&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
block count<br />
&nbsp;&nbsp;&nbsp; a m&nbsp; p&nbsp; lu&nbsp;&nbsp;&nbsp; 16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
1034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
/dev/dsk/c0t3d0s3<br />
&nbsp;&nbsp;&nbsp; a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p&nbsp; l&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
1050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
1034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
/dev/dsk/c0t3d0s3<br />
&nbsp;&nbsp;&nbsp; M&nbsp;&nbsp;&nbsp; p&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
unknown&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unknown&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
/dev/dsk/c1t2d0s3<br />
&nbsp;&nbsp;&nbsp; M&nbsp;&nbsp;&nbsp; p&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
unknown&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unknown&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<dl>
<dd>2.) Delete the state database replicas on the bad disk using the <kbd>-d</kbd><br />
  option to the <tt>metadb(1M)</tt> command.</dd>
<dd>
<p style="margin-left: 33">At this point, the root (<kbd>/</kbd>) file system<br />
  is read-only. You can ignore the <kbd>mddb.cf</kbd> error messages:</dd>
<dd>
<p style="margin-left: 33">&nbsp;</dd>
<dd>
<p style="margin-left: 33"># <b><kbd>/usr/opt/SUNWmd/metadb&nbsp; -d&nbsp; -f&nbsp;<br />
  c1t2d0s3</kbd></b><br />
  metadb: demo: /etc/opt/SUNWmd/mddb.cf.new: Read-only file system .</dd>
<dd>
<p style="margin-left: 33">&nbsp;</dd>
<dd>
<p style="margin-left: 22"><u>Verify deletion</u> </dd>
<dd>
<p style="margin-left: 33"># <b><kbd>/usr/opt/SUNWmd/metadb&nbsp; -i</kbd></b><br />
&nbsp;&nbsp;&nbsp; flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; first blk&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
  block count<br />
&nbsp;&nbsp;&nbsp;&nbsp; a m&nbsp; p&nbsp; lu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
  16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
  1034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /dev/dsk/c0t3d0s3<br />
&nbsp;&nbsp;&nbsp;&nbsp; a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p&nbsp; l&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
  1050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    /dev/dsk/c0t3d0s3</dd>
</dl>
<p>3.) Reboot.</p>
<p>4.) Use the <tt>metadb</tt> command to add back the state database replicas<br />
and to see&nbsp; that the state database replicas are correct.</p>
<p style="margin-left: 33"># <b><kbd>/usr/opt/SUNWmd/metadb -a -c 2 c1t2d0s3</kbd></b><br />
<br />
# <b><kbd>/usr/opt/SUNWmd/metadb</kbd></b><br />
<br />
&nbsp;&nbsp; flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; first blk&nbsp;<br />
block count<br />
&nbsp; a m&nbsp; p&nbsp; luo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
1034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dev/dsk/c0t3d0s3<br />
&nbsp; a&nbsp;&nbsp;&nbsp; p&nbsp; luo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
1050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
1034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dev/dsk/c0t3d0s3<br />
&nbsp; a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
u&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
1034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dev/dsk/c1t2d0s3<br />
&nbsp; a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
u&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
1050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
1034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dev/dsk/c1t2d0s3</p>
<p><b>7.<a name="2.) Metadevice Errors :">2 ) <u>Metadevice Errors :</u></a></b></p>
<dl>
<dd><b>Problem&nbsp; </b>&nbsp; : Sub Mirrors out of sync&nbsp; in&nbsp;<br />
  &quot;Needs maintainence&quot; state ,</dd>
<dd><b>Causes</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Disk problem / failure ,<br />
  improper shutdown , communication problems between two mirrored disks .</dd>
<dd><b>symptoms  </b>: &quot;Needs maintainence&quot; errors in metastat output</dd>
</dl>
<p>  <TABLE cellPadding=0 width="100%" border=0 style="border-collapse: collapse" bordercolor="#111111" cellspacing="0"><br />
    <TR><br />
      <TD noWrap></p>
<dl>
<dd># <B><KBD>/usr/opt/SUNWmd/metastat</KBD></B><br />
        d0: Mirror<br />
&nbsp;&nbsp;&nbsp; Submirror 0: d10<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; State: Needs maintenance<br />
&nbsp;&nbsp;&nbsp; Submirror 1: d20<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; State: Okay<br />
        &#8230;<br />
        d10: Submirror of d0<br />
&nbsp;&nbsp;&nbsp; State: Needs maintenance<br />
&nbsp;&nbsp;&nbsp; Invoke: &quot;metareplace d0 /dev/dsk/c0t3d0s0 &lt;new device&gt;&quot;<br />
&nbsp;&nbsp;&nbsp; Size: 47628 blocks<br />
&nbsp;&nbsp;&nbsp; Stripe 0:<br />
        	Device&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start Block&nbsp; Dbase State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Hot Spare<br />
        	/dev/dsk/c0t3d0s0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; No&nbsp;&nbsp;&nbsp; Maintenance<br />
        <br />
&nbsp;<br />
        d20: Submirror of d0<br />
&nbsp;&nbsp;&nbsp; State: Okay<br />
&nbsp;&nbsp;&nbsp; Size: 47628 blocks<br />
&nbsp;&nbsp;&nbsp; Stripe 0:<br />
        	Device&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start Block&nbsp; Dbase State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Hot Spare<br />
        	/dev/dsk/c0t2d0s0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; No&nbsp;&nbsp;&nbsp; Okay&nbsp;</dd>
</dl>
<p>      </TD></TR></TABLE></p>
<p><b>Solution :</b></p>
<dl>
<dd>1.)&nbsp;&nbsp;&nbsp; If disk is all right&nbsp; -&nbsp; enable the&nbsp;<br />
  failed metadevice&nbsp; with metareplace command&nbsp; .</dd>
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If disk is failed &#8211; Replace<br />
  disk create similar partitions as in failed disk and enable new device with<br />
  metareplace command.</dd>
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # <B><KBD>/usr/opt/SUNWmd/metareplace -e d0 c0t3d0s0</KBD></B><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
Device /dev/dsk/c0t3d0s0 is enabled<br />
&nbsp;<br />
  2.)&nbsp; If disk has failed&nbsp; and you want to move the failed devices to<br />
  new disk with different id (CnTnDn) &#8211; add new disk ,</dd>
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; format to create&nbsp;&nbsp;&nbsp;&nbsp;<br />
  a similar partition scheme as in failed disk and use metarepalce command</dd>
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # <B><KBD>/usr/opt/SUNWmd/metareplace&nbsp; d0 c0t3d0s0&nbsp;&nbsp;<br />
  &lt;new device name&gt; </KBD></B></dd>
</dl>
<p>The metareplace command above can also be used for concate or strip&nbsp;<br />
replacement in a&nbsp; volme but that would involve restoring the backup if it<br />
is not mirrored.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminschoice.com/solstice-disksuite-guide/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geek Speaks</title>
		<link>http://adminschoice.com/geek-speaks</link>
		<comments>http://adminschoice.com/geek-speaks#comments</comments>
		<pubDate>Tue, 29 Dec 2009 20:50:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basics]]></category>

		<guid isPermaLink="false">http://adminschoice.com/?p=347</guid>
		<description><![CDATA[Explanations of some frequently used geek terms]]></description>
			<content:encoded><![CDATA[<p>Geek Speaks &#8211; collection  of previous geek speaks<br />
SE, HVD, LVD SCSI interfaces<br />
CIDR : Classless Inter-Domain Routing<br />
Priority Paging<br />
FSSTABLE<br />
umask<br />
Dynamic System Domains</p>
<p><strong>SE, HVD, LVD SCSI interfaces</strong> &#8211; Single Ended interface drives each signal line against ground &#038; is susceptible to noise and has short length.<br />
High Voltage Differential interface drives two lines for each SCSI signal. One line is the inverse of the other line and the SCSI signal is the difference and hence term differential.<br />
Low Voltage Differential uses 3.3 volt logic which is 5V in HVD. Maximum cable lenth supported are from 1.5 to 6 meter in SE , 25 meters in HVD &#038; 12 Meters in LVD.<br />
A multimode LVD device will automatically switch between LVD and single-ended operation by detecting whether the other devices on the chain are running in SE or LVD mode. SE &#038; LVD are not electrically compatible to HVD due to voltage difference. </p>
<p><strong>CIDR </strong>: Classless Inter-Domain Routing &#8211; the notation often used instead of writing the subnet mask along with ip-address . It has network prefix at the end of a address as / number of network bits.This means that the IP address 192.200.20.10 with the subnet mask 255.255.255.0 can also be expressed as 192.200.20.10/24. The /24 indicates the network prefix length, which is equal to the number of continuous binary one-bits in the subnet mask (11111111.11111111.11111111.000000). Zeros are for addressing the hosts on this network.</p>
<p><strong>Priority Paging</strong> : Priority paging parameter in pre Solaris 8 versions allows file system cache in the memory to be paged out first leaving application and data in the memory . Free memory is used for caching file system in Pre Solaris 8 versions and paging in such cases sometimes led to paging out of application &#038; data , making application experience a page-in page-out time delay.Solaris 8 keeps file cache isolated so it is not required there. This can be enabled in pre solaris 8 versions by adding line &#8220;set priority paging=1&#8243; in /etc/system. Remove this line if upgrading from Solaris 7 to 8 &#038; retaining old /etc/system file. </p>
<p><strong>FSSTABLE</strong> : File System Stable state flag. The file system is (or was) mounted but has not changed since the last checkpoint (sync or fsflush) that normally occurs every 30 seconds. The kernel periodically checks if a file system is idle and, if so, flushes the information in the superblock back to the disk and marks it as FSSTABLE. If the system crashes, the file system structure is stable, but users might lose a small amount of data. File systems that are marked as FSSTABLE can skip the checking before mounting. The mount command will not mount a file system for read and write access if the file system state is not FSCLEAN, FSSTABLE, or FSLOG in case of logging file system</p>
<p><strong>umask </strong>- is the filter which determines the default file and directory permissions at the time of their creation . It is represented by 3 octal values representing permissions to be denied by default .First value is for user ,second for group and third for others permission .Default is 022 and set in /etc/profile .Current value can be seen by typing umask at command prompt</p>
<p><strong>Dynamic System Domains</strong> &#8211; the ability to create multiple (Solaris) systems within a single Enterprise 10000 chassis. The components which form a domain (system boards, CPU, memory and i/o) are electrically isolated from other domains to provide the protection between applications running in different domains. The hardware within domains can be reconfigured under software control to meet fluctuating demands of applications running within the domains of an Enterprise 10000 </p>
]]></content:encoded>
			<wfw:commentRss>http://adminschoice.com/geek-speaks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix  Basics</title>
		<link>http://adminschoice.com/unix-for-beginer</link>
		<comments>http://adminschoice.com/unix-for-beginer#comments</comments>
		<pubDate>Mon, 21 Dec 2009 06:22:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basics]]></category>

		<guid isPermaLink="false">http://adminschoice.com/wp28/?p=4</guid>
		<description><![CDATA[Learn about various Unix Shells , their configuration files ; Unix directory structure and  Commonly used Unix commands for system administration.]]></description>
			<content:encoded><![CDATA[<p><strong>Unix Shell</strong><br />
Shell in unix acts as a command interpreter between user and Unix kernel as well as provides a strong scripting language .</p>
<p><strong>Following are the different types of Unix shells , </strong></p>
<p><strong>B shell</strong> , /bin/sh &#8211; This is the default Unix shell for many Unix operating systems .<br />
Bourne shell was written by S. R. Bourne and its more emphasis is to use it as a scripting language rather than an interactive shell .<br />
Some of the features are :<br />
Provided support for environment variables using  parameters and exportable variables.<br />
Redirection of program output and error .<br />
Command substitution using back quotes: `command`.<br />
embed a file/commands using input redirector &lt;&lt;<br />
&#8220;for ~ do ~ done&#8221; loops<br />
&#8220;case ~ in ~ esac&#8221;  for selecting and responding to a data value .</p>
<p><strong>C-shell</strong> /bin/csh was designed to provide  the interactive features lacking in b shell such as  job control and aliasing .</p>
<p><strong>K shell</strong> /bin/ksh &#8211;  was created by David Korn and has features of both B shell and C shell along with some  additional features .</p>
<p><strong>Bash</strong> &#8211;  the Bourne again shell was developed by GNU project .It is based on B shell language and has features of C and K shells.</p>
<p><strong>tcsh </strong>is the default shell of FreeBSD and its descendants. Essentially it is C shell with programmable command line completion, command-line editing, and a few other features.</p>
<p><strong>Zsh </strong> is a shell designed for interactive use  and it has many of the useful features of bash, ksh, and tcsh along with many new features.</p>
<h3>Unix Shells  configuration files :</h3>
<p><strong>b shell</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<blockquote><p>shell prompt	:   $<br />
executable file :   /bin/sh</p>
<p>Read on interactive/non interactive login to bash<br />
/etc/profile<br />
~/.profile</p></blockquote>
<p><strong>bash shell</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<blockquote><p>shell prompt	:   $<br />
executable file :   /bin/bash</p>
<p>Read on interactive/non interactive login to bash<br />
/etc/profile<br />
~/.profile<br />
~/.bash_profile<br />
~/.bash_login</p>
<p>Always read on invoking bash<br />
~/.bashrc</p>
<p>/etc/profile login login     login<br />
~/.profile login login</p></blockquote>
<p><strong>csh shell</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<blockquote><p>shell prompt	:  %<br />
executable file :   /bin/csh</p>
<p>Read on  csh shell invocation .<br />
/etc/csh.cshrc<br />
~/.cshrc</p>
<p>Read on interactive/non interactive login to tcsh shell<br />
/etc/.login<br />
~/.login<br />
~/.logout<br />
/etc/csh.login</p></blockquote>
<p><strong>ksh</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<blockquote><p>shell prompt	:   $<br />
executable file :   /bin/ksh</p>
<p>Read on interactive/non interactive login to bash<br />
/etc/profile<br />
~/.profile</p></blockquote>
<p><strong>tcsh shell</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<blockquote><p>shell prompt	:   &amp;<br />
executable file :   /bin/tcsh</p>
<p>Read on  tcsh shell invocation .<br />
~/.tcshrc<br />
/etc/csh.cshrc<br />
~/.cshrc</p>
<p>Read on interactive/non interactive login to tcsh shell<br />
/etc/.login<br />
~/.login<br />
~/.logout<br />
/etc/csh.login</p></blockquote>
<p><strong>zsh</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<blockquote><p>shell prompt	:   $<br />
executable file :   zsh</p>
<p>Configuration files :</p>
<p>Always read on invoking zsh<br />
~/.zshenv            always<br />
/etc/zshenv          always</p>
<p>only read on interactive login to zsh.<br />
~/.zshrc<br />
/etc/zshrc</p>
<p>Read on interactive/non interactive login to zsh<br />
/etc/zprofile        login<br />
/etc/zlogin          login<br />
/etc/zlogout         login<br />
/.zprofile          login<br />
~/.zlogin            login<br />
~/.zlogout           login</p></blockquote>
<p><strong>Unix Dir Structure &#8211; Next </strong> </p>
]]></content:encoded>
			<wfw:commentRss>http://adminschoice.com/unix-for-beginer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solaris Installation</title>
		<link>http://adminschoice.com/solaris-installation</link>
		<comments>http://adminschoice.com/solaris-installation#comments</comments>
		<pubDate>Mon, 21 Dec 2009 06:22:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Install]]></category>

		<guid isPermaLink="false">http://adminschoice.com/wp28/?p=72</guid>
		<description><![CDATA[How to install Solaris OS - Introduction to the procedure and sequence of event  in Solaris installation. ]]></description>
			<content:encoded><![CDATA[<p>Solaris installation poses a challenges to the new Solaris sysadmins who have never done the installation of Solaris before . Though the installation itself is simple and straight forward but doing it the first time comes with its own anxiety associated with  unexplored and unknown things .</p>
<p>The idea of this article is to introduce you with the procedure and sequence of event  Solaris installation to build enough confidence to finish the installation on your own.</p>
<p>Table of contents<br />
1. Before you begin<br />
2. Getting Started<br />
3. Starting the installation<br />
4. OS distributions &amp; disk configuration<br />
5. After Installation<br />
6. Next Steps</p>
<p><strong>1. Before you begin</strong><br />
For Solaris installation on standalone Sun machine you need the following besides sun cpu :</p>
<p>A) Sun Monitor and Sun Keyboard<br />
OR<br />
For carrying the installation through the serial port A of Sun (ttya)<br />
Dumb Terminal or PC with serial port communication software like HyperTerminal<br />
AND<br />
A null modem cable ( Pin 2 &amp; 3 crossed 5 common ground in 9 Pin to 9 pin ; Pin 7 is common ground in 25 Pin connector ) connecting sun&#8217;s serial port A with PC serial port.</p>
<p>B) You will also require a IP address, netmask and a host name for your system.</p>
<p><strong>2. Getting Started</strong></p>
<p>Installation starts at OK&gt; prompt &amp; you can get to ok&gt; using any of the following method :</p>
<p>A. by pressing Stop A key sequence on a Sun Keyboard.<br />
B. typing #init 0 if your system boots up directly .<br />
C. Pressing ctrl-break or shift-break on a pc keyboard if using pc as<br />
console through serial port.<br />
D. If auto-boot feature is enabled system directly boots up<br />
and gives you a # prompt .You can disable auto-boot so next time it<br />
stays at ok prompt for starting installation.<br />
#/usr/platform/sun4u/bin/eeprom auto-boot?=false<br />
reboot the system.</p>
<p><strong>3. Starting the installation</strong><br />
Insert the installation media &#8211; OS CD in CD drive and type boot cdrom at ok&gt; prompt .<br />
Ok&gt;boot cdrom</p>
<p>The first phase begins with system identification   and gathers information about the system from the the user .System starts booting up and after initialization it asks for language and locale also terminal type in case of PC/terminal</p>
<p>Select your locale and DEC VT100 terminal type for terminal selection<br />
Further installation through the terminal require response to the<br />
selections through ESC and function keys and space bar which are<br />
mentioned on the installation screen.</p>
<p>On the next screens, you are to identify the system as networked or    non-networked, and set the default time zone and date/time. After this following host information is required :</p>
<p>A) A host name for the system<br />
B) Whether the system is networked if yes you will have to<br />
provide the IP address &amp; netmask of this machine.</p>
<p>Next you will be asked to select the name services<br />
Name services
<pre>
[    ]                      NIS+
[    ]                      NIS
[    ]                      DNS
[X ]                        None
</pre>
<p>Select the service if you have complete details like domain names etc or select none to configure after installation.</p>
<p>You have to select a distribution type from among the choices choices</p>
<p><strong>4. OS distribution &amp; Disk configuration</strong><br />
After identification is complete the installation process proceeds on to the OS and disk configuration and need your input for these settings. Selection depends on role of your machine</p>
<p>Typical space requirement for Solaris 7 is given here.</p>
<pre>
[   ] Entire Distribution plus OEM support 64-bit 1242.00 MB (F4 to Customize
[X] Entire Distribution 64-bit .....…...….1215.00 MB
[   ] Developer System Support 64-bit.... 1154.00 MB
[   ] End User System Support 64-bit .….. 765.00 MB
[   ] Core System Support .............. .334.00 MB
</pre>
<p>* Entire distribution with OEM has all software with some third party software<br />
* Entire distribution  has all software without   third party software .<br />
* Developer system has run time libraries for C software etc.<br />
* End user has  X windows and CDE environment .<br />
* Core system is without X windows softwares etc.</p>
<p>If you are not sure select entire distribution.</p>
<p>You will be presented with choice to select the boot disk among the disks present in the system ,unless you have reasons  select the c0t0d0 at boot disk.</p>
<p>[ X ] c0t0d0 (17269 MB) boot disk 17269 MB</p>
<p>[   ] c0t1d0 (17269 MB) 17269 MB</p>
<p>overlap partition represents entire disk and is slice s2 of the disk.<br />
If any of the disk contain a preexisting partition you will be given a choice to  preserve the partition .<br />
Next the current layout is given ( if existing ) and you are asked to select between Automatic and Custom layout of disk partitions.</p>
<p>* Automatic layout make a single partition of entire boot disk .<br />
* Customize option gives and option to create the partitions and select the sizes .</p>
<p>Things to keep in mind while doing interactive or custom installation<br />
- Additional space is required in /var &amp; /home  if server is to handle  mail and printing as mail and print files are formed in /var &amp; if the user home directories are to be located on /home partition</p>
<p>A sample partition table may look like following .</p>
<pre>
File system/Mount point Disk/Slice Size
---------------------------------------

/           c0t0d0s0       300 MB

swap        c0t0d0s1       2000 MB

overlap     c0t0d0s2       17269 MB

/usr        c0t0d0s3       2000 MB

/opt        c0t0d0s4       1000 MB

/var        c0t0d0s5       1000 MB
</pre>
<p>- The swap partition size depends on the size of RAM in the system if you are not sure of its size keep it double the RAM or more than RAM in the system.</p>
<p>- If you are not sure of individual partition sizes of   /    , /usr   /opt &amp; /var make one partition as / and keep its size sufficiently higher than the distribution size you have selected in earlier steps . Always keep in mind the future software that you might have to install like compilers applications etc and log files that will be generated and accumulate in /var directory or partition.</p>
<p>After you have specified the partition sizes it gives summary and error if any</p>
<pre>
Installation Option: Initial

Boot Device:            c0t0d0s0
Client Services:        None
Software: Solaris 2.7, Entire Distribution

File System and Disk Layout:
/          c0t0d0s0     300 MB
swap       c0t0d0s1     2000 MB
/usr       c0t0d0s3     2000 MB
/opt       c0t0d0s4     1000 MB
/var       c0t0d0s5     1000 MB

one more question is asked about rebooting

[X] Auto Reboot
[  ] Manual Reboot
</pre>
<p>Afterwards it starts configuring disk making partitions and installing software indicating the progress in a table .</p>
<p>MBytes Installed: 700.66</p>
<p>MBytes Remaining: 0.00</p>
<pre>
Installing:
|    |     |     |     |     |

0   20    40    60    80    100
</pre>
<p>After the installation is complete it customizes system files , devices ,logs , installs patches which are there in OS CD for that release. You can install recommended  latest patches later</p>
<p>System then  reboots or ask you to reboot depending upon the choice selected earlier .</p>
<p><strong>5. After Installation</strong><br />
After rebooting it asks for new root passed and  comes to console prompt where you can login as root install patches ,additional software , make user etc. etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminschoice.com/solaris-installation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
