<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://blog.thilelli.net/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>blog'o thnet</title>
  <link>http://blog.thilelli.net/</link>
  <atom:link href="http://blog.thilelli.net/feed/rss2" rel="self" type="application/rss+xml"/>
  <description>thnet, the blog of Julien Gabel
What is to say about my (mostly) IT-related world these days</description>
  <language>en</language>
  <pubDate>Sun, 16 Nov 2008 20:29:11 +0100</pubDate>
  <copyright>Copyright© 2002-2008, Julien Gabel</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>System V IPC Now Managed By Resource Controls</title>
    <link>http://blog.thilelli.net/post/2008/11/01/System-V-IPC-Now-Managed-By-Resource-Controls</link>
    <guid isPermaLink="false">urn:md5:98fd2d60eef8c4ac767cfbccff1a6f91</guid>
    <pubDate>Sat, 01 Nov 2008 15:08:00 +0100</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
        <category>IPC</category><category>project</category><category>resource controls</category><category>shared memory</category>    
    <description>    &lt;p&gt;When it comes to Solaris 10, &lt;a href=&quot;http://docs.sun.com/app/docs/doc/817-0404/chapter1-33?a=view&quot; hreflang=&quot;en&quot;&gt;all IPC facilities&lt;/a&gt; are either automatically configured or can be
controlled by resource controls. In the same time, they get new default values,
when applicable.&lt;/p&gt;
&lt;p&gt;As an example, we will assume that we need to change the limit on number of
shared memory segments that can be created, and that the new default (128) is
not enough either. Before Solaris 10, you've had to set the
&lt;code&gt;shmsys:shminfo_shmmni&lt;/code&gt; tunable parameter in the
&lt;code&gt;/etc/system&lt;/code&gt; kernel configuration file, which is a &lt;em&gt;system
wide&lt;/em&gt; limit, and required a &lt;em&gt;reboot&lt;/em&gt;. This parameter is now marked
as &lt;a href=&quot;http://docs.sun.com/app/docs/doc/817-0404/appendixa-6?a=view&quot; hreflang=&quot;en&quot;&gt;Obsolete or Have Been Removed&lt;/a&gt;, and its use is clearly
deprecated.&lt;/p&gt;
&lt;p&gt;To increase the corresponding limit up to 256 shared memory segments, we now
have to deal with the &lt;code&gt;project.max-shm-ids&lt;/code&gt; resource control which
is controlled at the &lt;a href=&quot;http://docs.sun.com/app/docs/doc/817-1592/resource?a=view&quot; hreflang=&quot;en&quot;&gt;project level&lt;/a&gt;. The idea is to set the appropriate resource control to
a project, then execute a program in the context of this project. One method to
achieve this is to create a project at one side (using the &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-5174/project-4?a=view&quot; hreflang=&quot;en&quot;&gt;project(4)&lt;/a&gt; database), and to populate the extended user attributes to
do the association between this project and a user account (using the &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-5174/user-attr-4?a=view&quot; hreflang=&quot;en&quot;&gt;user_attr(4)&lt;/a&gt; database) in order to put the new project as the default
project for the user. Or it is possible not to create an extended user
attribute with this project at all, but use its characteristics explicitly
through the &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-5165/newtask-1?a=view&quot; hreflang=&quot;en&quot;&gt;newtask(1)&lt;/a&gt; command (and the &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-5165/login-1?a=view&quot; hreflang=&quot;en&quot;&gt;login(1)&lt;/a&gt;, &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-5166/cron-1m?a=view&quot; hreflang=&quot;en&quot;&gt;cron(1M)&lt;/a&gt;, and &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-5166/su-1m?a=view&quot; hreflang=&quot;en&quot;&gt;su(1M)&lt;/a&gt; programs, or the &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-5172/setproject-3project?a=view&quot; hreflang=&quot;en&quot;&gt;setproject(3PROJECT)&lt;/a&gt; function). But the simplest method, and
the less intrusive one, is certainly to directly put the project as the default
one for a user account. Here is how to do so.&lt;/p&gt;
&lt;p&gt;By default, no error message is logged against the &lt;code&gt;syslog&lt;/code&gt;
daemon for resource controls. To be able to see an appropriate message in the
&lt;code&gt;messages&lt;/code&gt; log file, you must first enable globally the
&lt;code&gt;syslog&lt;/code&gt; action for the wanted resource control (the default level
is &lt;em&gt;notice&lt;/em&gt;).&lt;/p&gt;
&lt;pre&gt;
# rctladm -e syslog project.max-shm-ids
# rctladm -l project.max-shm-ids
project.max-shm-ids   syslog=notice   [ no-basic deny count ]
&lt;/pre&gt;
&lt;p&gt;When the limit on the number of shared memory segments is reached, one
message similar to the following is write to the log file:&lt;/p&gt;
&lt;pre&gt;
# grep rctl /var/adm/messages
/var/adm/messages:Oct 21 16:47:29 hostname genunix: [ID 883052 kern.notice] privileged rctl project.max-shm-ids (value 128) exceeded by project 3
&lt;/pre&gt;
&lt;p&gt;Here is the definition of the new project, and its configuration.&lt;/p&gt;
&lt;pre&gt;
# getent project user.username
user.username:1000:Project To Increase The Limit Of SHM Segments:::project.max-shm-ids=(priv,256,deny)
#
# projects -l user.username
user.username
      projid : 1000
      comment: &amp;quot;Project To Increase The Limit Of SHM Segments&amp;quot;
      users  : (none)
      groups : (none)
      attribs: project.max-shm-ids=(priv,256,deny)
&lt;/pre&gt;
&lt;p&gt;When a project name begin with the pattern &lt;code&gt;user.&lt;/code&gt;, the project
will automatically be set as the default one for the corresponding user,
without the need to populate the extended user attributes database. Check that
the project is set as the default project for the account
&lt;code&gt;username&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;
# id -p username
uid=100(username) gid=100(groupname) projid=1000(user.username)
#
# projects -d username
user.username
&lt;/pre&gt;
&lt;p&gt;After a login phase using the &lt;code&gt;username&lt;/code&gt; identity, the programs
&lt;code&gt;progname&lt;/code&gt; is launched. We can confirm the use of shared memory
segments under the context of the project &lt;code&gt;user.username&lt;/code&gt;, and we
can consult the programs statistics report.&lt;/p&gt;
&lt;pre&gt;
# ipcs -mJ
IPC status from  as of Wed Oct 29 11:39:59 CET 2008
T         ID KEY        MODE    OWNER     GROUP       PROJECT
Shared Memory:
m 1409286255   0 --rw-rw-rw- username groupname user.username
m  469762152   0 --rw-rw-rw- username groupname user.username
m         56   0 --rw-rw-rw- username groupname user.username
#
# prstat -n5 -cJ
   PID USERNAME  SIZE   RSS STATE PRI NICE    TIME  CPU PROCESS/NLWP
  3704 username  373M  284M cpu24   2   10 0:07:37 2.1% progname/26
  6785 username  285M  196M sleep  29   10 0:04:13 1.1% progname/26
  4480 username  785M  697M sleep  29   10 0:11:40 1.1% progname/26
  5836 username  293M  204M sleep  29   10 0:06:31 1.0% progname/26
  7635 username  277M  188M sleep  29   10 0:01:00 0.9% progname/26
PROJID    NPROC  SWAP   RSS MEMORY      TIME  CPU PROJECT
  1000       26 6472M 6333M    26%   3:57:24  23% user.username
     1       17   41M   87M   0.4%   2:39:58 0.0% user.root
     0       43  184M  267M   1.1%   4:07:25 0.0% system
     3        4 5856K   11M   0.0%   0:00:00 0.0% default
Total: 90 processes, 916 lwps, load averages: 4.41, 2.36, 1.04
&lt;/pre&gt;
&lt;p&gt;Last, we can verify the new setting for one &lt;code&gt;progname&lt;/code&gt; instance.
For example for PID 3704:&lt;/p&gt;
&lt;pre&gt;
# prctl -n project.max-shm-ids 3704
process: 3704: bin/progname 54 80 -Xmx192m
NAME    PRIVILEGE       VALUE    FLAG   ACTION      RECIPIENT
project.max-shm-ids
        privileged        256       -   deny                -
        system          16.8M     max   deny                -
&lt;/pre&gt;
&lt;p&gt;The resource management facility can do much more than just tuning IPC
settings, such as managing &lt;a href=&quot;http://www.c0t0d0s0.org/archives/4211-Less-known-Solaris-Features-Resource-Management.html&quot; hreflang=&quot;en&quot;&gt;CPU usage, and physical memory control&lt;/a&gt;. It is a more
fine-grained facility than what is in place before Solaris 10, and did not
required a reboot anymore.&lt;/p&gt;
&lt;p&gt;As a last word, we can note that there are command line tools to help
creating and managing projects and extended user attributes for locally stored
databases: respectively &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-5166/projadd-1m?a=view&quot; hreflang=&quot;en&quot;&gt;projadd(1M)&lt;/a&gt;, &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-5166/projmod-1m?a=view&quot; hreflang=&quot;en&quot;&gt;projmod(1M)&lt;/a&gt;, and &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-5166/useradd-1m?a=view&quot; hreflang=&quot;en&quot;&gt;useradd(1M)&lt;/a&gt;, &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-5166/usermod-1m?a=view&quot; hreflang=&quot;en&quot;&gt;usermod(1M)&lt;/a&gt;. But since the information sources was hosted in NIS and
LDAP network directories, we did not use them for this test case though.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/11/01/System-V-IPC-Now-Managed-By-Resource-Controls#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/11/01/System-V-IPC-Now-Managed-By-Resource-Controls#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/291374</wfw:commentRss>
      </item>
    
  <item>
    <title>Solaris vs. RHEL Costs And Features Comparisons</title>
    <link>http://blog.thilelli.net/post/2008/10/26/Solaris-vs-RHEL-Costs-And-Features-Comparisons</link>
    <guid isPermaLink="false">urn:md5:fd06580c4d9cd34a0221a623558377cb</guid>
    <pubDate>Sun, 26 Oct 2008 13:25:00 +0100</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
        <category>comparison</category><category>feature</category>    
    <description>    &lt;p&gt;Clearly, the costs involved in running Solaris and RHEL platforms are not
