<?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>devtrends.com &#187; Linux</title>
	<atom:link href="http://www.devtrends.com/index.php/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devtrends.com</link>
	<description>developing trends in information technology</description>
	<lastBuildDate>Fri, 03 Sep 2010 21:32:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Setting up a Simple DNS Server with Bind9</title>
		<link>http://www.devtrends.com/index.php/setting-up-a-simple-dns-server-with-bind9/</link>
		<comments>http://www.devtrends.com/index.php/setting-up-a-simple-dns-server-with-bind9/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 01:11:33 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[bind9]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=456</guid>
		<description><![CDATA[I am starting to step outside of the Microsoft realm and into the Linux world. Imagine me balancing on my right leg which is in the Microsoft bucket, slowly and cautiously testing the water in the Linux bucket with my bare left foot. Is the water...]]></description>
			<content:encoded><![CDATA[<p>I am starting to step outside of the Microsoft realm and into the Linux world. Imagine me balancing on my right leg which is in the Microsoft bucket, slowly and cautiously testing the water in the Linux bucket with my bare left foot. Is the water too cold or is it too hot? Hmm, interestingly, the water seems to be quite pleasant.</p>
<p>Recently I migrated core functionality from my home Windows 2000 Server to a new host running ESXi 4.0 with three Ubuntu Server 9.10 VMs. If you want to see a simple diagram on my set up, view my article on <a href="http://www.devtrends.com/index.php/linux-backup-shell-script/" target="_self">Linux Backup Shell Script</a>. One of the core functionality that I migrated was my internal DNS services. Hence the title of this article, DNS Server with Bind9.</p>
<p><strong>bind9</strong></p>
<p>I am impressed, once again, with Linux and the services residing within this amazing operating system. The most amazing part about Linux services is that many of them have been around as long as I have &#8212; where have I been?</p>
<p>Before I begin rambling too much, let&#8217;s get started on creating DNS forward and reverse zones for your local network &#8230;</p>
<p>First ensure you have bind9 installed by running the following command:</p>
<pre style="padding-left: 30px;">whereis bind</pre>
<p><a href="http://www.developingtrends.net/wp-content/uploads/2009/11/whereis.jpg"></a><a href="http://www.developingtrends.net/wp-content/uploads/2009/11/whereis.jpg"><img class="alignnone size-full wp-image-486" title="whereis" src="http://www.developingtrends.net/wp-content/uploads/2009/11/whereis.jpg" alt="whereis" width="523" height="36" /></a></p>
<p>If the results is blank, such as just &#8220;bind: &#8220;, then you will need to install bind9. On Ubuntu, I would imagine the command would look like this:</p>
<pre style="padding-left: 30px;">sudo apt-get install bind9</pre>
<p><strong>Forward Zones</strong></p>
<p>We need to configure your DNS forward zones, which will provide name to address resolution in your internal network. As we progress the configuration, keep in mind that your specific configuration will be slightly different than mine; adapt as needed.</p>
<p>For simple networks, such as mine at home, there are only a few changes that you will need to make for Forward lookup zones. The first file is /etc/bind/db.local.</p>
<p><span style="text-decoration: underline;">/etc/bind/db.local</span></p>
<p>The changes are fairly easy because we going to use most of what is provided in the original file. Change the Start of Authority (SOA) to be the domain environment for your network. My domain is dt.local and my primary DNS server is dtsfile.dt.local. Change the SOA to reflect your choices and also change the nameserver (NS) line to be your primary DNS server.</p>
<p>Also, you will want to add A records for your various servers/computers on the network. For this example, I added my Asterisk server:</p>
<pre style="padding-left: 30px;">dtsvoip.dt.local.	IN	A	192.168.0.11</pre>
<p>The next file to change, which we will also make changes for reverse DNS at the same time, is the /etc/bind/named.conf.default-zones file.</p>
<p><span style="text-decoration: underline;">/etc/bind/named.conf.default-zones</span></p>
<p>The line for the primary zone, which references the /etc/bind/db.local file must state your local domain in the quotes following the zone directive:</p>
<pre style="padding-left: 30px;">zone “dt.local” {
  type master;
  file “/etc/bind/db.local”;
};</pre>
<p>As we have more changes in this file, leave it open and continue to the next section.</p>
<p><strong>Reverse Lookup Zones</strong></p>
<p>As you probably know, a reverse lookup provides a name to an IP address. In Windows you would find the name of 192.168.0.10 by typing “nslookup 192.168.0.10” from a command prompt. If you have configured reverse DNS properly, you will see output similar to this:</p>
<pre style="padding-left: 30px;">C:\&gt;nslookup 192.168.0.10
Server:  dtsfile.dt.local
Address:  192.168.0.10</pre>
<pre style="padding-left: 30px;">Name:    dtsfile.dt.local
Address:  192.168.0.10</pre>
<p>You may be wondering why the entry appears twice. This is because the Server and the name that I am looking up is the same server. If I were to locate my Asterisk server, it would look like this:</p>
<pre style="padding-left: 30px;">C:\&gt;nslookup 192.168.0.11
Server:  dtsfile.dt.local
Address:  192.168.0.10</pre>
<pre style="padding-left: 30px;">Name:    dtsvoip.dt.local
Address:  192.168.0.11
</pre>
<p>On with the configuration…</p>
<p><span style="text-decoration: underline;">/etc/bind/named.conf.default-zones</span></p>
<p>If you were paying attention in the previous section you would still have that file open. Regardless, let’s add another zone to the file that represents our reverse lookup for the IP subnet in your network. In my network I use 192.168.0.0/24 which is the same as saying 192.168.0.0 with a subnet of 255.255.255.0 (192.168.0.0 to 192.168.0.255).</p>
<p>Immediately after the zone directive for your domain, add the following text for your reverse lookup:</p>
<pre style="padding-left: 30px;">zone “0.168.192.in-addr.arpa” {
  type master;
  file “/etc/bind/db.0.168.192”;
};
</pre>
<p>If you&#8217;re sharp, you’ll immediately know that the file db.0.168.192 doesn’t exist. We’ll create it next. And yes, it’s backwards; in reverse DNS lookups the IP address is reversed as part of the requirements set in the RFC and obviously for functionality pointing back to the host name of the IP. Read more: <a href="http://en.wikipedia.org/wiki/Reverse_DNS_lookup" target="_blank">http://en.wikipedia.org/wiki/Reverse_DNS_lookup</a></p>
<p>Save changes to named.conf.default-zones.</p>
<p><span style="text-decoration: underline;">/etc/bind/db.0.168.192</span></p>
<p>Next we’ll create a new zone db file for our newly created reverse lookup. Start by copying db.0 into a new file named db.0.168.192 (or whatever your local subnet IP address is).</p>
<pre style="padding-left: 30px;">cp /etc/bind/db.0 /etc/bind/db.0.168.192
</pre>
<p>Just like in your db.local file, let’s change the SOA to reflect your domain and nameserver. This includes the NS line that should already exist in the file. Now let’s add pointer (PTR) records for your servers/computers on the network. I’ll use mine for examples:</p>
<pre style="padding-left: 30px;">10	IN	PTR	dtsfile.dt.local
11	IN	PTR	dtsvoip.dt.local
</pre>
<p>Save changes to db.0.168.192.</p>
<p><strong>Forwarders</strong></p>
<p>The last section, assuming you want to use this DNS server as your primary DNS on all computers, is to set up a forwarder for all names that are not a part of your network. You will need to edit /etc/bind/named.conf.options.</p>
<p><span style="text-decoration: underline;">/etc/bind/named.conf.options</span></p>
<p>The change is really simple, uncomment the forwarders directive and modify the IP address within to be your local router or your ISP DNS servers. Mine is similar to the following:</p>
<pre style="padding-left: 30px;">forwarders {
  192.168.0.1;
};
</pre>
<p><strong>Local Name Resolution</strong></p>
<p>The final step is to change your /etc/resolv.conf file to point your DNS server and to set the domain and search realm. This is what mine looks like:</p>
<pre style="padding-left: 30px;">domain dt.local
search dt.local
nameserver 192.168.0.1
</pre>
<p><strong>Restart the bind9 daemon</strong></p>
<p>After making all of these changes, the final is to restart the bind9 daemon. Oh, one other step is to change your computers to use this DNS server as the primary.</p>
<p><strong>Configuration Files Examples</strong></p>
<p><span style="text-decoration: underline;">/etc/bind directory listing</span></p>
<pre style="padding-left: 30px;">/etc/bind# ls -la
drwxr-sr-x   2 root bind  4096 2010-08-01 17:52 .
drwxr-xr-x 141 root root 12288 2010-08-01 17:54 ..
-rw-r--r--   1 root root   237 2009-08-19 15:00 db.0
-rw-r--r--   1 root root   271 2009-08-19 15:00 db.127
-rw-r--r--   1 root bind   295 2010-08-01 17:22 db.0.168.192
-rw-r--r--   1 root root   237 2009-08-19 15:00 db.255
-rw-r--r--   1 root root   353 2009-08-19 15:00 db.empty
-rw-r--r--   1 root root   316 2010-08-01 17:14 db.local
-rw-r--r--   1 root root  2940 2009-08-19 15:00 db.root
-rw-r--r--   1 root bind   463 2009-08-19 15:00 named.conf
-rw-r--r--   1 root bind   573 2010-08-01 16:50 named.conf.default-zones
-rw-r--r--   1 root bind   165 2009-08-19 15:00 named.conf.local
-rw-r--r--   1 root bind   570 2010-07-16 11:58 named.conf.options
-rw-r-----   1 bind bind    77 2010-01-30 11:50 rndc.key
-rw-r--r--   1 root root  1317 2009-08-19 15:00 zones.rfc1918</pre>
<p><span style="text-decoration: underline;">./db.0.168.192</span></p>
<pre style="padding-left: 30px;">;
; BIND reverse data file for broadcast zone
;
$TTL    604800
@       IN      SOA     dt.local. dtsfile.dt.local. (
        1         ; Serial
   604800         ; Refresh
    86400         ; Retry
  2419200         ; Expire
   604800 )       ; Negative Cache TTL
;
@       IN      NS      dt.local.
10     IN      PTR     dtsfile.dt.local.
11     IN      PTR     dtsvoip.dt.local.
</pre>
<p><span style="text-decoration: underline;">./db.local</span></p>
<pre style="padding-left: 30px;">;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     dt.local. dtsfile.dt.local. (
        2         ; Serial
   604800         ; Refresh
    86400         ; Retry
  2419200         ; Expire
   604800 )       ; Negative Cache TTL
;
@       IN      NS      dtsfile.dt.local.
@       IN      A       127.0.0.1
@       IN      AAAA    ::1
dtsvoip.dt.local.       IN      A       192.168.0.11
</pre>
<p><span style="text-decoration: underline;">./named.conf.default-zones</span></p>
<pre style="padding-left: 30px;">// prime the server with knowledge of the root servers
zone "." {
  type hint;
  file "/etc/bind/db.root";
};</pre>
<pre style="padding-left: 30px;">// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912</pre>
<pre style="padding-left: 30px;">zone "dt.local" {
  type master;
  file "/etc/bind/db.local";
};</pre>
<pre style="padding-left: 30px;">zone "0.168.192.in-addr.arpa" {
  type master;
  file "/etc/bind/db.0.168.192";
};</pre>
<pre style="padding-left: 30px;">zone "127.in-addr.arpa" {
  type master;
  file "/etc/bind/db.127";
};</pre>
<pre style="padding-left: 30px;">zone "0.in-addr.arpa" {
  type master;
  file "/etc/bind/db.0";
};</pre>
<pre style="padding-left: 30px;">zone "255.in-addr.arpa" {
  type master;
  file "/etc/bind/db.255";
};
</pre>
<p><span style="text-decoration: underline;">./named.conf.options</span></p>
<pre style="padding-left: 30px;">options {
directory "/var/cache/bind";</pre>
<pre style="padding-left: 30px;">// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk.  See http://www.kb.cert.org/vuls/id/800113</pre>
<pre style="padding-left: 30px;">// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.</pre>
<pre style="padding-left: 30px;">forwarders {
  192.168.0.1;
};</pre>
<pre style="padding-left: 30px;">auth-nxdomain no;    # conform to RFC1035
  listen-on-v6 { any; };
};
</pre>
<p><span style="text-decoration: underline;">/etc/resolv.conf</span></p>
<pre style="padding-left: 30px;">domain dt.local
search dt.local
nameserver 192.168.0.1</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/setting-up-a-simple-dns-server-with-bind9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Backup Shell Script</title>
		<link>http://www.devtrends.com/index.php/linux-backup-shell-script/</link>
		<comments>http://www.devtrends.com/index.php/linux-backup-shell-script/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 06:39:39 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=467</guid>
		<description><![CDATA[Once again, I am pushing my knowledge limits with the Linux world. The exciting part is that, the deeper I go, the better Linux gets. Today, it is Shell scripting, which quite frankly puts DOS batch files out of business. Wait a moment, which came...]]></description>
			<content:encoded><![CDATA[<p>Once again, I am pushing my knowledge limits with the Linux world. The exciting part is that, the deeper I go, the better Linux gets. Today, it is Shell scripting, which quite frankly puts DOS batch files out of business. Wait a moment, which came first?</p>
<p>Onward and upward, today I will share a script I use for backing files on my Ubuntu Server. To start off and to help explain what the script does, let me first explain my configuration. I have an ESXi 4.0 server with 3 VMs, all Ubuntu Server instances for Core services (DNS, DHCP, Directory services), Email (Yahoo&#8217;s Zimbra), and File (SAMBA shares, LAMP). All of the servers have 30GB primary partitions, provisioned through VMware and located on an internal 500GB SATA. The File server has a additional partition on the 500GB drive for all SAMBA shares and a partition located on an internal 1TB SATA drive that is used for backup.</p>
<p><a href="http://www.developingtrends.net/wp-content/uploads/2009/11/ESX-network.jpg"><img class="alignnone size-medium wp-image-472" title="ESX network" src="http://www.devtrends.com/wp-content/uploads/2009/11/ESX-network-300x272.jpg" alt="ESX network" width="300" height="272" /></a></p>
<p>The script provides backup functionality for my music, pictures, user&#8217;s folders, et cetera to the backup drive. The secondary partition on the 500GB drive is mounted to /datashare/ and the tertiary partition on the 1TB drive is mounted to /databackup/.</p>
<p><strong>The Script</strong></p>
<pre style="padding-left: 30px;">#!/bin/sh
#####
#  backup files script, version 1.
#
#  this script keeps one tar file per month for 12 months and rsyncs the entire contents
#  to $destination/daily_replica.
#  the idea is to run this script at least once per day to ensure proper sync and monthly tar.
#
#  created by Aaron @ www.devtrends.com
#####

# location of backup files (recursive sub-folders).
backup_files="/datastore/share"

# location to place tar files and /daily_replica/ directory.
destination="/databackup/share"

#### no editing beyong this line is required!
#### function for TARing
funcTar()
{
 options="--create --file="
 echo " -- tar'ing up $1 to $2/$3"
 echo "   \ creating new archive file: $3"
 tar $options$2/$3 $1
 echo "   \ tar backup completed."
}
#### end funcion

#### CREATE MONTHLY TAR FILE
# Create new archive filename.
month=$(date +%m)
year=$(date +%Y)
archive_file="backup-$month.tar"
full_path_archive_file="$destination/$archive_file"

# do I need to create a new monthly archive file?
# check if the file exists
if [ -f $full_path_archive_file ]; then

 # get file date
 filedate=$(stat -c %y $full_path_archive_file)
 # extract only the year of the file
 filedate=${filedate:0:4}

 # check if the file year is not the current year
 if [ ! $filedate == $year ]; then

 # remove old file
 rm $full_path_archive_file
 # create new tar
 funcTar $backup_files $destination $archive_file

 else

 echo " -- no tar'ing required today."

 fi

else

 # create new tar
 funcTar $backup_files $destination $archive_file

fi
#### DONE WITH TAR

#### rsync time...
echo " -- rsync $backup_files to $destination/daily_replica"
rsync -a $backup_files $destination/daily_replica
echo "   \ rsync completed."
####</pre>
<p>If you hate copy and paste, you may download the script <a href="http://www.devtrends.com/downloads/backup_share.zip" target="_blank">here</a>.</p>
<p><strong>Explanation</strong></p>
<p>For those that care, let me explain the script. The first two variables, $backup_files and $destination, should be the only variables you will need to change if you wish to use the script as I do.</p>
<pre style="padding-left: 30px;"># location of backup files (recursive sub-folders).
backup_files="/datastore/share"

# location to place tar files and /daily_replica/ directory.
destination="/databackup/share"</pre>
<p>The next block of code is the function used to create the tar file. The reason I made it into a function is because I use the same block of code twice in the main section of the script. No reason to duplicate code. However, the way I implemented the function may cause a problem if your $backup_files or $destination variables contain spaces. If anyone would like to revised, please share. The $1, $2, et cetera, are the argument variables as passed by the calling statement.</p>
<pre style="padding-left: 30px;">funcTar()
{
 options="--create --file="
 echo " -- tar'ing up $1 to $2/$3"
 echo "   \ creating new archive file: $3"
 tar $options$2/$3 $1
 echo "   \ tar backup completed."
}</pre>
<p>Next I define some variables that I will use throughout the script. The first two are date strings that contain the month (e.g. 11) and the year (e.g. 2009). The third and fourth variables hold the location of the tar file. The tar file name is comprised of the word &#8220;backup-&#8221; and then the variable of the month.</p>
<pre style="padding-left: 30px;">month=$(date +%m)
year=$(date +%Y)
archive_file="backup-$month.tar"
full_path_archive_file="$destination/$archive_file"</pre>
<p>The main section of code is next and consists of a nested if statement. The first if statement checks if a current backup tar file exists, if not, then it will create one, otherwise it will check the status of the current backup tar file. If the current tar file modified date is not in the current year, then it removes that tar file and recreates it, otherwise there is no need to tar anything. The most interesting piece is the substring command, ${filedate:0:4} which only returns characters 0,1,2,3 from the variable $filedate. You will also notice the use of stat, which, depending on your distribution of Linux, you may need to manually acquire.</p>
<pre style="padding-left: 30px;"># do I need to create a new monthly archive file?
# check if the file exists
if [ -f $full_path_archive_file ]; then
 # get file date
 filedate=$(stat -c %y $full_path_archive_file)
 # extract only the year of the file
 filedate=${filedate:0:4}

 # check if the file year is not the current year
 if [ ! $filedate == $year ]; then
  # remove old file
  rm $full_path_archive_file
  # create new tar
  funcTar $backup_files $destination $archive_file
 else
  echo " -- no tar'ing required today."
 fi

else
 # create new tar
 funcTar $backup_files $destination $archive_file
fi</pre>
<p>The last statement is the rsync command which synchronizes the entire content of the $backup_files location to the $destination/daily_replica/ location.</p>
<pre style="padding-left: 30px;">echo " -- rsync $backup_files to $destination/daily_replica"
rsync -a $backup_files $destination/daily_replica
echo "   \ rsync completed."</pre>
<p>Use this script at your own risk. If it turns out it didn&#8217;t back up your stuff, that is entirely your problem, not mine.</p>
<p>-Aaron Gilbert</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/linux-backup-shell-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux Console Modes (80&#215;25 &#8211; really?)</title>
		<link>http://www.devtrends.com/index.php/linux-console-modes-80x25-really/</link>
		<comments>http://www.devtrends.com/index.php/linux-console-modes-80x25-really/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 04:35:04 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Featured 2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[VGA Modes]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=243</guid>
		<description><![CDATA[I grew up using DOS, starting with DOS 2 something. I had a father that never stuck with the default settings, which included modifying the command prompt design/colors and the screen text dimensions of the DOS window. The default was 80 characters or columns wide...]]></description>
			<content:encoded><![CDATA[<p>I grew up using DOS, starting with DOS 2 something. I had a father that never stuck with the default settings, which included modifying the command prompt design/colors and the screen text dimensions of the DOS window. The default was 80 characters or columns wide with 25 lines or rows high, or 80&#215;25. It seems this is STILL the default setting &#8211; I guess old school video modes stick around for quite some time. Regardless, 80&#215;25 does not work for me in Linux &#8211; I have to &#8220;less&#8221; everything to be able to work with the help files, et cetera.</p>
<p><strong>VGA Mode</strong></p>
<p>For those DOS&#8217;ers, do you remember &#8220;mode 80&#8243; or &#8220;mode 40&#8243;? If you know of a quick command for Linux consoles let me know &#8230; otherwise, you can use the tip below to modify your screen resolution.</p>
<p><em><span style="text-decoration: underline;">/boot/grub/menu.lst</span></em></p>
<p>The key to changing the screen mode / screen resolution is to modify the menu.lst file and add the vga=[mode #] some where in the kernel call line &#8211; or at the end of it. After searching the Internet for some time, I compiled a list here of many of the vga modes available:</p>
<pre style="padding-left: 30px;">VGA MODE          MODE#
80x25              3840
80x50              3841
80x43              3842
80x28              3843
80x30              3845
80x34              3846
80x60              3847
320x200x8bit        816
320x200x16bit       782
320x200x32bit       783
320x240x8bit        820
320x240x16bit       821
320x240x32bit       822
640x480x8bit        769
640x480x16bit       785
640x480x32bit       786
800x600x8bit        771
800x600x16bit       788
800x600x32bit       789
1024x768x8bit       773
1024x768x16bit      791
1024x768x32bit      792
1280x800x8bit       864
1280x800x32bit      865
1440x900x8bit       868
1440x900x32bit      869</pre>
<p>On my Ubuntu Server, the kernel line was:</p>
<pre style="padding-left: 30px; white-space: pre-wrap; word-wrap: break-word;">kernel         /vmlinuz-2.6.28-11-server root=/dev/mapper/ubuntuserver-root ro quiet splash</pre>
<p>and I added vga=792 to the end of it:</p>
<pre style="padding-left: 30px; white-space: pre-wrap; word-wrap: break-word;">kernel         /vmlinuz-2.6.28-11-server root=/dev/mapper/ubuntuserver-root ro quiet splash vga=792</pre>
<p>I&#8217;m out&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/linux-console-modes-80x25-really/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSolaris iSCSI Initiator</title>
		<link>http://www.devtrends.com/index.php/opensolaris-iscsi-initiator/</link>
		<comments>http://www.devtrends.com/index.php/opensolaris-iscsi-initiator/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 20:36:54 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Featured 2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[iSCSI]]></category>
		<category><![CDATA[Initiator]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=239</guid>
		<description><![CDATA[As part of my testing phase during the custom SAN project, I was running into performance issues with the Microsoft iSCSI Software Initiator and the OpenSolaris COMSTAR iSCSI target. Although some individuals were running into significant performance issues, such as 600KB/sec writes, my problem was...]]></description>
			<content:encoded><![CDATA[<p>As part of my testing phase during the custom SAN project, I was running into performance issues with the Microsoft iSCSI Software Initiator and the OpenSolaris COMSTAR iSCSI target. Although some individuals were running into significant performance issues, such as 600KB/sec writes, my problem was 30MB/sec writes with 90MB/sec reads. Regardless, that is not the point of this post &#8211; instead I am posting the commands I used for employing SUN&#8217;s iSCSI Initiator during testing between SUN&#8217;s iSCSI target and SUN&#8217;s iSCSI initiator.</p>
<p><strong>SUN iSCSI Initiator</strong></p>
<p>Obviously you need to have your network configured properly prior to working with the iSCSI initiator or targets. In this example, I was working with the iSCSI initiator and target in a lab environment, with the host (target) being 192.168.0.18 and the client (initiator) being 192.168.0.19. Secondly, you will need the iSCSI initiator software to be installed from Package Manager &#8211; easiest way is to search for iscsi and ensure all four of those packages are installed.</p>
<p>For this example we will use Send Targets for discovering iSCSI targets/paths:</p>
<pre style="padding-left: 30px;">iscsiadm add discovery-address 192.168.0.18:3260
iscsiadm modify discovery --sendtargets enable</pre>
<p>Now that you have added the discovery address of the iSCSI target and enabled the discovery &#8220;Send Targets&#8221;, check to see if your target was discovered:</p>
<pre style="padding-left: 30px;">iscsiadm list target</pre>
<p>If you saw the targets you were expecting, the next step is to create the device links between iSCSI and your system &#8211; so you can see the iSCSI LUN as a disk on your system.</p>
<pre style="padding-left: 30px;">devfsadm -i iscsi</pre>
<p>Check the available disks on your system using the format command. After running the format command, hit CTRL-C to bounce back to the terminal prompt.</p>
<p><strong>Using / Mounting the iSCSI LUN</strong></p>
<p>Now that you have the iSCSI initiator working properly and the iSCSI targets discovered, lets actually use the new iSCSI disk with ZFS.</p>
<p>First we need to create the ZFS pool using the new disk. If you forgot the name of the new disk, you can learn it using the format command. If it is anything like the one on my OpenSolaris box, the name is rather large, (c0t600144F0F9A00C0000004AA9510A0001d0):</p>
<pre style="padding-left: 30px;">zpool create diskpool c0t600144F0F9A00C0000004AA9510A0001d0</pre>
<p>To verify the pool was created, use:</p>
<pre style="padding-left: 30px;">zpool list</pre>
<p>Now we can create a ZFS file system on top of that pool:</p>
<pre style="padding-left: 30px;">zfs create diskpool/test</pre>
<p>Check your new ZFS filesystem was created:</p>
<pre style="padding-left: 30px;">zfs list</pre>
<p>And now you can create files within the mount point:</p>
<pre style="padding-left: 30px;">root@opensolaris:/diskpool/test/#</pre>
<p>Everything you write to that mount point will be written to the iSCSI target, as one would hope.</p>
<p>Good luck with your performance!</p>
<p><strong>Credits</strong></p>
<p><a href="http://wikis.sun.com/display/OpenSolarisInfo/How+to+Configure+an+iSCSI+Initiator" target="_blank">http://wikis.sun.com/display/OpenSolarisInfo/How+to+Configure+an+iSCSI+Initiator</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/opensolaris-iscsi-initiator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSolaris iSCSI Target</title>
		<link>http://www.devtrends.com/index.php/opensolaris-iscsi-target/</link>
		<comments>http://www.devtrends.com/index.php/opensolaris-iscsi-target/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 22:05:30 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[iSCSI]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=227</guid>
		<description><![CDATA[After spending a good amount of time on the iSCSI Enterprise Target (IET) solution and running into compatibility issues with VMware ESX 3.5 and 4.0, I decided to move on to other solutions. After reading up on the ZFS file system and how the features...]]></description>
			<content:encoded><![CDATA[<p>After spending a good amount of time on the iSCSI Enterprise Target (IET) solution and running into compatibility issues with VMware ESX 3.5 and 4.0, I decided to move on to other solutions. After reading up on the ZFS file system and how the features inclusive in ZFS would benefit any storage solution, I decided to move into the OpenSolaris world. Additionally, SUN has included their two variations of iSCSI targets in OpenSolaris and SUN provides support options. Needless to say, in my specific situation, OpenSolaris is a better solution to the “free” iSCSI target.</p>
<p>I owe some of my new-found knowledge to my friend Chuck Hechler and the remaining to Mike La Spina (<a href="http://blog.laspina.ca/">http://blog.laspina.ca/</a>). I don’t pretend to be anywhere as knowledgeable about OpenSolaris, ZFS, iSCSI, SANs, or storage in general as Mike or Chuck, however, I can create SharePoint workflow actions in VisualStudio, can they? =)</p>
<p><strong>The Equipment</strong></p>
<p>If you read my other posts on the IET and RedHat implementation, you would know that I created a custom server housed in a SuperMicro case. During the testing phase of that project, I learned that the IET product does not work well with the LSI MegaRAID 84016 controller, specifically when using RAID5. Unsure why, however, in OpenSolaris, I had an issue with our Adaptec 31605 controller and ended up using the LSI MegaRAID 84016E controller. Works like a charm. I mention this as you will need to verify that the equipment you are going to use with OpenSolaris should be supported by OpenSolaris (<a href="http://www.sun.com/bigadmin/hcl/">http://www.sun.com/bigadmin/hcl/</a>).</p>
<p>If you want more information on the hardware specifications for the system I used, please review my <a href="http://www.devtrends.com/index.php/custom-storage-server-supermicro-3u-case/" target="_self">Custom Server Case</a> article.</p>
<p><strong>OpenSolaris Configuration</strong></p>
<p>Using OpenSolaris to serve as an iSCSI target is surprisingly easy to configure. I say surprisingly because the same implementation in RedHat was thoroughly difficult, both due to a learning curve and due to many complications with functionality. On to OpenSolaris!</p>
<p>As I designed this system, I was focused on using ZFS as the sole solution for disk management and the file system. In other words, for my boot disks, I created a ZFS mirror and for the iSCSI LUN disks I created a ZFS raidz2.</p>
<p><strong><em>Installation</em></strong></p>
<p>For the most part, the default installation settings were used. Too be honest, the options during installation of OpenSolaris are limited. If you do not want the graphical interface, see my short article, <a href="http://www.devtrends.com/index.php/disable-gui-gdm-in-opensolaris/" target="_self">Disable GUI</a>, for disabling it after installation.</p>
<p><strong><em>ZFS</em></strong></p>
<p><em><span style="text-decoration: underline;">Boot pool – mirror</span></em></p>
<p>Mirroring the boot partition is about as difficult as it gets with this article. I did not figure out how to mirror the boot disk on my own. Using the steps in the following blog post, I managed to mirror my ZFS boot partition, rpool.</p>
<p><a href="http://darkstar-solaris.blogspot.com/2008/09/zfs-root-mirror.html">http://darkstar-solaris.blogspot.com/2008/09/zfs-root-mirror.html</a><br />
If you do not know the devices names of your drives, you can use “# format” to list the drives/devices on your system.</p>
<p>After the mirroring has been completed, display the status of the pool using the command and output below:</p>
<pre style="padding-left: 30px;"># zpool status
  pool: rpool
 state: ONLINE
 scrub: none requested
config:</pre>
<pre style="padding-left: 30px;"> NAME        STATE     READ WRITE CKSUM
 rpool       ONLINE       0     0     0
   mirror    ONLINE       0     0     0
     c8d0s0  ONLINE       0     0     0
     c9d0s0  ONLINE       0     0     0</pre>
<pre style="padding-left: 30px;">errors: No known data errors</pre>
<p><span style="text-decoration: underline;"><em>iSCSI pool – raidz2</em></span></p>
<p>After reading quite a few posts on best practices for ZFS pools, I propose that you use a raidz set per controller. In my instance, I had a 16 port controller and all 16 drives for the iSCSI pool were connected to this controller. Using the following commands I created a raidz2 pool with 2 spares:</p>
<pre style="padding-left: 30px;"># zpool create diskpool raidz2 c7t0d0 c7t1d0 c7t2d0 c7t3d0 c7t4d0 c7t5d0 c7t6d0 c7t7d0 c7t8d0 c7t9d0 c7t10d0 c7t11d0 c7t12d0 c7t13d0
# zpool add diskpool spare c7t14d0 c7t15d0</pre>
<p>That is it; we just created a large disk pool of 16 disks, 14 in a dual-parity set for volumes and 2 for spares. Easy? Yes.</p>
<p><span style="text-decoration: underline;"><em>Volumes</em></span></p>
<p>Best practice for creating ZFS volumes depends on your perspective. In my case, the iSCSI target will be used with VMware and I will create a new ZFS volume and iSCSI view for each VMware machine (not host). Follow the command below to create the base mountpoint in the ZFS pool:</p>
<pre style="padding-left: 30px;"># zfs create diskpool/iscsi</pre>
<p>Next we will create a volume for sharing as an iSCSI target. As I stated above, I create one volume per VM. Also, notice the “-b 64K”, which helps with partition alignment in VMware. The command “-V 40G” creates a volume with a maximum size of 40 gigabyes – keep in mind that ZFS will thin provision the file system.</p>
<pre style="padding-left: 30px;"># zfs create -s -b 64K -V 40G diskpool/iscsi/lun0_vm</pre>
<p>Display the pool and the ZFS volumes as shown below:</p>
<pre style="padding-left: 30px;"># zpool status
  pool: diskpool
 state: ONLINE
 scrub: resilver completed after 0h32m with 0 errors on Wed Sep  2 10:52:54 2009
config:</pre>
<pre style="padding-left: 30px;"> NAME           STATE     READ WRITE CKSUM
 diskpool       ONLINE       0     0     0
   raidz2       ONLINE       0     0     0
     c7t0d0     ONLINE       0     0     0
     c7t1d0     ONLINE       0     0     0
     c7t2d0     ONLINE       0     0     0
     c7t3d0     ONLINE       0     0     0
     c7t4d0     ONLINE       0     0     0
     c7t5d0     ONLINE       0     0     0�
     c7t6d0     ONLINE       0     0     0
     c7t7d0     ONLINE       0     0     0
     c7t8d0     ONLINE       0     0     0
     c7t9d0     ONLINE       0     0     0�
     c7t10d0    ONLINE       0     0     0
     c7t11d0    ONLINE       0     0     0�
     c7t12d0    ONLINE       0     0     0
     c7t13d0    ONLINE       0     0     0�
 spares
   c7t14d0      AVAIL
   c7t15d0      AVAIL</pre>
<pre style="padding-left: 30px;">errors: No known data errors</pre>
<pre style="padding-left: 30px;">  pool: rpool
 state: ONLINE
 scrub: none requested
config:</pre>
<pre style="padding-left: 30px;"> NAME        STATE     READ WRITE CKSUM
 rpool       ONLINE       0     0     0
   mirror    ONLINE       0     0     0
     c8d0s0  ONLINE       0     0     0
     c9d0s0  ONLINE       0     0     0</pre>
<pre style="padding-left: 30px;">errors: No known data errors</pre>
<pre style="padding-left: 30px;"># zfs list
NAME                             USED  AVAIL  REFER  MOUNTPOINT
diskpool                         9.9G  6.76T  51.1K  /diskpool
diskpool/iscsi                   9.9G  6.76T  48.5K  /diskpool/iscsi
diskpool/iscsi/lun0_vm     9.9G  6.76T   9.9G  -
rpool                           10.8G  62.1G  77.5K  /rpool
rpool/ROOT                      3.18G  62.1G    19K  legacy
rpool/ROOT/opensolaris          3.18G  62.1G  3.04G  /
rpool/dump                      3.75G  62.1G  3.75G  -
rpool/export                     114M  62.1G    21K  /export
rpool/export/home                114M  62.1G    21K  /export/home
rpool/export/home/vcssan         114M  62.1G   114M  /export/home/vcssan
rpool/swap                      3.75G  65.7G   101M  -</pre>
<p><strong><em>Network</em></strong></p>
<p>There are a few approaches to spreading the load across multiple links, my favorite is LACP, which is what I used – see my article on LACPBONDING. The other option that may arise in the planning phase is IPMP. However, I was unable to overcome the issue of having more than one inbound interface. If you are knowledgeable with source addressing, you will have better luck than I did.</p>
<p>I aggregated 4 gigabit links together using LACP and a Dell PowerConnect 5448 switch.</p>
<p><strong><em>iSCSI</em></strong></p>
<p>During the design phase, I tested both of SUN’s iSCSI targets, the standard iscsitadm and COMSTAR iSCSI. At this point, you can choose one based on word of mouth, or you can try both and use the one that works the best for you. I ended up using COMSTAR.</p>
<p><span style="text-decoration: underline;"><em>iscsitadm</em></span></p>
<p>The first configuration change we will make defines which interfaces the iSCSI target software will use. We accomplish this by creating a target group:</p>
<pre style="padding-left: 30px;"># iscsitadm create tpgt 1
# iscsitadm modify tpgt –i 192.168.0.101 1</pre>
<p>Because I am using link aggregation there is only one IP address to add to the group. If you decide to use multi-pathing as provided by VMware, you will need to add all of those IP addresses to the group.</p>
<p>Are you ready for the next statement, it is very complex…well, maybe not.</p>
<pre style="padding-left: 30px;"># zfs set shareiscsi=on diskpool/iscsi/lun0_vm</pre>
<p>That’s it; the ZFS volume is now served through the iSCSI target.</p>
<p><span style="text-decoration: underline;"><em>COMSTAR</em></span></p>
<p>On a default installation of OpenSolaris, you will need to install the COMSTAR iSCSI software package. Open the Package Manager and search for iSCSI, choose to install all of them, specifically the SUNWiscsit package.</p>
<p><a href="http://www.developingtrends.net/wp-content/uploads/2009/09/packagemanager.jpg"><img class="alignnone size-medium wp-image-229" title="packagemanager" src="http://www.devtrends.com/wp-content/uploads/2009/09/packagemanager-300x233.jpg" alt="packagemanager" width="300" height="233" /></a></p>
<p>After you have installed the software package, you will need to enable the COMSTAR iSCSI service:</p>
<pre style="padding-left: 30px;"># svcadm enable -r svc:/network/iscsi/target:default</pre>
<p>I am having a vague recollection that you may need to restart OpenSolaris before continuing…</p>
<p>The next configuration we will make defines which interfaces the iSCSI target software will use. We accomplish this by creating a target group and target:</p>
<pre style="padding-left: 30px;"># itadm create-tpg iscsi0 192.168.0.101
# itadm create-target –t iscsi0</pre>
<p>Now, we will share the ZFS volume through the COMSTAR iSCSI target – this is a two step process:</p>
<pre style="padding-left: 30px;"># sbdadm create-lu /dev/zvol/rdsk/diskpool/iscsi/lun0_vm</pre>
<p>Now let’s check for the new logical unit and remember the GUID… as we will use it in the next command:</p>
<pre style="padding-left: 30px;"># sbdadm list-lu</pre>
<pre style="padding-left: 30px;">Found 1 LU(s)</pre>
<pre style="padding-left: 30px;">       GUID                    DATA SIZE           SOURCE
--------------------------------  -------------------  ----------------
600144f08e6c0f0000004a8331d70002      42949607424      /dev/zvol/rdsk/diskpool/iscsi/lun0_vm</pre>
<p>Now we will add the view to share the ZFS volume through iSCSI:</p>
<pre style="padding-left: 30px;"># stmfadm add-view 600144f08e6c0f0000004a8331d70002</pre>
<p>That’s it!</p>
<p>I’m out….</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/opensolaris-iscsi-target/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OpenSolaris Link Aggregation with LACP</title>
		<link>http://www.devtrends.com/index.php/opensolaris-link-aggregation-with-lacp/</link>
		<comments>http://www.devtrends.com/index.php/opensolaris-link-aggregation-with-lacp/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 19:27:00 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[LACP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Teaming]]></category>
		<category><![CDATA[Link Aggregation]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=223</guid>
		<description><![CDATA[So which is it? What is your favorite Linux? Transitioning from the clunky &#8220;bonding&#8221; in RedHat to the ease of configuring link aggregation in OpenSolaris &#8211; among other things &#8211; I am beginning to love OpenSolaris. Creating the Link Aggregate If your configuration was similar...]]></description>
			<content:encoded><![CDATA[<p>So which is it? What is your favorite Linux? Transitioning from the clunky &#8220;bonding&#8221; in RedHat to the ease of configuring link aggregation in OpenSolaris &#8211; among other things &#8211; I am beginning to love OpenSolaris.</p>
<p><strong>Creating the Link Aggregate</strong></p>
<p>If your configuration was similar to mine, you will already have your interfaces plumbed &#8211; which means they cannot be added to the link aggregate until they are unplumb&#8217;ed.</p>
<p><em><span style="text-decoration: underline;">Checking for Plumbing</span></em></p>
<p>If you try to create an aggregate with plumbed interfaces, you will receive a &#8220;dladm: create operation failed: link busy&#8221; error. You can check if they have been plumbed as they will show in the list for &#8220;ifconfig -a&#8221;:</p>
<pre style="PADDING-LEFT: 30px">e1000g0: flags=1000842&lt;BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 8
 inet 0.0.0.0 netmask 0
 ether 0:15:17:b8:47:a8
e1000g1: flags=1000842&lt;BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 9
 inet 0.0.0.0 netmask 0
 ether 0:15:17:b8:47:a9
e1000g2: flags=1000842&lt;BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 10
 inet 0.0.0.0 netmask 0
 ether 0:15:17:b8:47:aa
e1000g3: flags=1000842&lt;BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 11
 inet 0.0.0.0 netmask 0
 ether 0:15:17:b8:47:ab</pre>
<p>If they appear, as shown above, unplumb them using the following commands:</p>
<pre style="PADDING-LEFT: 30px">ifconfig e1000g0 unplumb
ifconfig e1000g1 unplumb
ifconfig e1000g2 unplumb
ifconfig e1000g3 unplumb</pre>
<p><span style="text-decoration: underline;"><em>Create the Aggregate and Plumb It!</em></span></p>
<p>Using the dladm tool, you can easily create the aggregate usign the following command:</p>
<pre style="PADDING-LEFT: 30px">dladm create-aggr -d e1000g0 -d e1000g1 -d e1000g2 -d e1000g3 1</pre>
<p>You&#8217;lll notice a -d with each interface and a number 1 at the end. The number 1 references the aggregate number and it must start at 1, not 0.</p>
<p>Next we will plumb the newly created aggregate with an IP address:</p>
<pre style="PADDING-LEFT: 30px">ifconfig aggr1 plumb 192.168.0.101 up</pre>
<p><span style="text-decoration: underline;"><em>Show me the Aggregate</em></span></p>
<p>If you are like me, then you will want to see the aggregate configured:</p>
<pre style="PADDING-LEFT: 30px">dladm show-aggr</pre>
<p>You should see an output similar to the following:</p>
<pre style="PADDING-LEFT: 30px">LINK            POLICY   ADDRPOLICY           LACPACTIVITY  LACPTIMER   FLAGS
aggr1           L4       auto                 off           short       -----</pre>
<p><strong>Modify Aggregate for LACP</strong></p>
<p>To ensure that LACP is functioning as I would hope, I modified the aggregate, changing LACPACTIVITY to active instead of off. Use the following command to modify LACPACTIVITY:</p>
<pre style="padding-left: 30px;">dladm modify-aggr -L active -T short 1</pre>
<p>Now run the following command to verify the settings took:</p>
<pre style="padding-left: 30px;">dladm show-aggr</pre>
<p>You should now see an output similar to the following:</p>
<pre style="padding-left: 30px;">LINK            POLICY   ADDRPOLICY           LACPACTIVITY  LACPTIMER   FLAGS
aggr1           L4       auto                 active        short       -----</pre>
<p><strong>Setting Aggregate IP Configuration as Persistent</strong></p>
<p>To ensure that your IP address configuration for the aggregate is persistent across reboots, modify the /etc/hostname.aggr1 file and add the desired IP address. The /etc/hostname.aggr1 should contain one line consisting of the IP address:</p>
<pre style="padding-left: 30px;">192.168.0.101</pre>
<p><strong>Switch Configuration</strong></p>
<p>Obviously, you must configure the switch for LACP otherwise your aggregate will fail. Each switch is different, refer to the manual for your switch.</p>
<p> </p>
<p>I&#8217;m out&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/opensolaris-link-aggregation-with-lacp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disable GUI (GDM) in OpenSolaris</title>
		<link>http://www.devtrends.com/index.php/disable-gui-gdm-in-opensolaris/</link>
		<comments>http://www.devtrends.com/index.php/disable-gui-gdm-in-opensolaris/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 18:17:40 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[GDM]]></category>
		<category><![CDATA[GUI]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=221</guid>
		<description><![CDATA[Recently I have been working on an iSCSI target using SUN&#8217;s OpenSolaris and SUN&#8217;s iSCSI target, COMSTAR. After installing and configuring OpenSolaris I wanted to disable the GUI to save on resources. Forunately this is easy with OpenSolaris. Disable GUI To disable the GUI, type...]]></description>
			<content:encoded><![CDATA[<p>Recently I have been working on an iSCSI target using SUN&#8217;s OpenSolaris and SUN&#8217;s iSCSI target, COMSTAR. After installing and configuring OpenSolaris I wanted to disable the GUI to save on resources. Forunately this is easy with OpenSolaris.</p>
<p><strong>Disable GUI</strong></p>
<p>To disable the GUI, type the following command in a terminal window:</p>
<p>pfexec svcadm disable gdm</p>
<p><strong>Enable GUI</strong></p>
<p>To enable the GUI, type the following command at the terminal prompt:</p>
<p>pfexec svcadm enable gdm</p>
<p> </p>
<p>I&#8217;m out&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/disable-gui-gdm-in-opensolaris/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Custom iSCSI (IET) with VMware ESX</title>
		<link>http://www.devtrends.com/index.php/custom-iscsi-with-vmware-esx-no-go/</link>
		<comments>http://www.devtrends.com/index.php/custom-iscsi-with-vmware-esx-no-go/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 20:17:58 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[ESX 4.0]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[iSCSI]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[IET]]></category>
		<category><![CDATA[RedHat]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=163</guid>
		<description><![CDATA[As mentioned in my articles on building a custom server case and the iSCSI Enterprise Target on RedHat Enterprise Linux 5.3, sometimes there is the need to facilitate stiff project requirements while spending nearly nothing. In a booming economy, it is unlikely that you would...]]></description>
			<content:encoded><![CDATA[<p>As mentioned in my articles on building a custom server case and the iSCSI Enterprise Target on RedHat Enterprise Linux 5.3, sometimes there is the need to facilitate stiff project requirements while spending nearly nothing. In a booming economy, it is unlikely that you would need to create your own production/enterprise worthy SAN environment. There is a reason a SAN is so expensive, even without the expensive SAS drives; it&#8217;s called engineering and manufacturing!</p>
<p>This article discusses issues I have come across while building or testing opensource iSCSI target software with various iSCSI initiators. I began testing the IET product on Ubuntu Server 8.04 with VMware ESXi 3.5, which worked well in a segregated lab. Then I moved forward to testing a &#8220;production&#8221; IET target with Microsoft&#8217;s iSCSI Software Initiator, which also worked exceptionally well. Finally, I moved into the VMware ESX 3.5 realm, which did not go well at all, initially.</p>
<p><strong>Test 1: VMware ESXi 3.5 and Ubuntu Server 8.04, iSCSI Enterprise Target (IET)</strong></p>
<p>The test was a combination of feasibility and reliability, with an emphasis on the feasibility aspect. For the Ubuntu Server that served as an iSCSI target, I used an older 1U Dell PowerEdge 850 server. The network fabric was a HP ProCurve 48 port switch, which was used for both the standard network environment in the lab and the iSCSI network.</p>
<p>The test went well with a new VM build to the iSCSI target of Windows Server 2003. Heck yes. The feasibility was there as it took an afternoon to make it happen. The reliability was also there, especially since everyone touts Linux as the most solid operating system in the world.</p>
<p><strong>Test 2: Microsoft iSCSI Initiator and IET</strong></p>
<p><a href="http://iscsitarget.sourceforge.net/">http://iscsitarget.sourceforge.net/</a><br />
<a href="http://www.microsoft.com/windowsserver2003/technologies/storage/iscsi/default.mspx">http://www.microsoft.com/windowsserver2003/technologies/storage/iscsi/default.mspx</a></p>
<p>Although I am a Microsoft guy by trade, when it comes to new technology I am generally weary of Microsoft&#8217;s implementation as a solid product. However, during my testing of the iSCSI Enterprise Target (IET) opensource target software (0.4.17), I have had absolutely no issues or concerns. After testing in a production lab environment, we moved to testing with our backup to disk project. In this instance, the iSCSI target is used for backups to disk and is hammered almost 24/7 by EMC Retrospect through the Microsoft iSCSI Software Initiator. The product has been running strong for 3 months as of 8/1/2009.</p>
<p><strong>Test 3: VMware ESX 3.5 to 4.0 and IET</strong></p>
<p>If you notice the title of this third test, you may gather that the initial testing did not go as well as was anticipated. In fact, I had a heck of a time getting the ESX 3.5 software iSCSI to even see the IET target from the start. At first I though the configuration was invalid, however, the Microsoft iSCSI Software Initiator worked exceptionally well with the same target with no reconfigurations.</p>
<p>To FINALLY get to a semi-solid state, I began with simplification&#8230;</p>
<p><em><span style="text-decoration: underline;">Simplify</span></em></p>
<p>As this was the third test, following two successful tests, I decided that I would enter the test with more features enabled, such as multipathing or bonding. This ended up over-complicating the project as there are some known issues with multipathing IET with VMware. To help resolve the issues with connectivity and failures, I went back to one gigabit link, no bonding or multipathing.</p>
<p><em><span style="text-decoration: underline;">Upgrade ESX host from 3.5 to 4.0</span></em></p>
<p>Following a technical support call with VMware, I decided to upgrade ESX to vSphere 4. The technical support person wanted me to update ESX 3.5 to the latest build, so I figured, let&#8217;s jump to the next level (should I have revisited &#8220;simplify&#8221;??).</p>
<p>Immediately following the ESX 4.0 installation, I was able to see the iSCSI LUNS. However, I was not able to use them as I kept receiving an error message about not being able to get disk information. If I remember correctly, this was resolved by using &#8220;blockio&#8221; type on the IET LUNs instead of &#8220;fileio&#8221;.</p>
<p><span style="text-decoration: underline;"><em>Modify IETd.conf to match ESX iSCSI settings</em></span></p>
<p>This change was to ensure that the VMware iSCSI software initiator shared the same &#8220;mindset&#8221; as the IET target. If I remember correctly, only ESX 4 hosts can modify the iSCSI initiator settings.</p>
<p><strong>Conclusion</strong></p>
<p>After running into a list of complexities getting IET to work well with VMware, I finally got it to play nicely for almost 2 weeks. And then&#8230;I received the an &#8220;unknown command&#8221; error in /var/log/messages and the IET target software jammed up causing the VMware virtual machines to lock up.</p>
<p>From my perspective, enough time has been given to IET and I do not feel as though it is ready for VMware &#8211; or that VMware is ready for it. I am, therefore, moving forward with OpenSolaris for two reasons, built in iSCSI target and ZFS. More to come&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/custom-iscsi-with-vmware-esx-no-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile and Install iSCSI Enterprise Target (IET) on RedHat Enterprise Linux (RHEL) 5.3</title>
		<link>http://www.devtrends.com/index.php/compile-and-install-iscsi-enterprise-target-iet-on-redhat-enterprise-linux-rhel-53/</link>
		<comments>http://www.devtrends.com/index.php/compile-and-install-iscsi-enterprise-target-iet-on-redhat-enterprise-linux-rhel-53/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 21:30:25 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[iSCSI]]></category>
		<category><![CDATA[IET]]></category>
		<category><![CDATA[iSCSI Enterprise Target]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[RHEL]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=132</guid>
		<description><![CDATA[In this article, I am going to share what I learned while working with the IET on RHEL. Because I am fairly stubborn, I persisted that I use the latest IET, which at the time was 0.4.17. The unfortunate part was that I could not...]]></description>
			<content:encoded><![CDATA[<p>In this article, I am going to share what I learned while working with the IET on RHEL. Because I am fairly stubborn, I persisted that I use the latest IET, which at the time was 0.4.17. The unfortunate part was that I could not find an RPM for that version of IET; I could only find 0.4.15, which is about 2 years old. I wanted the most recent stable version!</p>
<p>The project behind this article was to create a cheap iSCSI SAN for a backup to disk solution. The requirements of the project were foremost price, second were space, and third were performance. Amazingly, or should I say surprisingly, all three requirements were met, and in a short amount of time! In another article I will explain the custom server and the issues I had building a custom server system that could support large (10TB+) disk arrays. On to iSCSI…</p>
<p><strong>Installing RHEL</strong></p>
<p>For those that have installed RHEL, it is a fairly simple process, easy enough for any end user really, with the exception of partitioning if RHEL can’t figure out the correct disk order. Do what you will, however, for this project I installed RHEL with no firewall and disabled SELinux. If you are building a test machine, make sure you have enough space available for an additional partition to be served by IET.</p>
<p>Note: if you have no Internet connection while installing RHEL or you do not want to enter your installation key (subscription code), you may activate the RedHat Network (RHN) connection after you have completed your installation. To do so, from a terminal window, run rhn_register.</p>
<p><strong>Configuring and Preparing RHEL for IET</strong></p>
<p>In order to compile IET, you must configure RHEL with additional applications, another download repository, and kernel development files. First, I would suggest running a “yum update” from a terminal window to update your RHEL. As a side note, all of these commands assume you are root. Be sure to configure network connectivity, especially to the Internet.</p>
<p><em>Extra Packages for Enterprise Linux (EPEL)</em></p>
<p>Next, let’s configure RHEL to use an additional download repository, EPEL. From the web browser in RHEL, browse to the following link:<br />
<a href="http://fedoraproject.org/wiki/EPEL">http://fedoraproject.org/wiki/EPEL</a></p>
<p>Click on 1.1 Getting Started with EPEL, then click on How to use EPEL. Then under the Using EPEL heading, click on the RHEL 5 link which allow you to download an RPM to configure the EPEL on your RHEL.</p>
<p>For those that are unaware, EPEL is a repository that contains considerably more applications ready for installation through “yum” or the GUI package manager. The EPEL project is maintained by Fedora, which is essentially RedHat’s open source Linux.</p>
<p><em>Installing Development Files</em></p>
<p>In order to compile IET on your RHEL, you will need the following development files installed. This task is easy as “yum” will do all the work for you. From a terminal window, run the following commands:</p>
<p>“yum install openssl-devel”<br />
“yum install kernel-devel”<br />
“yum install kernel-PAE-devel” (32bit RHEL only)<br />
“yum install gcc”</p>
<p>Although not required, since I am a Windows administrator by trade, I have been rebooting my RHEL server after I completed these updates.</p>
<p><strong>Compile IET</strong></p>
<p>Using your web browser, visit <a href="http://iscsitarget.sourceforge.net/">http://iscsitarget.sourceforge.net/</a> and download the latest version of IET, which at the time of this article is 0.4.17. Once downloaded, extract the files to your Desktop and open a terminal window to that location. Such as /~/Desktop/iscsitarget/.</p>
<p>From the iscsitarget folder in the terminal window, run “make”, verify for success and then run “make install”. Assuming all went well, you should now have the IET installed on your RHEL.</p>
<p><strong>Configure IET</strong></p>
<p>Let’s configure the IET application to serve a partition. Although in this example I will use a SCSI disk device, you can use the LVM to create your own unique disks and serve those through IET.</p>
<p>The configuration is fairly simple, replaced with your favorite editor tool from the terminal window, type “nano /etc/ietd.conf”. Until you feel like diving deeper into the IET world, you will only modify two lines in this file, the Target and Lun lines.</p>
<p>Modify the file to look similar to the following:</p>
<p>Target iqn.2009-07.test:iscsi.disk<br />
     Lun 0 Path=/dev/sdb,Type=fileio</p>
<p>You may modify the iSCSI target name, just make sure it follows the iSCSI standard. Additionally, you will need to replace the path statement with the path to your disk. To add more than one Target to the same server, just duplicate those lines, such as:</p>
<p>Target iqn.2009-07.test:iscsi.diska<br />
     Lun 0 Path=/dev/sdb,Type=fileio</p>
<p>Target iqn.2009-07.test:iscsi.diskb<br />
     Lun 0 Path=/dev/sdc,Type=fileio</p>
<p><strong>Starting IET</strong></p>
<p>As you probably know, in RHEL “services” reside within the /etc/init.d/ directory. Using the following command from a terminal window we will start the iscsitarget service:</p>
<p>/etc/init.d/iscsi-target start</p>
<p>To stop the service, run:</p>
<p>/etc/init.d/iscsi-target stop</p>
<p><strong>Testing IET</strong></p>
<p>For simplistic testing of the iSCSI target connectivity, I would suggest using the Microsoft iSCSI software initiator found at: <a href="http://www.microsoft.com/iscsi/">http://www.microsoft.com/iscsi/</a>. Within the Microsoft iSCSI Initiator, add the IP address of the RHEL server to the discovery list and then refresh the available targets. Once you connect to a target/LUN, you will need to open Disk Management to initialize and/or format the disk.</p>
<p>Depending on the hardware set up, you should see fairly quick speeds. For a simple speed test, copy a large file, such as a 3GB file to the iSCSI disk from the Windows machine. In my tests, using an Adaptec 31605 with 1.5TB Seagate drives, a 3GB file would take around 50 seconds to complete – roughly 1GB / minute.</p>
<p><strong>Auto Start IET</strong></p>
<p>If you want the IET to automatically start at system boot up, use the following commands from a terminal window:</p>
<p>“chkconfig &#8211;add iscsi-target”<br />
“chkconfig iscsi-target on”</p>
<p> </p>
<p>That is it for now…if you have questions, let me know.</p>
<p>As time progresses, I will update an article with troubleshooting tips I have learned while configuring around 5 of these systems. Additionally, if you are really interested in IET, I would suggest joining the Nabble forum group at: <a href="http://www.nabble.com/iSCSI-Enterprise-Target-f4401.html">http://www.nabble.com/iSCSI-Enterprise-Target-f4401.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/compile-and-install-iscsi-enterprise-target-iet-on-redhat-enterprise-linux-rhel-53/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PPD Files</title>
		<link>http://www.devtrends.com/index.php/ppd-files/</link>
		<comments>http://www.devtrends.com/index.php/ppd-files/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 02:51:47 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Printing]]></category>
		<category><![CDATA[PPD]]></category>
		<category><![CDATA[Xerox]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=26</guid>
		<description><![CDATA[During a recent printer deploy project, I had two requirements that I had some difficulty resolving: (a) color control for Xerox printers for both Windows and Mac; and (b) permanently disabling banner sheets. The specific configuration was that all print jobs are sent through a...]]></description>
			<content:encoded><![CDATA[<p>During a recent printer deploy project, I had two requirements that I had some difficulty resolving: (a) color control for Xerox printers for both Windows and Mac; and (b) permanently disabling banner sheets.</p>
<p>The specific configuration was that all print jobs are sent through a Windows print server, serving Windows natively and Mac through Unix services Line Printer Daemon (LPD).</p>
<p>For Windows, I was able to control the color output and banner pages through features in the driver configuration on the server, which propagated to all Windows machines. Obviously, this propagation does not happen for LPD on a Mac. Even if the specific queue in Windows is set to BW only and no banner, a color job from a Mac still produces color and the banner is still produced.</p>
<p>The resolution? Modify the Mac PPD for each print queue.</p>
<h2>PPD?</h2>
<p>A PPD is a PostScript Printer Definition, a text based configuration file that defines the scope of the printer, such as the capabilities, defaults and restrictions.</p>
<p>Since PPD files are based on PostScript, how a PPD is defined is determined by Adobe. Please visit the following link for more information: <a href="http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf">http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf</a></p>
<h2>Xerox PPD and Color Control</h2>
<p>The Xerox printer driver for Mac has a PPD that defines that printer. Inside the PPD I modified two lines to disable color output:</p>
<p>*ColorDevice: False<br />
*DefaultColorSpace: Gray</p>
<p>Although I changed both, it was only at the time that I changed the DefaultColorSpace that the color output stopped. Even though the Mac user still has the option to specify color at print time, the output will remain BW.</p>
<h2>Xerox PPD and Banner Page</h2>
<p>In the same PPD, I modified one tag that permanently removed banner pages:</p>
<p>*DefaultJCLBanner: False</p>
<h2>PPD Location</h2>
<p>In the Mac environment, custom English PPD files are located in:<br />
\Hard Drive\Library\Printers\PPDs\Contents\Resources\en.lproj</p>
<p>To copy files in to this folder you will need to authenticate using a username with Admin permissions.</p>
<p>All tag information, such as * DefaultJCLBanner, is in the document provided by Adobe, as was provided above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/ppd-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
