Thursday, February 24, 2005
Tuesday, February 22, 2005
Solaris backward compatibility - again
We needed to restore some data from backuped Oracle. We had available SPARC server with Solaris 10 already installed but backuped Oracle was running on Solaris 8 SPARC. We tried it anyway - after product and data files were restored from backup everything just started so we could get our data. To be clear - we run Oracle binaries for Solaris 8 on Solaris 10 without any problems. Wow! - ok, I was actually expecting this :) Another real life example of Solaris famous backward compatibility.
Tuesday, February 15, 2005
Getting stack
I will try to post here some useful, making life easier tricks from time to time.
Today - how to get stack of a process when it stuck and pstack does not work? Attaching mdb to the process doesn't work too. I got solution from Sun Engineering (thanks guys) some time ago - simple and works.
Today - how to get stack of a process when it stuck and pstack does not work? Attaching mdb to the process doesn't work too. I got solution from Sun Engineering (thanks guys) some time ago - simple and works.
$ mdb -k
Loading modules: [ unix krtld genunix ]
> ::ps ! grep metadevadm
R 317 1 7 7 0 0x42004900 0dbfe018 metadevadm
> 0dbfe018::walk thread |::findstack
stack pointer for thread d154c400: d18fdbd0
[ d18fdbd0 0xfe8222f2() ]
d18fdbe8 swtch+0x125()
...
...
...
Sunday, February 13, 2005
Solaris 10 bleeding-edge features
I've just set-up ZFS file system (over 1TB in size) on external disk array (Fibre Channel) under MPxIO on Solaris 10 x86 on IBM's x345 server. And it works :))) Cool :)
So with Solaris 10 running on x86/x64/SPARC server you can get just out of the box: SAN support, FC multipathing (MPxIO), IP multipathing (IPMP), soon ZFS, Zones, DTrace, SMF, NFSv4, ...
And all of that without any recompiling, patching, etc. Just install system, configure it and start using. Of course when Open Solaris will hit the streets you will be able to recompile, etc. if you really like to :) Isn't it cool? A lot of goodies to play with :) The hardest part is to find free time to play with it :)
And btw: Solaris 10 is FREE.
Some ZFS output (similar output was already publicly available so I guess it won't violate NDA).
So with Solaris 10 running on x86/x64/SPARC server you can get just out of the box: SAN support, FC multipathing (MPxIO), IP multipathing (IPMP), soon ZFS, Zones, DTrace, SMF, NFSv4, ...
And all of that without any recompiling, patching, etc. Just install system, configure it and start using. Of course when Open Solaris will hit the streets you will be able to recompile, etc. if you really like to :) Isn't it cool? A lot of goodies to play with :) The hardest part is to find free time to play with it :)
And btw: Solaris 10 is FREE.
Some ZFS output (similar output was already publicly available so I guess it won't violate NDA).
$ zpool df
Pool size used avail capacity
-------------------- ------ ------ ------ --------
test 1.09T 5.79G 1.08T 1%
$
Wednesday, February 09, 2005
smf repository design and implementation choices
Really interesting post explaining smf repository design and implementation choices by Liane Praza.
You can find more first-hand information from Stephen Hahn too. And of course SMF documentation is here.
You can find more first-hand information from Stephen Hahn too. And of course SMF documentation is here.
Tuesday, February 08, 2005
Automated Solaris installs
One of my friend asked me today how to JumpStart system so he can install Solaris 10. The reason? It's much faster to install system over a network using JumpStart technology then using CD/DVD. And it's non-interactive (depends on configuration) and fully repeatable which is really useful on servers.
I've just found nice BluePrint article on Configuring JumpStart Servers to Provision Sun x86-64 Systems.
You can find more BluePrint articles about JumpStart here.
And of course there's a documentation on http://docs.sun.com on Solaris 10 Installation Guide: Custom JumpStart and Advanced Installations.
I've just found nice BluePrint article on Configuring JumpStart Servers to Provision Sun x86-64 Systems.
You can find more BluePrint articles about JumpStart here.
And of course there's a documentation on http://docs.sun.com on Solaris 10 Installation Guide: Custom JumpStart and Advanced Installations.
Cookbook for JumpStart:
Below method is a quick summary only without explaining anything. For more info look at above URLs.
It works on SPARC using RARP. If you want to JumpStart x86 system you have to configure PXE
and DHCP (look at URLs at the beginning of this post).
It assumes that both install server and client are on the same local network.
There are probably more assumptions.
There are other options available - like Flash archives, Live Upgrade, etc.
These are really nice features - so if you are really serious about automated installing
lot of servers - go and read about these features at least.
First we have to mount DVD ISO with Solaris 10.
It's nice that now Sun provides both DVD and CD ISOs.
Now you can mount and setup install server on one architecture
for another - for example setup install server entirely on SPARC
for x86/x64 and SPARC platforms without x86/x64 platform.
Second I prefer using ISOs - it's just faster that way and don't
have to burn CD/DVD.
lofiadm -a `pwd`/s10-GA-DVD-ISO_IMAGE
mount -F hsfs -o ro /dev/lofi/1 /mnt/install # /dev/lofi/1 - look here
cd /mnt/install/Solaris_10/Tools
./setup_install_server /install/s10-ga-sparc
cd /install/s10-ga-sparc/Solaris_10/Tools
mkdir /install/jumpstart
./add_install_client -c js_server:/install/jumpstart -p si_server:/install/jumpstart client sun4u
where: js_server is a jumpstart server
si_server is a sysidcfg server
client - hostname for a client being to install
I usually have js_sevrver = si_server = some_ip
for example:
./add_install_client -c 192.168.1.1:/install/jumpstart -p 192.168.1.1:/install/jumpstart test sun4u
Above script will enable RARP, tftp and bootparams daemons. If you don't like it
you can set up all this manually of course - look at URLs I pointed out at
the beginning of this post.
Now you have to create sysidcfg file in /install/jumpstart
$ cat sysidcfg
terminal=vt100
system_locale=C
timezone=Europe/Warsaw
security_policy=NONE
name_service=NONE
network_interface=PRIMARY
{netmask=255.255.255.0
protocol_ipv6=no
default_route=NONE}
timeserver=localhost
root_password=encrypted_password
Then create rules file in the same directory:
$ cat rules
arch sparc = s10_sparc_profile -
Now create file s10_sparc_profile, minimum would be:
$ cat s10_sparc_profile
install_type initial_install
system_type server
cluster SUNWCreq # Core system
partitioning explicit
filesys c0t0d0s0 2048 swap
filesys c0t0d0s1 2048 /
filesys c0t0d0s3 4096 /var
filesys c0t0d0s4 4096 /opt
This is minimal and will install Core distribution. Normally I add here:
package SUNWbash
package SUNWdoc
...
...
package SUNWatfsu delete
...
...
and so on
Now copy /install/s10-ga-sparc/Solaris_10/Misc/jumpstart_sample/check to /install/jumpstart
and run:
./check -r rules -p /install/s10-ga-sparc/
Validating rules...
Validating profile s10_sparc_profile...
The custom JumpStart configuration is ok.
Now on sparc client from OBP issue: boot net - install
If you want to get rid of NFSv4 domain question after restart then put in finish script:
touch /a/etc/.NFS4inst_state.domain
Or better use Misc/jumpstart_sample/set_nfs4_domain script.
Thanks to Trinisan from #solaris on irc.freenode.org for this NFSv4 trick.
Friday, February 04, 2005
MPxIO and IBM's disk array
Finally(1) get working MPxIO with IBM disk array under Solaris 10 SPARC. Why don't we use IBM software included with the array? Well... let's just say it's bad, really bad and that's all you can really say about it. I must say I'm happy with MPxIO - it just works. To be honest it's not as good as EMC's PowerPath in terms of monitoring and some managing features. I really like PowerPath. On the other hand MPxIO is simple to configure and really easy to use, and while PowerPath is more powerful in many cases MPxIO is just enough and it does its primary purpose really good which is path failover and load-balancing. And MPxIO is for free - it's included with Solaris.
I must say that IBM's software included to manage and monitor the array is really bad, especially comparing to what I get used with EMC's software. I was expecting more from IBM - real disappointment.
(1) looks like IBM has changed Product ID of the array so MPxIO couldn't recognize it. Patch from Sun was needed - thanks guys for a quick response!
I must say that IBM's software included to manage and monitor the array is really bad, especially comparing to what I get used with EMC's software. I was expecting more from IBM - real disappointment.
(1) looks like IBM has changed Product ID of the array so MPxIO couldn't recognize it. Patch from Sun was needed - thanks guys for a quick response!
Wednesday, February 02, 2005
DTrace real life example
Here you can find post by Eric Schrock which is a real life story of using DTrace. It shows how simple problem could be answered easily with DTrace and how hard question it would be without DTrace. I've seen a lot of such examples here were I work. Have to find some time to post such real life examples with some description - promise I will.
Funny thing yesterday - I was reading some email exchange between two our developers (I was in Cc) - they were trying to find out what given application which was consuming whole CPU was doing. First truss then DTrace... it looked like no syscalls or application internal functions were called (PID provider r00lez). So question was raised - in what function is this application in? Heh, we all love DTrace, don't we? So they were trying with DTrace without luck (actually it's easy to do it, it's just that everybody learns)... But what was surprising was that they forgot about such simple tool as pstack which would give them answer in a second :) I couldn't resist to ask when they will check actual system time or who is logged in with DTrace instead of using date or w utils :)))) And actually I did check system time:
Then one of them wrote - but still you had to use Perl... I replied - actually not... all you have to do in D is ... :)))))
Funny thing yesterday - I was reading some email exchange between two our developers (I was in Cc) - they were trying to find out what given application which was consuming whole CPU was doing. First truss then DTrace... it looked like no syscalls or application internal functions were called (PID provider r00lez). So question was raised - in what function is this application in? Heh, we all love DTrace, don't we? So they were trying with DTrace without luck (actually it's easy to do it, it's just that everybody learns)... But what was surprising was that they forgot about such simple tool as pstack which would give them answer in a second :) I couldn't resist to ask when they will check actual system time or who is logged in with DTrace instead of using date or w utils :)))) And actually I did check system time:
$ dtrace -qn BEGIN'{printf("%d\n", `time);}'
1107312364
$ perl -e 'print localtime(1107312364) . "\n";'
Wed Feb 2 03:46:04 2005
Then one of them wrote - but still you had to use Perl... I replied - actually not... all you have to do in D is ... :)))))
Tuesday, February 01, 2005
Universities are running Solaris
Linux Gazette has interesting article about what operating systems are being used in the Times 100 Top Universities in the World. From the article it's that 47% are using Solaris and only 31% are using Linux. Now that is interesting.
Solaris 10 GA
Finally, you can download Solaris 10 full version here. This time you can download CD ISOs and DVD ISOs both for x86 and SPARC. x86 version of course is running on AMD64 in both 64bit and 32bit mode (default is 64bit).
btw: Solaris 10 is FREE, free to download, free to install and free to use even for commercial use and for all platforms it runs on (x86, amd64, SPARC).
btw: Solaris 10 is FREE, free to download, free to install and free to use even for commercial use and for all platforms it runs on (x86, amd64, SPARC).