well understood, and generally favors GNU/Linux environments. This is (most of
the time) untrue, since this tend to be based on personal user experience,
which is in fact far different from running lots of systems in high demand
production datacenters.&lt;/p&gt;
&lt;p&gt;Here some interesting readings on these subjects--costs and features
analysis--from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Jim Laurent, OS Ambassador within Sun and evangelist for the Solaris
OS&lt;br /&gt;
&lt;a href=&quot;http://blogs.sun.com/jimlaurent/entry/solaris_10_costs_less_than&quot; hreflang=&quot;en&quot;&gt;Solaris 10 costs less than Red Hat Enterprise Linux (and does
more)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Paul Murphy, an IT consultant specializing in Unix and related
technologies&lt;br /&gt;
&lt;a href=&quot;http://blogs.zdnet.com/Murphy/?p=1020&quot; hreflang=&quot;en&quot;&gt;Cost comparison:
Solaris/SPARC vs Linux/x86&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Marc Andreessen, creator of the Mosaic web browser, and co-founder of
Netscape Communications&lt;br /&gt;
&lt;a href=&quot;http://www.sun.com/software/solaris/ning.jsp&quot; hreflang=&quot;en&quot;&gt;Solaris is
a better Linux than Linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Bill Vass, President and Chief Operating Officer of Sun Federal&lt;br /&gt;
&lt;a href=&quot;http://blogs.sun.com/BVass/entry/updated_solaris_vs_rhel_comparison1&quot; hreflang=&quot;en&quot;&gt;UPDATED Solaris vs. RHEL Comparison - to include Microsoft
Windows&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;YMMV for sure, but I personally think that Solaris costs are overestimated,
and its features are mostly unknown, or at least underused... but this is a
very large and hot topic nowadays, I know.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/10/26/Solaris-vs-RHEL-Costs-And-Features-Comparisons#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/10/26/Solaris-vs-RHEL-Costs-And-Features-Comparisons#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/286157</wfw:commentRss>
      </item>
    
  <item>
    <title>Discrepancies Between df And du Outputs</title>
    <link>http://blog.thilelli.net/post/2008/10/18/Discrepancies-Between-df-And-du-Outputs</link>
    <guid isPermaLink="false">urn:md5:883b8e3c85229f841829d3baabf0fc66</guid>
    <pubDate>Sat, 18 Oct 2008 13:03:00 +0200</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
        <category>df</category><category>du</category><category>UFS</category><category>ZFS</category>    
    <description>    &lt;p&gt;As a SA, it not uncommon to have regularly requests about big differences
between the &lt;code&gt;du&lt;/code&gt; and &lt;code&gt;df&lt;/code&gt; outputs on a UFS file system.
(For ZFS specific considerations, please see the &lt;a href=&quot;http://opensolaris.org/os/community/zfs/faq/#whydusize&quot; hreflang=&quot;en&quot;&gt;ZFS
FAQ&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;du&lt;/code&gt; utility reports the sum of space allocated to all files
in the file hierarchy rooted in the directory plus the space allocated to the
directory itself. The &lt;code&gt;df&lt;/code&gt; utility reports the amount of disk space
occupied by a mounted file system.&lt;/p&gt;
&lt;p&gt;When a file is remove from the file system, i.e. is unlinked (the hard link
count goes to zero), the space belonging to this file is accounted against the
&lt;code&gt;du&lt;/code&gt; tool, but is not visible to the &lt;code&gt;df&lt;/code&gt; utility until
all references to it (open file descriptors) are closed. In order to find the
guilty process, one can follow the information found in the &lt;a href=&quot;ftp://ftp.cs.toronto.edu/pub/jdd/sunmanagers/faq.html#5.10&quot; hreflang=&quot;en&quot;&gt;SunManagers Frequently Asked Questions&lt;/a&gt;. Here is an example of such
finding, but using a slightly different method to get the process currently
holding the open descriptor to the deleted file.&lt;/p&gt;
&lt;p&gt;Find the file which has been unlinked through the &lt;code&gt;procfs&lt;/code&gt;
interface:&lt;/p&gt;
&lt;pre&gt;
# find /proc/*/fd \( -type f -a ! -size 0 -a -links 0 \) -print | xargs \ls -li
 415975 --w-------   0 user  group  2125803025 Oct 15 23:59 /proc/1252/fd/3
&lt;/pre&gt;
&lt;p&gt;Eventually, get more detail about it:&lt;/p&gt;
&lt;pre&gt;
# pargs -c 1252
1252:   rvd.basic -reliability 5 -listen tcp:9876 -logfile /path/to/log/rvd_9876.l
argv[0]: rvd.basic
argv[1]: -reliability
argv[2]: 5
argv[3]: -listen
argv[4]: tcp:9876
argv[5]: -logfile
argv[6]: /path/to/log/rvd_9876.log
&lt;/pre&gt;
&lt;p&gt;Check to see if you can understand what is the content of the unlinked
file:&lt;/p&gt;
&lt;pre&gt;
# tail /proc/1252/fd/3
-------------------------------------------------------------------------------
2008-10-15 23:59:32.002116 - [MSG] BBG_Transmitter_class.cc, line 792 (thread 25087:4)
[4060] Sent a heartbeat
-------------------------------------------------------------------------------
BBG_Transmitter_class.cc: [4111] No activity detected. Send a Heartbeat message
-------------------------------------------------------------------------------
2008-10-15 23:59:32.134829 - [MSG] BBG_Transmitter_class.cc, line 1138 (thread 25087:4)
[4065] Heartbeat acknowledged by Bloomberg
&lt;/pre&gt;
&lt;p&gt;You can correlate the size of the removed, but always referenced, file to
the space accounted from the &lt;code&gt;du&lt;/code&gt; and &lt;code&gt;df&lt;/code&gt; tools:&lt;/p&gt;
&lt;pre&gt;
# df -k /path/to
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d5       6017990 5874592   83219    99%    /path/to
# du -sk /path/to
3791632 /data
# echo &amp;quot;(5874616-3791632)*1024&amp;quot; | bc
2132975616
&lt;/pre&gt;
&lt;p&gt;So, we now found the ~2GB log file which was always opened (used) by a
process. Now, there are two solutions to be able to get back the freed
space:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Truncate the unlinked file (quick workaround).&lt;/li&gt;
&lt;li&gt;Simply restart properly the corresponding program (better option).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Use the solution which fits the best your need in your environment.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/10/18/Discrepancies-Between-df-And-du-Outputs#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/10/18/Discrepancies-Between-df-And-du-Outputs#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/287659</wfw:commentRss>
      </item>
    
  <item>
    <title>Anatomy Of An Attack</title>
    <link>http://blog.thilelli.net/post/2008/10/11/Anatomy-Of-An-Attack</link>
    <guid isPermaLink="false">urn:md5:d760cb69f8f189ae28796d208a5c95e3</guid>
    <pubDate>Sat, 11 Oct 2008 21:53:00 +0200</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
            
    <description>    &lt;p&gt;Well, although I didn't generally give credibility by speaking about public
FUD, I will just let you know about &lt;a href=&quot;http://www.cuddletech.com/blog/pivot/entry.php?id=972&quot; hreflang=&quot;en&quot;&gt;really
great&lt;/a&gt;, and &lt;a href=&quot;http://blogs.zdnet.com/Murphy/?p=1268&quot; hreflang=&quot;en&quot;&gt;point by point explanations&lt;/a&gt; on the recent InfoWorld (and New York
Times) publication from Paul Krill &lt;a href=&quot;http://www.infoworld.com/article/08/09/24/39NF-linux-killing-solaris_1.html&quot; hreflang=&quot;en&quot;&gt;Is Sun Solaris on its deathbed?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As &lt;a href=&quot;http://www.opensolaris.org//viewProfile.jspa?id=863&quot; hreflang=&quot;en&quot;&gt;Jim Grisanzio&lt;/a&gt; stated recently on the &lt;code&gt;advocacy-discuss&lt;/code&gt;
mailing list:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[...] More importantly, though, is that the original article not only fell
flat but it was actually aggressively rejected by many in the open source
community. That's an interesting shift out there. And a good one, too.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Well, I can't agree more with Jim on &lt;a href=&quot;http://blogs.sun.com/jimgris/entry/deathbed&quot; hreflang=&quot;en&quot;&gt;his points&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update #1 (2008-10-28):&lt;/em&gt; Don't forget to read the &lt;a href=&quot;http://www.c0d0s0.org/archives/4943-Is-the-Linux-community-afraid-of-Opensolaris.html&quot; hreflang=&quot;en&quot;&gt;interesting inputs&lt;/a&gt; from Joerg Moellenkamp.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/10/11/Anatomy-Of-An-Attack#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/10/11/Anatomy-Of-An-Attack#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/286105</wfw:commentRss>
      </item>
    
  <item>
    <title>Fake The hostid Of A Solaris Zone, Updated</title>
    <link>http://blog.thilelli.net/post/2008/10/06/Fake-The-hostid-Of-A-Solaris-Zone-Updated</link>
    <guid isPermaLink="false">urn:md5:04e2d6df931b36f284913c5b384a2af8</guid>
    <pubDate>Mon, 06 Oct 2008 15:00:00 +0200</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
        <category>dtrace</category><category>hostid</category><category>privilege</category><category>zone</category>    
    <description>    &lt;p&gt;As a little follow-up to &lt;a href=&quot;http://blog.thilelli.net/post/2006/06/17/Fake-the-hostid-of-a-Solaris-Zone&quot; hreflang=&quot;en&quot;&gt;Fake The
