<?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>Doomlands of the Lunatics &#187; Unix</title>
	<atom:link href="http://www.maulvi.net/category/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.maulvi.net</link>
	<description>Only survivors here...</description>
	<lastBuildDate>Wed, 05 May 2010 20:13:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HPUX Breaking Mirror and Extending LVM</title>
		<link>http://www.maulvi.net/2009/06/02/hpux-breaking-mirror-and-extending-lvm/</link>
		<comments>http://www.maulvi.net/2009/06/02/hpux-breaking-mirror-and-extending-lvm/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 13:42:19 +0000</pubDate>
		<dc:creator>Maulvi Bakar</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.maulvi.net/2009/06/02/hpux-breaking-mirror-and-extending-lvm/</guid>
		<description><![CDATA[I&#8217;m learning new things nowadays..  Particularly HPUX.  Not really my cup of tea since it not open-source but interesting enough though.
We had one machine with mirrored harddisks with one being faulty that needs removal.
Break mirror procedure..
1. Remove the mirror on the Logical Volume affected within the Volume Group
lvreduce -m 0 /dev/vg01/lvol1
lvreduce -m 0 /dev/vg01/lvol2
2. Now [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m learning new things nowadays..  Particularly HPUX.  Not really my cup of tea since it not open-source but interesting enough though.</p>
<p>We had one machine with mirrored harddisks with one being faulty that needs removal.</p>
<p>Break mirror procedure..</p>
<p>1. Remove the mirror on the Logical Volume affected within the Volume Group<br />
<code>lvreduce -m 0 /dev/vg01/lvol1<br />
lvreduce -m 0 /dev/vg01/lvol2</code></p>
<p>2. Now remove the Volume Group from the Physical Volume that is targeted for removal<br />
<code>vgreduce /dev/vg01 /dev/dsk/c2t0d0</code></p>
<p>3. Finally remove the Physical Volume from the Physical Disk<br />
<code>pvremove /dev/rdsk/c2t0d0</code><br />
Please note the &#8216;r&#8217;..  &#8216;r&#8217; stands for physical disk, while the one without is the physical volume..</p>
<p>Restore mirror procedure&#8230;</p>
<p>1. First, let&#8217;s verify things<br />
<code>ioscan -funC disk<br />
pvdisplay /dev/dsk/c1t0d0        # get lvm info of existing disk.<br />
pvdisplay /dev/dsk/c2t0d0        # get err, no lvm def on it, raw disk.</code></p>
<p>2. Now we create the Physical Volume within the Physical Disk and extend the Volume Group onto it.<br />
<code>pvcreate /dev/rdsk/c2t0d0        # add physical disk to be used by LVM<br />
vgextend /dev/vg01 /dev/dsk/c2t0d0    # incorporate new disk to existing vg00</code></p>
<p>3. Check and verify!<br />
<code>strings /etc/lvmtab            # see new disk used by lvm</code></p>
<p>4. The next steps will actually perform the mirror, and it will fail if -m mirroring option is not activated with valid license<br />
<code>lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/c2t0d0    # add mirror for lvol1<br />
lvextend -m 1 /dev/vg01/lvol2 /dev/dsk/c2t0d0    # add mirror for lvol2</code></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maulvi.net/2009/06/02/hpux-breaking-mirror-and-extending-lvm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing user&#8217;s file ownership across the board</title>
		<link>http://www.maulvi.net/2008/12/25/changing-users-file-ownership-across-the-board/</link>
		<comments>http://www.maulvi.net/2008/12/25/changing-users-file-ownership-across-the-board/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 06:25:40 +0000</pubDate>
		<dc:creator>Maulvi Bakar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.maulvi.net/2008/12/25/changing-users-file-ownership-across-the-board/</guid>
		<description><![CDATA[The guys from the promised database lands had their systems acting funny.  After investigation, they found out that, their files was having the wrong group ownership.
There&#8217;s a total of 70,000 files involved.  Promised lands or not, manually changing 70,000 files (and folders) is not a good prospect.  Well, I could go through the individual sub-folders [...]]]></description>
			<content:encoded><![CDATA[<p>The guys from the promised database lands had their systems acting funny.  After investigation, they found out that, their files was having the wrong group ownership.</p>
<p>There&#8217;s a total of 70,000 files involved.  Promised lands or not, manually changing 70,000 files (and folders) is not a good prospect.  Well, I could go through the individual sub-folders but I would need to work from the last in-depth sub-folders and work my way out.  Even that does not guarantee accuracy, since there might be sub-folders with multiple owners which I&#8217;m not suppose to touch.  When that happen, then I have to go through it manually looking at each files and folders individually &#8211; not good.</p>
<p>There has to be a short-cut.</p>
<p>I know I can locate all the files that needs to be changed it&#8217;s ownership by using the following commands -<br />
<code>find ./ -user someuser -group wronggroup -print</code></p>
<p>It&#8217;ll list all the relevant files and sub-folders. At first, maybe I&#8217;ll output it into a file, all the results.  Manipulate the file into an executable. Append each lines with a &#8220;chgrp correctgroup&#8221; and have something like &#8211; &#8220;chgrp correctgroup ./to/the/path/of/the/file&#8221;.</p>
<p>I am smart, hey!  <img src='http://www.maulvi.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Let&#8217;s prove that I can be smarter  <img src='http://www.maulvi.net/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<blockquote><p><strong>Vanity and pride are different things, though the words are often used synonymously. A person may be proud without being vain. Pride relates more to our opinion of ourselves; vanity, to what we would have others think of us.</strong></p>
<p>Jane Austen</p></blockquote>
<p>No, I&#8217;m just trying to figure out the best way of doing things.</p>
<p>&#8220;xargs -t &lt;commands&gt;&#8221;</p>
<p><code>xargs is a command of Unix and most Unix-like operating systems. It is useful when one wants to pass a large number of arguments to a command. Arbitrarily long lists of parameters can't be passed to a command, so xargs will break the list of arguments into sublists small enough to be acceptable.</code></p>
<p><code>xargs - build and execute command lines from standard input</code></p>
<p>The &#8220;-t&#8221; is for the verbose option.  It&#8217;ll spew out the output of the commands being executed.</p>
<p>Basically, every time the output of the earlier &#8220;find&#8221;, it&#8217;ll append the extra commands specified and have it executed. Voila, no need to make a separate executable.  My solution is thus -</p>
<p><code>find ./ -user someuser -group wronggroup -print | xargs -t chgrp correctgroup</code></p>
<p>Happy 4th Anniversary to myself  <img src='http://www.maulvi.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Merry Christmas everyone!</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maulvi.net/2008/12/25/changing-users-file-ownership-across-the-board/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux NFS Server, AIX NFS Client</title>
		<link>http://www.maulvi.net/2008/07/31/linux-nfs-server-aix-nfs-client/</link>
		<comments>http://www.maulvi.net/2008/07/31/linux-nfs-server-aix-nfs-client/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 08:28:28 +0000</pubDate>
		<dc:creator>Maulvi Bakar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.maulvi.net/2008/07/31/linux-nfs-server-aix-nfs-client/</guid>
		<description><![CDATA[Hmmm..
We have a Linux NFS machine to extend the AIX Server&#8217;s chronic acute harddisk space shortage syndrome. Somehow, AIX Client could not mount the shared NFS folder from the Linux Server.
Apparently, AIX uses high ports to establish the connectivity to NFS Server.  Linux NFS Server requires low ports (below 1024).  So, you have [...]]]></description>
			<content:encoded><![CDATA[<p>Hmmm..</p>
<p>We have a Linux NFS machine to extend the AIX Server&#8217;s chronic acute harddisk space shortage syndrome. Somehow, AIX Client could not mount the shared NFS folder from the Linux Server.</p>
<p>Apparently, AIX uses high ports to establish the connectivity to NFS Server.  Linux NFS Server requires low ports (below 1024).  So, you have to force AIX to use those reserved ports to establish the connection.</p>
<p><code>nfso -o nfs_use_reserved_ports=1</code></p>
<p>Then, the normal &#8216;mount&#8217; should work from AIX after the medicine  <img src='http://www.maulvi.net/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maulvi.net/2008/07/31/linux-nfs-server-aix-nfs-client/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>unknown nfs status return value: -1</title>
		<link>http://www.maulvi.net/2007/12/11/unknown-nfs-status-return-value-1/</link>
		<comments>http://www.maulvi.net/2007/12/11/unknown-nfs-status-return-value-1/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 07:54:30 +0000</pubDate>
		<dc:creator>Maulvi Bakar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.maulvi.net/2007/12/11/unknown-nfs-status-return-value-1/</guid>
		<description><![CDATA[I&#8217;m trying to mount an NFS export from an AIX machine to a Linux client.
Had encountered the above problem.   Apparently the NFS exports on AIX requires the client&#8217;s hostname and IP address within the /etc/hosts file.
Enjoy!
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying to mount an NFS export from an AIX machine to a Linux client.</p>
<p>Had encountered the above problem.   Apparently the NFS exports on AIX requires the client&#8217;s hostname and IP address within the /etc/hosts file.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maulvi.net/2007/12/11/unknown-nfs-status-return-value-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenBSD &#8211; Reloading pf.conf</title>
		<link>http://www.maulvi.net/2006/09/18/openbsd-reloading-pfconf/</link>
		<comments>http://www.maulvi.net/2006/09/18/openbsd-reloading-pfconf/#comments</comments>
		<pubDate>Mon, 18 Sep 2006 05:08:49 +0000</pubDate>
		<dc:creator>Maulvi Bakar</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.maulvi.net/2006/09/18/openbsd-reloading-pfconf/</guid>
		<description><![CDATA[OpenBSD, world most secure OS.  Also one of the most User-Hostile ones.  Now, I needed to reload the firewall rules.  Modified some settings in the /etc/pf.conf and this is how did it to reload the ruleset -
$ pfctl -f /etc/pf.conf
This will reload the ruleset plainly from the file specified.  The -R [...]]]></description>
			<content:encoded><![CDATA[<p>OpenBSD, world most secure OS.  Also one of the most User-Hostile ones.  Now, I needed to reload the firewall rules.  Modified some settings in the <em>/etc/pf.conf</em> and this is how did it to reload the ruleset -</p>
<p><em>$ pfctl -f /etc/pf.conf</em></p>
<p>This will reload the ruleset plainly from the file specified.  The -R flag only loads the filtering rules. -N only loads the NAT rules.  Should there be need to reload just the filtering and/or NAT rules, just use the appropriate options.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maulvi.net/2006/09/18/openbsd-reloading-pfconf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