hostid Of A Solaris Zone&lt;/a&gt;, and regarding the &lt;a href=&quot;http://www.opensolaris.org/jive/thread.jspa?threadID=77246&quot; hreflang=&quot;fr&quot;&gt;discussion&lt;/a&gt; on the capacity to change the &lt;code&gt;hostid&lt;/code&gt; of a
Solaris non-global zone, it is interesting to mention these (updated)
informations:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The &lt;code&gt;LD_PRELOAD&lt;/code&gt; trick proposed before is not a proper option,
and is really ugly (and intrusive if you didn't unset it before continuing the
execution of a program).&lt;/li&gt;
&lt;li&gt;When using Solaris 8 or Solaris 9 Containers, there is a feature called
&lt;a href=&quot;http://docs.sun.com/app/docs/doc/820-4490/gfrzp?l=en&amp;amp;a=view&quot; hreflang=&quot;en&quot;&gt;Host ID Emulation&lt;/a&gt; from the &lt;code&gt;zonecfg&lt;/code&gt; utility which
can do exactly that.&lt;/li&gt;
&lt;li&gt;Before the introduction of the privileges in a non-global zone with Solaris
11/06 (a.k.a. Solaris Update 3), you must run the DTrace &lt;code&gt;zhostid&lt;/code&gt;
script (daemon) within the global zone. It is not mandatory to run it from the
global zone anymore. Using the appropriate &lt;code&gt;dtrace_user&lt;/code&gt; privilege
only, you can run it directly from the non-global zone:
&lt;pre&gt;
# zonecfg -z ngzone set limitpriv=default,dtrace_user
# zoneadm -z ngzone boot
# zlogin ngzone
[Connected to zone 'ngzone' pts/5]
Last login: Sat Oct  4 18:57:17 on pts/5
Sun Microsystems Inc.   SunOS 5.11      snv_99  November 2008
# /sbin/zonename 
ngzone
# /usr/bin/hostid
837d47dd
# ./zhostid &amp;amp;
[1] 21506
# /usr/bin/hostid
20a82f32
# ^D
[Connection to zone 'ngzone' pts/5 closed]
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/10/06/Fake-The-hostid-Of-A-Solaris-Zone-Updated#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/10/06/Fake-The-hostid-Of-A-Solaris-Zone-Updated#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/283531</wfw:commentRss>
      </item>
    
  <item>
    <title>Sun's Free Proficiency Assessment System</title>
    <link>http://blog.thilelli.net/post/2008/09/29/Sun-s-Free-Proficiency-Assessment-System</link>
    <guid isPermaLink="false">urn:md5:5709e49c3aa6c153e75c8dc49daea354</guid>
    <pubDate>Mon, 29 Sep 2008 08:21:00 +0200</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
        <category>assessment</category><category>certification</category><category>SCNA</category><category>SCSA</category><category>SCSAS</category><category>SCSECA</category>    
    <description>    &lt;p&gt;&lt;q&gt;Free. Online. Right now.&lt;/q&gt; As Peter Tribble &lt;a href=&quot;http://ptribble.blogspot.com/2008/09/would-you-pass.html&quot; hreflang=&quot;en&quot;&gt;mentioned in his blog&lt;/a&gt;, it is clearly not perfect and some questions
(and answers) seems a little obscure sometimes. Nonetheless, as I have never
had any (yes, any) formal training, I though interesting to try these tests,
and here are the results for pre-assessment for:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;UNIX Essentials Featuring the Solaris 10 OS, I scored 37 out of 42.&lt;/li&gt;
&lt;li&gt;Sun Certified System Administrator for the Solaris 10 OS (Part 1), I scored
45 out of 48.&lt;/li&gt;
&lt;li&gt;Certified System Administrator for the Solaris 10 OS (Part 2), I scored 45
out of 48.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Maybe, is it time to pass to official &lt;a href=&quot;http://www.sun.com/training/certification/resources/paths.html&quot; hreflang=&quot;en&quot;&gt;Solaris Operating System certifications&lt;/a&gt;? ;)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sun Certified Solaris Associate (SCSAS)&lt;/li&gt;
&lt;li&gt;Sun Certified System Administrator (SCSA)&lt;/li&gt;
&lt;li&gt;Sun Certified Network Administrator (SCNA)&lt;/li&gt;
&lt;li&gt;Sun Certified Security Administrator (SCSECA)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Well... if time permit!&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/09/29/Sun-s-Free-Proficiency-Assessment-System#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/09/29/Sun-s-Free-Proficiency-Assessment-System#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/281077</wfw:commentRss>
      </item>
    
  <item>
    <title>About GNU/Linux Software Mirroring And LVM</title>
    <link>http://blog.thilelli.net/post/2008/09/22/About-GNU/Linux-Software-Mirroring-And-LVM</link>
    <guid isPermaLink="false">urn:md5:058854e613ba6060bed32c008817a104</guid>
    <pubDate>Mon, 22 Sep 2008 09:43:00 +0200</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>GNU/Linux</category>
        <category>LVM</category><category>mirror</category><category>multipath</category>    
    <description>    &lt;p&gt;Here, the final aim was to provide data access redundancy through SAN
storage hosted on remote sites across Wide Area Network (WAN) links. After some
relatively long and painful tries to mimic software mirroring as found on HP-UX
platform using Logical Volume Management (LVM), i.e. at the &lt;a href=&quot;http://blog.thilelli.net/post/2008/02/15/LVM2-Simple-Mirroring-On-RHEL4&quot; hreflang=&quot;en&quot;&gt;logical volume
level&lt;/a&gt;, I finally give up deciding this &lt;em&gt;functionality&lt;/em&gt; will
definitely not fi my need. Why? Here are my comments.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It is not possible to provide clear and manageable storage multipath when
the need to distinguish between the multiple sites is important, ala mirror
across controllers found on Veritas VxVM on Sun Solaris system, for example.
So, managing many physical volumes along with lots of logical volumes is very
complicated.&lt;/li&gt;
&lt;li&gt;There is no exact mapping capability between logical volume storage on a
given physical volume.&lt;/li&gt;
&lt;li&gt;The need to have a disk-based log, i.e. a persistent log. Yes, one can
always provide the option &lt;code&gt;--corelog&lt;/code&gt; at the creation time to the
logical volume initial build and have an in-memory log , i.e. a non-persistent
log, but this requires the entire copies (mirrors) be resynchronized upon
reboot. Not really viable on multi-TB environments.&lt;/li&gt;
&lt;li&gt;A write-intensive workload on a file system living on a logical volume
mirror will suffer high latency: the overhead is important, and the time to do
mostly-write jobs grow dramatically. It is really hard to get high level
statistics, only low level metrics seems consistent: &lt;code&gt;sd&lt;/code&gt; SCSI
devices and &lt;code&gt;dm-&lt;/code&gt; device mapper components for each paths entries.
Not from the multipath devices standpoint, which is the more interesting from
the end user and SA point of view.&lt;/li&gt;
&lt;li&gt;You can't extend a logical volume, which is really a &lt;strong&gt;no-go&lt;/strong&gt;
per-se. On that point, the Red Hat support answered that this functionality may
be added in a future release, the current state &lt;q&gt;&lt;em&gt;may eventually be a
Request For Enhancement (RFE), if a proper business justification is
provided&lt;/em&gt;&lt;/q&gt;. One must break the logical volume mirror copy, then rebuild
it completely. Not realistic when the logical volume is made of a lot of
physical extents across multiple physical volumes.&lt;/li&gt;
&lt;li&gt;A LVM configuration can be totally blocked by itself, and not usable at
all. The fact is, LVM use persistent storage blocks to keep track of its own
metadata. The metadata size is set at physical volume creation time only, and
can't be change afterward. This size is statically defined as 255 physical
volume blocks, and can be adjust from the LVM configuration file. The problem
is, when this circular buffer space (stored in ASCII) fills up--such as when
there are a lot of logical volumes in a mirrored environment--it is not
possible to do &lt;strong&gt;anything more&lt;/strong&gt; with LVM. So you can't add more
logical volume, can't add more logical volume copies,... and can't delete them
trying to reestablish a proper LVM configuration. Well, here are the answers
given by the Red Hat support to two keys questions in this situation:
&lt;ul&gt;
&lt;li&gt;How to size the metadata, i.e. if we need to change it from the default
value, how can we determine the new proper and appropriate size, and from which
information?&lt;br /&gt;
&lt;q&gt;&lt;em&gt;I am afraid but Metadata size can only be defined at the time of PV
creation and there is no real formula for calculating the size in advance. By
changing the default value of 255 you can get a higher space value. For general
LVM setup (with less LV's and VG's) default size works fine however in cases
where high number of LV's are required a custom value will be
required.&lt;/em&gt;&lt;/q&gt;&lt;/li&gt;
&lt;li&gt;We just want to delete all LV copies, which means to return to the initial
situation and have 0 copy for all LV, i.e. only one LV per-se, in order to be
able to change LVM configuration again (we can't do anything on our production
server right now)?&lt;br /&gt;
&lt;q&gt;&lt;em&gt;I discussed this situation with peer engineers and also referenced a
similar previous case. From the notes of the same the workaround is to use the
backup file (/etc/lvm/backup) and restore the PV's. I agree that this really
not a production environment method however seems the only
workaround.&lt;/em&gt;&lt;/q&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So, the production RDBMS Oracle server is finally now being evacuate to an
other machine. Hum... Hope to see better enterprise experience using the
&lt;code&gt;mdadm&lt;/code&gt; package to handle RAID software, instead of mirror (RAID-1)
LVM. Maybe more about that in an other blog entry?&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/09/22/About-GNU/Linux-Software-Mirroring-And-LVM#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/09/22/About-GNU/Linux-Software-Mirroring-And-LVM#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/278244</wfw:commentRss>
      </item>
    
  <item>
    <title>Announcing Solaris 10 10/08</title>
    <link>http://blog.thilelli.net/post/2008/09/16/Announcing-Solaris-10-10/08</link>
    <guid isPermaLink="false">urn:md5:99eabba30409ea6946400a28f6570a3b</guid>
    <pubDate>Tue, 16 Sep 2008 19:16:00 +0200</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
        <category>ZFS</category>    
    <description>    &lt;p&gt;Although this seems a little bit confident, the long-awaited Update 6 to the
Solaris 10 operating system release is just behind the door. This release
(scheduled to be available in mid-October) will &lt;q&gt;&lt;em&gt;includes virtualization
enhancements including the ability for a Solaris Container to automatically
update its environment when moved from one system to another, Logical Domains
support for dynamically reconfigurable disk and network I/O, and
paravirtualization support when Solaris 10 is used as a guest OS in Xen-based
environments such as Sun xVM Server. Solaris 10 10/08 also includes support for
the latest systems from Sun and other vendors, such as those based on the Intel
Xeon Processor 7400 Series&lt;/em&gt;&lt;/q&gt;.&lt;/p&gt;
&lt;p&gt;This release will be the very first Solaris release to be able to boot from
&lt;a href=&quot;http://www.opensolaris.org/os/community/zfs/&quot; hreflang=&quot;en&quot;&gt;ZFS&lt;/a&gt;
and use it as their root file system, such as what can be found on &lt;a href=&quot;http://www.opensolaris.com/&quot; hreflang=&quot;en&quot;&gt;OpenSolaris&lt;/a&gt; or &lt;a href=&quot;http://www.opensolaris.org/os/downloads/&quot; hreflang=&quot;en&quot;&gt;Solaris Express
Community Release&lt;/a&gt; today.&lt;/p&gt;
&lt;p&gt;Check the &lt;a href=&quot;http://www.sun.com/software/solaris/whats_new.jsp&quot; hreflang=&quot;en&quot;&gt;What’s New&lt;/a&gt; web page for Solaris, and consult the &lt;a href=&quot;http://www.sun.com/software/solaris/media/k5_media.jsp#solaris1&quot; hreflang=&quot;en&quot;&gt;Solaris Media Gallery&lt;/a&gt; videos for more information.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update #1 (2008-10-14):&lt;/em&gt; Don't forget to consult the &lt;strong&gt;must
read&lt;/strong&gt; &lt;a href=&quot;http://www.opensolaris.org/os/project/alamo-osug/events/Whats_New_in_Solaris_10u6.pdf&quot; hreflang=&quot;en&quot;&gt;What's New in Solaris 10 10/08?&lt;/a&gt; from the San Antonio
OpenSolaris User Group.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update #2 (2008-10-31):&lt;/em&gt; &lt;a href=&quot;http://www.sun.com/software/solaris/get.jsp&quot; hreflang=&quot;en&quot;&gt;Get yours&lt;/a&gt;, and
go reading the official &lt;a href=&quot;http://docs.sun.com/app/docs/doc/817-0547/ghgdx?a=view&quot; hreflang=&quot;en&quot;&gt;What's
New in the Solaris 10 10/08 Release&lt;/a&gt; page.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/09/16/Announcing-Solaris-10-10/08#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/09/16/Announcing-Solaris-10-10/08#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/278780</wfw:commentRss>
      </item>
    
  <item>
    <title>Comparison: EMC PowerPath vs. GNU/Linux dm-multipath</title>
    <link>http://blog.thilelli.net/post/2009/02/09/Comparison%3A-EMC-PowerPath-vs-GNU/Linux-dm-multipath</link>
    <guid isPermaLink="false">urn:md5:abe569db79d64f7d6064481a1f0a0a85</guid>
    <pubDate>Fri, 16 May 2008 21:10:00 +0200</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>GNU/Linux</category>
        <category>dm-multipath</category><category>EMC</category><category>PowerPath</category>    
    <description>    &lt;p&gt;I will present some notes about the use of multipath solutions on Red Hat
systems: EMC PowerPath and GNU/Linux dm-multipath. Along those notes, keep in
mind that they were based on tests done when pressure was very high to put new
systems in production, so lack of time resulted in less complete tests than
expected. These tests were done more than a year ago, and so before the release
of RHEL4 Update 5 and some of RHBA related to both LVM and dm-multipath
technologies.&lt;/p&gt;
&lt;p&gt;Keep in mind that without purchasing an appropriate EMC license, PowerPath
can only be used in failover mode (active-passive mode). Multiple paths
accesses are not supported in this case: no round-robin, and no I/O load
balancer for example.&lt;/p&gt;
&lt;h3&gt;EMC PowerPath&lt;/h3&gt;
&lt;h4&gt;Advantages&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Not specific to the SAN Host Bus Adapter (HBA).&lt;/li&gt;
&lt;li&gt;Support for multiple and heterogeneous SAN storage provider.&lt;/li&gt;
&lt;li&gt;Support for most UNIX and Unix-like platforms.&lt;/li&gt;
&lt;li&gt;Without a valid license, can only work in degraded mode (failover).&lt;/li&gt;
&lt;li&gt;Is not sensible to a change in the SCSI LUN renumbering. Adapt accordingly
the corresponding multiple &lt;code&gt;sd&lt;/code&gt; devices (different paths to a given
device) with its multipath definition of the &lt;code&gt;emcpower&lt;/code&gt; device.&lt;/li&gt;
&lt;li&gt;Provide easily the ID of the SAN storage.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;Drawbacks&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Not integrated with the operating system (which generally has its own
solution).&lt;/li&gt;
&lt;li&gt;The need to force a RPM re-installation in case of a kernel upgrade on RHEL
systems (due to the fact that kernel modules are stored in a path containing
the exact major and minor versions of the installed (booted) kernel.&lt;/li&gt;
&lt;li&gt;Non-automatic update procedure.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;GNU/Linux device-mapper-multipath&lt;/h3&gt;
&lt;h4&gt;Advantages&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Not specific to the SAN Host Bus Adapter (HBA).&lt;/li&gt;
&lt;li&gt;Support for multiple and heterogeneous SAN storage provider.&lt;/li&gt;
&lt;li&gt;Well integrated with the operating system.&lt;/li&gt;
&lt;li&gt;Automatic update using RHN (you must be a licensed and registered user in
this case).&lt;/li&gt;
&lt;li&gt;No &lt;em&gt;additional&lt;/em&gt; license cost.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;Drawbacks&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Only available on GNU/Linux systems.&lt;/li&gt;
&lt;li&gt;Configuration (files and keywords) very tedious and difficult.&lt;/li&gt;
&lt;li&gt;Without the use of LVM (Logical Volume Management), it has not the ability
to follow SCSI LUN renumbering! Even in this case, be sure not to have
blacklisted the newly discovered SCSI devices (&lt;code&gt;sd&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Last, please find some interesting documentation on the subject below:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://kbase.redhat.com/faq/FAQ_51_7170.shtm&quot; hreflang=&quot;en&quot;&gt;How do
I setup device-mapper multipathing in RHEL4?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://secure.linux.ncsu.edu/moin/RealmLinuxServers/Multipathing&quot; hreflang=&quot;en&quot;&gt;Setting Up Multipathing for Storage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://people.redhat.com/nayfield/storage/RHEL4Storage.html&quot; hreflang=&quot;en&quot;&gt;Enterprise Storage Quickstart on RHEL4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2009/02/09/Comparison%3A-EMC-PowerPath-vs-GNU/Linux-dm-multipath#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2009/02/09/Comparison%3A-EMC-PowerPath-vs-GNU/Linux-dm-multipath#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240688</wfw:commentRss>
      </item>
    
  <item>
    <title>PHP APC Extension Bug With Optimized Open Source Software Stack</title>
    <link>http://blog.thilelli.net/post/2008/05/02/PHP-APC-Extension-Bug-With-Optimized-Open-Source-Software-Stack</link>
    <guid isPermaLink="false">urn:md5:3c7a84c26dcd327ce6bd34d4c0da9056</guid>
    <pubDate>Fri, 02 May 2008 15:57:00 +0200</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
        <category>APC</category><category>bug</category><category>Cool Stack</category><category>PHP</category>    
    <description>    &lt;p&gt;To easily manage LDAP accounts (and general LDAP entries in fact), we have
created a &lt;a href=&quot;http://dlc.sun.com/osol/docs/content/SYSADRM/zones.intro-1.html&quot; hreflang=&quot;en&quot;&gt;Solaris Zone&lt;/a&gt; and installed the excellent &lt;a href=&quot;http://cooltools.sunsource.net/coolstack/&quot; hreflang=&quot;en&quot;&gt;Cool Stack bundle&lt;/a&gt;
to host the LAM (&lt;a href=&quot;http://lam.sourceforge.net/&quot; hreflang=&quot;en&quot;&gt;LDAP
Account Manager&lt;/a&gt;) management web tool. But after upgrading the Cool Stack to
version 1.2 we encountered a very annoying problem mostly with freezing web
pages, and generally ending up in restarting the Apache web server provided by
the Cool Stack. After some troubleshooting, we discover that this behavior was
&lt;a href=&quot;http://forums.sun.com/thread.jspa?threadID=5254435&quot; hreflang=&quot;en&quot;&gt;introduced by a bug&lt;/a&gt; in the &lt;code&gt;APC-3.0.14&lt;/code&gt; module bundled with
the updated &lt;code&gt;php-5.2.4&lt;/code&gt; scripting software in this version of the
Cool Stack.&lt;/p&gt;
&lt;p&gt;Luckily, the bug was already fixed and a new version of the APC extension of
PHP is available for download (in fact, just replace to original
&lt;code&gt;apc.so&lt;/code&gt; module by the new one). All the Cool Stack related
problems, associated fixes and instructions are listed on the &lt;a href=&quot;http://cooltools.sunsource.net/coolstack/csk12patches.html&quot; hreflang=&quot;en&quot;&gt;Cool
Stack 1.2 Patches&lt;/a&gt; page: be sure to keep in sync' if you are a Cool Stack
consumer.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/05/02/PHP-APC-Extension-Bug-With-Optimized-Open-Source-Software-Stack#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/05/02/PHP-APC-Extension-Bug-With-Optimized-Open-Source-Software-Stack#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240691</wfw:commentRss>
      </item>
    
  <item>
    <title>memconf And AMD Athlon 64 X2 Dual Core Processor</title>
    <link>http://blog.thilelli.net/post/2008/04/28/memconf-And-AMD-Athlon-64-X2-Dual-Core-Processor</link>
    <guid isPermaLink="false">urn:md5:794ece4a7c6b76dc0b4c1f2b692bff43</guid>
    <pubDate>Mon, 28 Apr 2008 18:25:00 +0200</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>OpenSolaris</category>
        <category>Dual</category><category>memconf</category><category>x86</category>    
    <description>    &lt;p&gt;The last update to the excellent &lt;code&gt;memconf&lt;/code&gt; utility (V2.5
22-Feb-2008) support properly recent Solaris Express releases, and my recent
change from the stock AMD Opteron Processor 148 to an AMD Athlon 64 X2 Dual
Core Processor 3800+. (I mostly did that change just to be able to access two
run queues separately, not to gain more power &lt;em&gt;per se&lt;/em&gt;.)&lt;/p&gt;
&lt;p&gt;So, here is the new and appropriate &lt;code&gt;memconf&lt;/code&gt; report:&lt;/p&gt;
&lt;pre&gt;
# memconf -d
memconf:  V2.5 22-Feb-2008 http://www.4schmidts.com/unix.html
hostname: unic
manufacturer: Sun Microsystems, Inc.
model:    Sun Ultra 20 Workstation (AMD Athlon(tm) 64 X2 Dual Core \
 Processor 3800+ Socket 939 2010MHz)
Sun Family Part Number: A63
Solaris Express Community Edition snv_87 X86, 64-bit kernel, SunOS 5.11
1 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ Socket 939 2010MHz cpu
diagbanner = Sun Ultra 20 Workstation
cpubanner = AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ Socket 939 2010MHz
model = Sun Ultra 20 Workstation
machine = i86pc
platform = i86pc
perl version: 5.008004
CPU Units:
==== Processor Sockets ====================================
Version                          Location Tag
-------------------------------- --------------------------
AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ Socket 939
AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ Socket 939
Memory Units:
Type    Status Set Device Locator      Bank Locator
------- ------ --- ------------------- --------------------
unknown in use 0   A0                  Bank0/1
unknown in use 0   A1                  Bank2/3
unknown in use 0   A2                  Bank4/5
unknown in use 0   A3                  Bank6/7
total memory = 2048MB (2GB)
&lt;/pre&gt;
&lt;p&gt;You can check and compare with the previous report &lt;a href=&quot;http://blog.thilelli.net/post/2006/12/04/memconf-Update&quot; hreflang=&quot;en&quot;&gt;on my blog&lt;/a&gt;.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/04/28/memconf-And-AMD-Athlon-64-X2-Dual-Core-Processor#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/04/28/memconf-And-AMD-Athlon-64-X2-Dual-Core-Processor#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240791</wfw:commentRss>
      </item>
    
  <item>
    <title>Change The DST Time Zone Definition For Test Purpose</title>
    <link>http://blog.thilelli.net/post/2008/04/06/Change-The-DST-Time-Zone-Definition-For-Test-Purpose</link>
    <guid isPermaLink="false">urn:md5:82ba6f02d823e45784b37f7313945e4c</guid>
    <pubDate>Sun, 06 Apr 2008 19:13:00 +0200</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
        <category>DST</category><category>zdump</category><category>zic</category><category>zoneinfo</category>    
    <description>    &lt;p&gt;Because we continue to encounter some specialized software vendor which
can't tell if there is a problem with the Daylight Saving Time change for their
application, the need to test the time adjustment beforehand arise sometimes.
In this case, the first thing which comes in mind is to change the system
clock, without modifying the timezone. Although this can do the job, it doesn't
test the DST adjustment properly, and affect the overall operating environment,
system-wide.&lt;/p&gt;
&lt;p&gt;To do things cleaner, we can try to modify directly the timezone in use.
This will test the real DST automatic adjustment, while not changing the system
clock (and not impacting other software, or services). Say we want to change
DST for &lt;code&gt;Europe/Paris&lt;/code&gt; time zone one day before the official date
for summer 2008. First, obtain the current setting:&lt;/p&gt;
&lt;pre&gt;
# zdump -v `rtc` | \
   awk '$6 ~ /'&amp;quot;`date '+%Y'`&amp;quot;'/ &amp;amp;&amp;amp; $12 !~ /'&amp;quot;`date '+%H:%M:%S'`&amp;quot;'/ {print $0}'
Europe/Paris  &lt;strong&gt;Sun Mar 30&lt;/strong&gt; 00:59:59 2008 UTC = &lt;strong&gt;Sun Mar 30&lt;/strong&gt; 01:59:59 2008 CET isdst=0
Europe/Paris  &lt;strong&gt;Sun Mar 30&lt;/strong&gt; 01:00:00 2008 UTC = &lt;strong&gt;Sun Mar 30&lt;/strong&gt; 03:00:00 2008 CEST isdst=1
Europe/Paris  Sun Oct 26 00:59:59 2008 UTC = Sun Oct 26 02:59:59 2008 CEST isdst=1
Europe/Paris  Sun Oct 26 01:00:00 2008 UTC = Sun Oct 26 02:00:00 2008 CET isdst=0
&lt;/pre&gt;
&lt;p&gt;Then, get the time zone source file for the &lt;code&gt;Europe/Paris&lt;/code&gt;
geographic definition and adapt it writing an exception rule for the current
year. Because the current definition for &lt;code&gt;Europe/Paris&lt;/code&gt; is based on
the &lt;code&gt;EU&lt;/code&gt; rule, our modification will be based on this rule name.&lt;/p&gt;
&lt;pre&gt;
# mkdir -p /tmp/zoneinfo/src
# cp /usr/share/lib/zoneinfo/src/europe /tmp/zoneinfo/src
# diff /usr/share/lib/zoneinfo/src/europe /tmp/zoneinfo/src/europe
1073a1074,1076
&amp;gt; # Test the DST adjustment one day in advance, for March 2008 only.
&amp;gt; # Rule        NAME    FROM    TO      TYPE    IN      ON      AT      SAVE    LETTER/S
&amp;gt; Rule          EU      2008    only    -       Mar     29       2:00   1:00    S
&lt;/pre&gt;
&lt;p&gt;Last, compile the updated time zone definition, put it in place, and verify
the new DST date.&lt;/p&gt;
&lt;pre&gt;
# zic -d /tmp/zoneinfo /tmp/zoneinfo/src/europe
# cp /tmp/zoneinfo/Europe/Paris /usr/share/lib/zoneinfo/Europe
# zdump -v `rtc` | \
   awk '$6 ~ /'&amp;quot;`date '+%Y'`&amp;quot;'/ &amp;amp;&amp;amp; $12 !~ /'&amp;quot;`date '+%H:%M:%S'`&amp;quot;'/ {print $0}'
Europe/Paris  &lt;strong&gt;Sat Mar 29&lt;/strong&gt; 00:59:59 2008 UTC = &lt;strong&gt;Sat Mar 29&lt;/strong&gt; 01:59:59 2008 CET isdst=0
Europe/Paris  &lt;strong&gt;Sat Mar 29&lt;/strong&gt; 01:00:00 2008 UTC = &lt;strong&gt;Sat Mar 29&lt;/strong&gt; 03:00:00 2008 CEST isdst=1
Europe/Paris  Sun Oct 26 00:59:59 2008 UTC = Sun Oct 26 02:59:59 2008 CEST isdst=1
Europe/Paris  Sun Oct 26 01:00:00 2008 UTC = Sun Oct 26 02:00:00 2008 CET isdst=0
&lt;/pre&gt;
&lt;p&gt;Once the fake DST adjustment is validated at the software level, clean
things up a little.&lt;/p&gt;
&lt;pre&gt;
# zic /usr/share/lib/zoneinfo/src/europe
# rm -r /tmp/zoneinfo
&lt;/pre&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/04/06/Change-The-DST-Time-Zone-Definition-For-Test-Purpose#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/04/06/Change-The-DST-Time-Zone-Definition-For-Test-Purpose#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240695</wfw:commentRss>
      </item>
    
  <item>
    <title>Update A Corrupted GRUB Boot Archive, With SVM</title>
    <link>http://blog.thilelli.net/post/2008/03/13/Update-A-Corrupted-GRUB-Boot-Archive-With-SVM</link>
    <guid isPermaLink="false">urn:md5:b5598b63dae0936f68d33ae02dad8fff</guid>
    <pubDate>Thu, 13 Mar 2008 12:25:00 +0100</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
        <category>boot archive</category><category>failsafe</category><category>GRUB</category><category>SVM</category>    
    <description>    &lt;p&gt;In a &lt;a href=&quot;http://blog.thilelli.net/post/2008/03/09/Update-A-Corrupted-GRUB-Boot-Archive-Without-SVM&quot; hreflang=&quot;en&quot;&gt;previous discussion&lt;/a&gt; about the GRUB boot archive and how it can be
regenerated, I mentioned that it will not be as easy as it can be when the root
file system use the &lt;code&gt;md&lt;/code&gt; driver. I will now show two different
methods to do the same thing when the root file system is build upon a SVM
mirror (RAID-1):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Unmirror the root file system only.&lt;/li&gt;
&lt;li&gt;Unmirror the entire system, i.e. all devices.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;Note: Although this test case was done using Solaris 10 8/07 under a
virtual machine build upon &lt;a href=&quot;http://www.virtualbox.org/&quot; hreflang=&quot;en&quot;&gt;VirtualBox&lt;/a&gt; on latest Solaris Express Community Edition, the
instructions must be valid for Solaris 10 1/06 and later.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Initial setup&lt;/h3&gt;
&lt;p&gt;As we can see, the system use only a root file system, and a swap device.
Both are encapsulated with SVM.&lt;/p&gt;
&lt;pre&gt;
# df -k -F ufs
Filesystem     kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d0 6147798 3455578 2630743      57%  /
# swap -l
swapfile             dev  swaplo blocks   free
/dev/md/dsk/d1      85,1       8 4194288 4194288
# metastat -c d0 d1
d0               m  6.0GB d10 d20
    d10          s  6.0GB c0d0s0
    d20          s  6.0GB c1d1s0
d1               m  2.0GB d11 d21
    d11          s  2.0GB c0d0s1
    d21          s  2.0GB c1d1s1
&lt;/pre&gt;
&lt;h3&gt;Unmirror the root file system only&lt;/h3&gt;
&lt;p&gt;The idea is to boot on the GRUB failsafe mode, select the first side of the
mirror, and modify the &lt;code&gt;system&lt;/code&gt; and &lt;code&gt;vfstab&lt;/code&gt;
configuration files to use the correct device path. For the &lt;code&gt;system&lt;/code&gt;
file, this means to actually remove the
&lt;code&gt;rootdev:/pseudo/md@0:0,0,bl&lt;/code&gt; entry, not just comment it. For the
&lt;code&gt;vfstab&lt;/code&gt; file, this means replacing the root file system metadevice
path &lt;code&gt;/dev/md/[r]dsk/d0&lt;/code&gt; by the first underlying device path, i.e.
&lt;code&gt;/dev/[r]dsk/c0d0s0&lt;/code&gt;. Last, regenerate the boot archive on the
alternate root path.&lt;/p&gt;
&lt;pre&gt;
[...]
Booting to milestone &amp;quot;milestone/single-user:default&amp;quot;.
Configuring devices.
Searching for installed OS instances...
/dev/dsk/c0d0s0 is under md control, skipping.
/dev/dsk/c1d1s0 is under md control, skipping.
No installed OS instance found.

Starting shell.
# fsck /dev/rdsk/c0d0s0
# mount -F ufs /dev/dsk/c0d0s0 /a
# cp /a/etc/system /a/etc/system.bckp
# cp /a/etc/vfstab /a/etc/vfstab.bckp
# TERM=vt100 vi /a/etc/system
# TERM=vt100 vi /a/etc/vfstab
# bootadm update-archive -R /a
# umount /a
# fsck /dev/rdsk/c0d0s0
# reboot
&lt;/pre&gt;
&lt;p&gt;Then, boot into &lt;code&gt;milestone/multi-user:default&lt;/code&gt; level and detach
the second half of the mirror, since the first half correspond to the valid and
updated underlying device. Next, restore the original configuration files which
refers to the encapsulated metadevices, and reboot.&lt;/p&gt;
&lt;pre&gt;
# df -k -F ufs
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0d0s0      6147798 3458810 2627511    57%    /
# swap -l
swapfile             dev  swaplo blocks   free
/dev/md/dsk/d1      85,1       8 4194288 4194288
# metastat -c d0
d0               m  6.0GB d10 d20
    d10          s  6.0GB c0d0s0
    d20          s  6.0GB c1d1s0
# metadetach d0 d20
d0: submirror d20 is detached
# metastat -c d0
d0               m  6.0GB d10
    d10          s  6.0GB c0d0s0
# cp /etc/system.orig /etc/system
# cp /etc/vfstab.orig /etc/vfstab
# shutdown -y -i 6 -g 0
&lt;/pre&gt;
&lt;p&gt;After the reboot, just reattach the second half of the mirror, and wait for
complete synchronization to be fully redundant again.&lt;/p&gt;
&lt;pre&gt;
# df -k -F ufs
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d0       6147798 3458714 2627607    57%    /
# swap -l
swapfile             dev  swaplo blocks   free
/dev/md/dsk/d1      85,1       8 4194288 4194288
# metattach d0 d20
d0: submirror d20 is attached
# metastat -c d0
d0               m  6.0GB d10 d20 (resync-29%)
    d10          s  6.0GB c0d0s0
    d20          s  6.0GB c1d1s0
&lt;/pre&gt;
&lt;h3&gt;Unmirror the entire system, i.e. all devices&lt;/h3&gt;
&lt;p&gt;The idea is exactly the same as for unmirroring the root file system only,
but adapting the &lt;code&gt;vfstab&lt;/code&gt; file to change the swap entry, too. (So, I
didn't reproduce the code listing here.)&lt;/p&gt;
&lt;p&gt;Then, boot into &lt;code&gt;milestone/single-user:default&lt;/code&gt; level modifying
the corresponding GRUB entry as follow: &lt;code&gt;kernel /platform/i86pc/multiboot
&lt;strong&gt;-s&lt;/strong&gt;&lt;/code&gt;. Completely delete all the metadevices and
&lt;code&gt;metadb&lt;/code&gt; configurations to clear SVM settings. Last, continue into
&lt;code&gt;milestone/multi-user:default&lt;/code&gt; level to boot unmirrored.&lt;/p&gt;
&lt;pre&gt;
# metaclear -f -r d0 d1
# metadb -f -d  c1d0s4 c1d0s4
# ^D
&lt;/pre&gt;
&lt;p&gt;Now, the system must be fully encapsulate by SVM again. Please refer to
online &lt;a href=&quot;http://docs.sun.com/app/docs/doc/816-4520/tasks-mirrors-21?a=view&quot; hreflang=&quot;en&quot;&gt;Sun Documentation&lt;/a&gt;, or some past entries on this subject, depending on
the system's architecture: &lt;a href=&quot;http://blog.thilelli.net/post/2005/06/06/Encapsulation-of-the-Systems-Disk-Using-SVM&quot; hreflang=&quot;en&quot;&gt;SPARC systems&lt;/a&gt;, or &lt;a href=&quot;http://blog.thilelli.net/post/2007/05/30/RAID-1-Volume-From-the-root-File-System-Using-SVM-on-x86-Platform&quot; hreflang=&quot;en&quot;&gt;x86 platforms&lt;/a&gt;.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/03/13/Update-A-Corrupted-GRUB-Boot-Archive-With-SVM#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/03/13/Update-A-Corrupted-GRUB-Boot-Archive-With-SVM#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240697</wfw:commentRss>
      </item>
    
  <item>
    <title>Update A Corrupted GRUB Boot Archive, Without SVM</title>
    <link>http://blog.thilelli.net/post/2008/03/09/Update-A-Corrupted-GRUB-Boot-Archive-Without-SVM</link>
    <guid isPermaLink="false">urn:md5:d521d1cac1ff1d4721efd170dc90e228</guid>
    <pubDate>Sun, 09 Mar 2008 18:32:00 +0100</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
        <category>boot archive</category><category>failsafe</category><category>GRUB</category>    
    <description>    &lt;p&gt;Solaris 10 systems on x86 architecture use the GNU GRand Unified Bootloader
(GRUB) which is the boot loader responsible for loading a boot archive into a
system's memory. The boot archive is a collection of critical files (kernel
modules and configuration files) that are required to boot the Solaris OS. As
stated in the &lt;a href=&quot;http://docs.sun.com/app/docs/doc/817-1985/6mhm8o5ou?a=view&quot; hreflang=&quot;en&quot;&gt;Sun
documentation&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;These files are needed during system startup before the root file system is
mounted. Two boot archives are maintained on a system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The boot archive that is used to boot the Solaris OS on a system. This boot
archive is sometimes called the primary boot archive.&lt;/li&gt;
&lt;li&gt;The boot archive that is used for recovery when the primary boot archive is
damaged. This boot archive starts the system without mounting the root file
system. On the GRUB menu, this boot archive is called failsafe. The archive's
essential purpose is to regenerate the primary boot archive, which is usually
used to boot the system.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;The Solaris OS generally keeps the boot archive properly synchronized on its
own. Sometimes, the boot archive gets corrupted--for example when (bad) patches
are applied, or the the operating system crashed. In these cases, the boot
archive must be regenerated. This is easily accomplished following the Sun
documentations &lt;a href=&quot;http://docs.sun.com/app/docs/doc/817-1985/6mhm8o5pu?a=view&quot; hreflang=&quot;en&quot;&gt;x86:
How to Boot the Failsafe Archive for Recovery Purposes&lt;/a&gt;, and &lt;a href=&quot;http://docs.sun.com/app/docs/doc/817-1985/6mhm8o5q0?a=view&quot; hreflang=&quot;en&quot;&gt;x86:
How to Boot the Failsafe Archive to Forcibly Update a Corrupt Boot Archive&lt;/a&gt;.
The main drawback is when the system is encapsulated under a SVM mirror
(RAID-1) since the &lt;code&gt;md&lt;/code&gt; driver is not managed under the failsafe
mode. Please refer to this &lt;a href=&quot;http://blog.thilelli.net/post/2008/03/13/Update-A-Corrupted-GRUB-Boot-Archive-With-SVM&quot; hreflang=&quot;en&quot;&gt;blog entry&lt;/a&gt; on this subject, if needed.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/03/09/Update-A-Corrupted-GRUB-Boot-Archive-Without-SVM#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/03/09/Update-A-Corrupted-GRUB-Boot-Archive-Without-SVM#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240795</wfw:commentRss>
      </item>
    
  <item>
    <title>Create And Remove A Remote Printer Queue (CLI)</title>
    <link>http://blog.thilelli.net/post/2008/03/05/Create-And-Remove-A-Remote-Printer-Queue-CLI</link>
    <guid isPermaLink="false">urn:md5:28d3d97dec6afd78dd575279b6945076</guid>
    <pubDate>Wed, 05 Mar 2008 15:04:00 +0100</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>HP-UX</category>
        <category>printer</category><category>remote</category>    
    <description>    &lt;p&gt;You can easily create and remove a remote printer queue using the BSD type
spooler. You just have to fill the configuration file &lt;code&gt;/tmp/lp.list&lt;/code&gt;
properly, i.e. provide the local printer name, the remote LPD server, and the
remote printer queue:&lt;/p&gt;
&lt;pre&gt;
# cat &amp;lt;&amp;lt; EOF &amp;gt; /tmp/lp.list
locname1 lpdserv1 remname1
locname2 lpdserv2 remname2
EOF
&lt;/pre&gt;
&lt;p&gt;Then, just run the appropriate script depending of the desired behavior.
Follow, an example when removing the two queues:&lt;/p&gt;
&lt;pre&gt;
# cat &amp;lt;&amp;lt; EOF &amp;gt; /tmp/lp.remove
#!/usr/bin/env sh

for lplocal in `awk '{print $1}' /tmp/lp.list`; do
  /usr/sbin/lpshut
  /usr/bin/cancel ${lplocal} -e 2&amp;gt; /dev/null
  /usr/sbin/lpadmin -x${lplocal}
  /usr/sbin/lpsched -v
  sleep 1
done

exit 0
EOF
# sh /tmp/lp.remove
scheduler stopped
scheduler is running
scheduler stopped
scheduler is running
# lpstat -olocname1
no system default destination
lpstat: &amp;quot;locname1&amp;quot; not a request id or a destination
&lt;/pre&gt;
&lt;p&gt;And now, the creation:&lt;/p&gt;
&lt;pre&gt;
# cat &amp;lt;&amp;lt; EOF &amp;gt; /tmp/lp.create
#!/usr/bin/env sh

while read lp; do
  eval set -- `IFS=&amp;quot; &amp;quot;; printf '&amp;quot;%s&amp;quot; ' ${lp}`
  lplocal=&amp;quot;$1&amp;quot;
  lpserver=&amp;quot;$2&amp;quot;
  lpremote=&amp;quot;$3&amp;quot;

  /usr/sbin/lpshut
  /usr/sbin/lpadmin -p${lplocal} -orm${lpserver} -orp${lpremote} \
   -mrmodel -v/dev/null -orc -ob3 -ocmrcmodel -osmrsmodel
  /usr/sbin/accept ${lplocal}
  /usr/bin/enable ${lplocal}
  /usr/sbin/lpsched -v
  sleep 1
done &amp;lt; /tmp/lp.list

exit 0
EOF
# sh /tmp/lp.create
scheduler stopped
destination &amp;quot;locname1&amp;quot; now accepting requests
printer &amp;quot;locname1&amp;quot; now enabled
scheduler is running
scheduler stopped
destination &amp;quot;locname2&amp;quot; now accepting requests
printer &amp;quot;locname2&amp;quot; now enabled
scheduler is running
# lpstat -olocname1
no system default destination
printer queue for locname1
                         Windows LPD Server
                   Printer \\lpdserv1emname1
Owner       Status         Jobname          Job-Id    Size   Pages  Priority
----------------------------------------------------------------------------
hostname: locname1: ready and waiting
no entries
&lt;/pre&gt;
&lt;p&gt;That's it!&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/03/05/Create-And-Remove-A-Remote-Printer-Queue-CLI#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/03/05/Create-And-Remove-A-Remote-Printer-Queue-CLI#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240698</wfw:commentRss>
      </item>
    
  <item>
    <title>LVM2 Simple Mirroring On RHEL4</title>
    <link>http://blog.thilelli.net/post/2008/02/15/LVM2-Simple-Mirroring-On-RHEL4</link>
    <guid isPermaLink="false">urn:md5:925092e7697f0720aa7a25711552b43a</guid>
    <pubDate>Fri, 15 Feb 2008 13:25:00 +0100</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>GNU/Linux</category>
        <category>LVM</category><category>mirror</category>    
    <description>    &lt;p&gt;When the need to evacuate all persistent SAN storage from EMC DMX1K to HP
XP12K (HDS), three main solutions were envisaged. The first one was brute data
copy (&lt;code&gt;tar&lt;/code&gt;, &lt;code&gt;cpio&lt;/code&gt;, etc.) but was not very practical
with the size of the data (multi-terabytes) and the time involved in copying
them. The two others were based on LVM technologies: mirroring, or moving.&lt;/p&gt;
&lt;p&gt;Although the choice has been to use the online and transparent moving data
technology (see &lt;code&gt;pvmove&lt;/code&gt; for more information), it was interesting
to note that Red Hat has backported support for the &lt;a href=&quot;https://rhn.redhat.com/errata/RHBA-2006-0504.html&quot; hreflang=&quot;en&quot;&gt;creation and
manipulation of simple mirrors&lt;/a&gt; to their RHEL4 distribution. These
functionalities were introduced with the &lt;code&gt;RHBA-2006:0504-15&lt;/code&gt;
advisory issued on 2006-08-10, i.e. between RHEL4 Update 4 and RHEL4 Update 5
(and so available via RHN at this time). It is just too bad that the online
help for LVM commands are not properly synchronized nor fully documented by the
corresponding manual page: clearly, this doesn't help to use them in the best
conditions (no, Google isn't always the better option when using these kinds of
functionalities in big companies).&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/02/15/LVM2-Simple-Mirroring-On-RHEL4#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/02/15/LVM2-Simple-Mirroring-On-RHEL4#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240702</wfw:commentRss>
      </item>
    
  <item>
    <title>Deleting SCSI Device Paths For A Multipath SAN LUN</title>
    <link>http://blog.thilelli.net/post/2008/02/09/Deleting-SCSI-Device-Paths-For-A-Multipath-SAN-LUN</link>
    <guid isPermaLink="false">urn:md5:7779483a411224c33d64d7292c41f28d</guid>
    <pubDate>Sat, 09 Feb 2008 12:28:00 +0100</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>GNU/Linux</category>
        <category>EMC</category><category>multipath</category><category>PowerPath</category>    
    <description>    &lt;p&gt;When releasing a multipath device under RHEL4, different SCSI devices
corresponding to different paths must be cleared properly before removing the
SAN LUN effectively. When the LUN was delete before to clean up the paths at
the OS level, it is always possible to remove them afterwards. &lt;em&gt;In the
following example, it is assume that the freeing LVM manipulations were already
done, and that the LUN is managed by EMC PowerPath.&lt;/em&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First, get and verify the SCSI devices corresponding to the multipath LUN:
&lt;pre&gt;
# grep &amp;quot;I/O error on device&amp;quot; /var/log/messages | tail -2
Feb  4 00:20:47 beastie kernel: Buffer I/O error on device sdo, \
 logical block 12960479
Feb  4 00:20:47 beastie kernel: Buffer I/O error on device sdp, \
 logical block 12960479
# powermt display dev=sdo
Bad dev value sdo, or not under Powerpath control.
# powermt display dev=sdp
Bad dev value sdp, or not under Powerpath control.
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Then, get the appropriate &lt;code&gt;scsi#:channel#:id#:lun#&lt;/code&gt;
informations:
&lt;pre&gt;
# find /sys/devices -name &amp;quot;*block&amp;quot; -print | \
 xargs \ls -l | awk -F\/ '$NF ~ /sdo$/ || $NF ~ /sdp$/ \
 {print &amp;quot;HBA: &amp;quot;$7&amp;quot;\tscsi#:channel#:id#:lun#: &amp;quot;$9}'
HBA: host0      scsi#:channel#:id#:lun#: 0:0:0:9
HBA: host0      scsi#:channel#:id#:lun#: 0:0:1:9
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;When the individual SCSI paths are known, remove them from the system:
&lt;pre&gt;
# echo 1 &amp;gt; /sys/bus/scsi/devices/0\:0\:0\:9/delete
# echo 1 &amp;gt; /sys/bus/scsi/devices/0\:0\:1\:9/delete
# dmesg | grep &amp;quot;Synchronizing SCSI cache&amp;quot;
Synchronizing SCSI cache for disk sdp:
Synchronizing SCSI cache for disk sdo:
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/02/09/Deleting-SCSI-Device-Paths-For-A-Multipath-SAN-LUN#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/02/09/Deleting-SCSI-Device-Paths-For-A-Multipath-SAN-LUN#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240793</wfw:commentRss>
      </item>
    
  <item>
    <title>Tuning Is Evil</title>
    <link>http://blog.thilelli.net/post/2007/12/23/Tuning-Is-Evil</link>
    <guid isPermaLink="false">urn:md5:0e3aff13ea08fec38fdf7b4a67ed94c0</guid>
    <pubDate>Sun, 23 Dec 2007 21:48:00 +0100</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>General</category>
        <category>tuning</category>    
    <description>    &lt;p&gt;Each month, I hear many coworkers or specific application management teams
asking about putting some system tunings in place, even on very recent
operating system releases. All the time. Most of these settings comes from the
Internet, are found in forum posts, or articles related to a subsystem, or in
technical publications. And some of them comes from third party software
providers, or editors. A very, very few settings are proposed or recommended by
system administrators, or by knowledgeable people in tuning area.&lt;/p&gt;
&lt;p&gt;The problem is that, most of the time, these tunings are related to another
release of the operating system, are not updated to keep current with the Best
Of Practices for a given OS release, or simply are not well understood and not
applicable without affecting (badly) current running environments. More,
already present tunings are reported as-is on upgraded and fresh installed
systems without more thinking, or without be assured these are always
applicable (or obsolete) and what are the new defaults (if not dynamic). One of
the most representative example today of this is the new &lt;a href=&quot;http://docs.sun.com/app/docs/doc/817-0404/6mg74vs92?a=view#chapter1-33&quot; hreflang=&quot;en&quot;&gt;System V IPC facilities&lt;/a&gt; found from the GA Solaris 10, and
later, operating system, where some Oracle DBAs always ask SA team for shared
memory settings as found on Solaris 8 systems.&lt;/p&gt;
&lt;p&gt;Although extract from the &lt;a href=&quot;http://www.solarisinternals.com/&quot; hreflang=&quot;en&quot;&gt;Solaris Internals and Performance FAQ&lt;/a&gt; for ZFS, here is a
great excerpt we all must read carefully and try to keep in mind when modifying
default behavior of a system:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Tuning is evil and should not be done...in general.&lt;/p&gt;
&lt;p&gt;First, consider that the default values are set by the people who know most
things about the effects of the tuning. If a better value exists, it would be
the default. While alternative values might help a given workload, it could
quite possibly degrade some other aspects of performance. Maybe,
catastrophically so.&lt;/p&gt;
&lt;p&gt;Over time, tuning recommendations might become stale at best or might lead
to performance degradations. Customers are leery of changing a tuning that is
in place and the net effect is a worse product than what it could be. Moreover,
tuning enabled on a given system might spread to other systems, where it might
not be warranted at all.&lt;/p&gt;
&lt;/blockquote&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2007/12/23/Tuning-Is-Evil#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2007/12/23/Tuning-Is-Evil#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240802</wfw:commentRss>
      </item>
    
  <item>
    <title>A Process Can Not Be Killed Upon Hanging In sendfilev()</title>
    <link>http://blog.thilelli.net/post/2008/09/12/Processes-Can-Not-Be-Killed-Upon-Hanging-In-sendfilev</link>
    <guid isPermaLink="false">urn:md5:d9f1ccf8cd55422557318a94f0a0ba7a</guid>
    <pubDate>Mon, 17 Dec 2007 14:30:00 +0100</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>Solaris</category>
        <category>bug</category><category>sendfilev()</category><category>signal</category><category>Solaris 10</category>    
    <description>    &lt;p&gt;Here is a little but annoying bug I faced recently on a production system
running Solaris 10 11/06: a process can not be killed.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;KILL&lt;/code&gt; signal can't be ignored by a process. The associated
handler must be the default--taking the signal into account, and honor it--and
it is the case (the incriminated process id is 26632):&lt;/p&gt;
&lt;pre&gt;
# psig 26632 | grep KILL
KILL    default
&lt;/pre&gt;
&lt;p&gt;Nevertheless, the process seems not to stop as expected:&lt;/p&gt;
&lt;pre&gt;
# echo $$
2913
#
# kill -s KILL 26632
#
# dtrace -n 'fbt::sigtoproc:entry /pid == 2913/ {trace(arg2); trace(execname);}'
dtrace: description 'fbt::sigtoproc:entry ' matched 1 probe
CPU     ID                    FUNCTION:NAME
 18  16387                  sigtoproc:entry                 9  tcsh
#
# ps -ef | awk '$2 ~ /26632/ {print $0}'
nonpriv 26632     1   0   Nov 13 ?         0:01 /usr/sbin/in.ftpd -a
&lt;/pre&gt;
&lt;p&gt;This not the correct behavior since a pending signal is not honored:&lt;/p&gt;
&lt;pre&gt;
# pflags 26632
26632:  /usr/sbin/in.ftpd -a
       data model = _ILP32  flags = ORPHAN|MSACCT|MSFORK
       sigpend = 0x00006100,0x00000000
/1:    flags = 0
&lt;/pre&gt;
&lt;p&gt;More, the process seems in a non-coherent system state: it is now nearly
impossible to trace it using, &lt;code&gt;truss&lt;/code&gt;, the
&lt;code&gt;proctools&lt;/code&gt;,...&lt;/p&gt;
&lt;pre&gt;
# truss -alef -p 26632
truss: unanticipated system error: 26632
#
# pstack 26632
pstack: cannot examine 26632: unanticipated system error
#
# pfiles 26632
pfiles: unanticipated system error: 26632
#
# pldd 26632
pldd: cannot examine 26632: unanticipated system error
&lt;/pre&gt;
&lt;p&gt;... or helped by &lt;code&gt;DTace&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;
# dtrace -n 'profile-1000hz /pid ==26632/ { @[stack()] = count() }'
dtrace: description 'profile-1000hz ' matched 1 probe
^C
#
# dtrace -n 'profile-1000hz /pid ==26632/ { @[ustack()] = count() }'
dtrace: description 'profile-1000hz ' matched 1 probe
^C
&lt;/pre&gt;
&lt;p&gt;Follow some information gathered through &lt;code&gt;mdb&lt;/code&gt; in kernel
debugging mode:&lt;/p&gt;
&lt;pre&gt;
&amp;gt; ::status
debugging live kernel (64-bit) on socrate
operating system: 5.10 Generic_118833-36 (sun4u)
&amp;gt;
&amp;gt; ::showrev
Hostname: socrate
Release: 5.10
Kernel architecture: sun4u
Application architecture: sparcv9
Kernel version: SunOS 5.10 sun4u Generic_118833-36
Platform: SUNW,Sun-Fire-V490
&amp;gt;
&amp;gt; ::pgrep in.ftpd
S    PID   PPID   PGID    SID    UID      FLAGS             ADDR NAME
R  26632      1    261    261  30501 0x5a024b00 00000600144b0c28 in.ftpd
&amp;gt;
&amp;gt; 00000600144b0c28::kill
mdb: command is not supported by current target
&amp;gt;
&amp;gt; 00000600144b0c28::thread
            ADDR    STATE    FLG PFLG SFLG   PRI  EPRI PIL             INTR
00000600144b0c28 inval/2000 157e 5778    0     0     0   6                2
&amp;gt;
&amp;gt; 00000600144b0c28::walk thread | ::findstack
stack pointer for thread 30002aba360: 2a1022e7ec1
[ 000002a1022e7ec1 cv_wait+0x38() ]
  000002a1022e7f71 page_lock_es+0x204()
  000002a1022e8021 pvn_vplist_dirty+0x2a4()
  000002a1022e8101 nfs_putpages+0x124()
  000002a1022e81c1 nfs3_putpage+0xcc()
  000002a1022e8271 fop_putpage+0x1c()
  000002a1022e8321 nfs_purge_caches+0xe4()
  000002a1022e83d1 nfs_attr_cache+0x20c()
  000002a1022e8481 nfs3_getattr_otw+0x1b8()
  000002a1022e85f1 nfs3_validate_caches+0x4c()
  000002a1022e8731 nfs3_getpage+0xa4()
  000002a1022e8861 fop_getpage+0x44()
  000002a1022e8931 segmap_getmapflt+0x588()
  000002a1022e8a41 snf_segmap+0x13c()
  000002a1022e8bc1 sosendfile64+0x298()
  000002a1022e8d21 sendvec64+0xf8()
  000002a1022e8f61 sendfilev+0x178()
  000002a1022e92e1 syscall_trap32+0xcc()
&lt;/pre&gt;
&lt;p&gt;We can see the use of the &lt;code&gt;sendfilev()&lt;/code&gt; syscall: it appears to be
a &lt;a href=&quot;http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6455727&quot; hreflang=&quot;en&quot;&gt;known bug&lt;/a&gt; &lt;a href=&quot;http://sunsolve.sun.com/search/document.do?assetkey=1-1-6455727-1&quot; hreflang=&quot;en&quot;&gt;around this&lt;/a&gt; (you must have a registered Sun support customer account
to be able to view the second document).&lt;/p&gt;
&lt;p&gt;The good news is the root cause is already fix in the development branch of
the operating system. The bad news is, after opening a call to the Sun support
team, that no patch will be released in a near future to correct this: the
incorporation of the fix is currently planned for the next major Solaris 10
Update (Update 5) which is scheduled for summer 2008. However, the fix is
already available via the Solaris Express program, if that is applicable to
your environment. As a last note, and if the non-killable process owns a
resource necessary to another program, there seems no other option than to plan
a reboot of the system.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2008/09/12/Processes-Can-Not-Be-Killed-Upon-Hanging-In-sendfilev#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2008/09/12/Processes-Can-Not-Be-Killed-Upon-Hanging-In-sendfilev#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240801</wfw:commentRss>
      </item>
    
  <item>
    <title>Nifty Tool For Querying Heterogeneous SCSI Devices</title>
    <link>http://blog.thilelli.net/post/2007/12/01/Nifty-Tool-For-Querying-Heterogeneous-SCSI-Devices</link>
    <guid isPermaLink="false">urn:md5:a8ab46147681e3aed3974fa27622e950</guid>
    <pubDate>Sat, 01 Dec 2007 17:45:00 +0100</pubDate>
    <dc:creator>Julien Gabel</dc:creator>
        <category>OpenSolaris</category>
        <category>EMC</category><category>inq</category><category>SCSI</category>    
    <description>    &lt;p&gt;&lt;a href=&quot;http://www.oesterild.dk/&quot; hreflang=&quot;en&quot;&gt;Lasse Østerild&lt;/a&gt; remind
us about the EMC &lt;code&gt;inq&lt;/code&gt; tool, which is able to query SCSI buses to
find a large range of devices, of many sort. This great utility support non-EMC
targets, and is &lt;a href=&quot;ftp://ftp.emc.com/pub/symm3000/inquiry/&quot; hreflang=&quot;en&quot;&gt;freely available&lt;/a&gt; (just be aware that the &lt;em&gt;latest&lt;/em&gt; link seems
not to be updated frequently, so check the latest version yourself in the
list).&lt;/p&gt;
&lt;p&gt;Here are two examples taken respectively from a Sun Fire V490 UltraSPARC
system running Solaris 9...&lt;/p&gt;
&lt;pre&gt;
# ./inq.sol64
Inquiry utility, Version V7.3-845 (Rev 2.0)      (SIL Version V6.4.2.0
(Edit Level 845)
Copyright (C) by EMC Corporation, all rights reserved.
For help type inq -h.
---------------------------------------------------------------------------------------
DEVICE                            :VEND     :PROD             :REV  :SERNUM  :CAP(kb)
---------------------------------------------------------------------------------------
/dev/rdsk/c0t0d0s2                :TSSTcorp :DVD-ROM TS-H352C :SI00 :        :  -----
/dev/rdsk/c1t0d0s2                :FUJITSU  :MAX3147FCSUN146G :1103:0639G02A :143369664
/dev/rdsk/c1t3d0s2                :FUJITSU  :MAX3147FCSUN146G :1103:0638G02A :143369664
/dev/rdsk/c2t50060E8004F2F520d0s2 :HP       :OPEN-V*2         :5007 :500F2F5 :103683840
/dev/rdsk/c3t50060E8004F2F510d6s2 :HP       :OPEN-V*7         :5007 :500F2F5 :362893440
/dev/vx/rdmp/XP12K_SQC_0s2        :HP       :OPEN-V*3         :5007 :500F2F5 :155525760
/dev/vx/rdmp/XP12K_SQC_6s2        :HP       :OPEN-V*7         :5007 :500F2F5 :362893440
/dev/vx/rdmp/c1t0d0s2             :FUJITSU  :MAX3147FCSUN146G :1103:0639G02A :143369664
/dev/vx/rdmp/c1t3d0s2             :FUJITSU  :MAX3147FCSUN146G :1103:0638G02A :143369664
# 
# ./inq.sol64 -hba
Inquiry utility, Version V7.3-845 (Rev 2.0)      (SIL Version V6.4.2.0
(Edit Level 845)
Copyright (C) by EMC Corporation, all rights reserved.
For help type inq -h.
---------------------------------------------------
HBA name:           QLogic Corp.-2200-0
host WWN:           200000144F415386
vendor name:        QLogic Corp.
model:              2200
firmware version:   2.1.144
driver version:     20060630-2.16
serial number:      Unknown
vendor code:        0x144f
HBA type:           Fibre Channel
port count:         1

port number:       1
    port WWN:           210000144F415386
    Port OS name:       /dev/cfg/c1
    port type:          LPORT
    port speed:         1GBIT
    supported speed:    1GBIT
    port state:         ONLINE
    port FCID:          0x1
---------------------------------------------------
HBA name:           Sun Microsystems, Inc.-LP10000-S-1
host WWN:           20000000C957A8E8
vendor name:        Sun Microsystems, Inc.
model:              LP10000-S
firmware version:   1.91a5
driver version:     1.11i (2006.07.11.10.53)
serial number:      0999BG0-0635000219
vendor code:        0xc9
HBA type:           Fibre Channel
port count:         1

port number:       1
    port WWN:           10000000C957A8E8
    Port OS name:       /dev/cfg/c2
    port type:          NPORT
    port speed:         2GBIT
    supported speed:    2GBIT
    port state:         ONLINE
    port FCID:          0x10900
[...]
&lt;/pre&gt;
&lt;p&gt;... and a HP DL585G2 AMD64 system running RHEL4U5. Both are connected to a
remote SAN served by a HP XP12K (HDS refurbished) storage system:&lt;/p&gt;
&lt;pre&gt;
# ./inq.LinuxAMD64 -f_powerpath -f_hds
Inquiry utility, Version V7.3-845 (Rev 2.0)      (SIL Version V6.4.2.0
(Edit Level 845)
Copyright (C) by EMC Corporation, all rights reserved.
For help type inq -h.
----------------------------------------------------------------------
DEVICE         :VEND    :PROD            :REV   :SER NUM    :CAP(kb)
----------------------------------------------------------------------
/dev/emcpowere :HP      :OPEN-V*6        :5007  :50 0F2F5   :311051520
/dev/emcpowerf :HP      :OPEN-V*6        :5007  :50 0F2F5   :311051520
/dev/emcpowerg :HP      :OPEN-V*10       :5007  :50 0F2F5   :307785600
/dev/emcpowerh :HP      :OPEN-V*10       :5007  :50 0F2F5   :307785600
/dev/emcpowerj :HP      :OPEN-V*6        :5007  :50 0F2F5   :307203840
/dev/emcpowerk :HP      :OPEN-V*4        :5007  :50 0F2F5   :206085120
&lt;/pre&gt;
&lt;p&gt;Although this tool works great with an OpenSolaris distribution (say, the
Solaris Express family), there appear not to have a x86 declination which is a
pity knowing the growing Solaris/OpenSolaris community in the marketplace
today. Well, maybe for a next &lt;code&gt;inq&lt;/code&gt; release, at least I hope.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.thilelli.net/post/2007/12/01/Nifty-Tool-For-Querying-Heterogeneous-SCSI-Devices#comment-form</comments>
      <wfw:comment>http://blog.thilelli.net/post/2007/12/01/Nifty-Tool-For-Querying-Heterogeneous-SCSI-Devices#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.thilelli.net/feed/rss2/comments/240800</wfw:commentRss>
      </item>
    
</channel>
</rss>