Friday, July 29, 2005

Installing SX over a net with customized miniroot

I do use sfe driver from Masayuki Murayama to get networking and I use patched version of ata driver to get DMA working with internal disk on my laptop. Now I do install new SX versions on my laptop over the network as it's much faster and I do not have to burn new set of CDs every time new SX is out. With New Boot Architecture all I do is:

1. copy x86.miniroot file from /tftpboot
2. un-gzip file
3. using lofiadm mount x86.miniroot as UFS
4. install sfe driver with base_root changed to mounted miniroot
5. copy patched version of ata
6. umount file and gzip it again
7. put the gzipped file on /tftpboot with different name (x86.miniroot_laptop)
8. change menu.lst in /tftpboot/boot/grub to use new file

That way you can customize x86.miniroot in any way you want. As with New Boot Architecture no more Real Mode drivers are needed you can put there standard drivers for RAID, SCSI, etc. adapters and it should work.

btw: although it's good to copy driver packages to miniroot or install server too, so after the installation, before system reboots (I choose to manually reboot after install) you can install this drivers to newly installed system. In my case just before a reboot I copy ata driver and install sfe driver. You will find newly installed system under /a mountpoint.

SX b19 available

Solaris Express: Community Release build 19 is available. I've already installed it on my laptop :)

Open Solaris and Xen - alive!

That's really exciting!

"Hello World" from Solaris on Xen Last Friday we went multiuser for the first time on our Solaris-on-Xen port.

And we're happy to have other people join this project at this early stage to help us do that, or even just to experiment with the code in whatever other way they want to. To enable that, we're launching an OpenSolaris community discussion group about OpenSolaris on Xen where future postings like this will end up.

Full post

Thursday, July 28, 2005

Solaris 10 - 2 million licenses

OSNews wrote:

"Sun Microsystems has distributed more than two million registered licenses for the Solaris 10 Operating System since the software became available on January 31st."

And official announcement here.

Monday, July 25, 2005

File Descriptors in DTrace

Starting with b16 of SX new useful feature has been added to DTrace - fds[] array.

"[...] returns information about the file descriptors associated with the process corresponding to the current thread. The array's base type is the fileinfo_t structure already used by DTrace's I/O provider, with a new member for the open(2) flags. Here's an example of fds[] in action:

$ dtrace -q -s /dev/stdin
syscall::write:entry
/ execname == "ksh" && fds[arg0].fi_oflags & O_APPEND /
{
printf("ksh %d appending to %s\n", pid, fds[arg0].fi_pathname);
}
^D

If I run this command on my desktop and start typing commands in another shell, I see output like this:

ksh 127453 appending to /home/mws/.sh_history
ksh 127453 appending to /home/mws/.sh_history
...

"


Well, this is going to be really useful!

btw: if you have a nfs server and want to use IO provider then I'm sure you will welcome bug id 6175304 which is RFE I submitted some time ago and is integrated in b17 - in practice it allows you to use IO provider on nfs server so observing nfsd will be much more friendly.

Solaris Express 17 is out

Solaris Express build 17 is out. Check out official What's New. You can find unofficial What's New here.
There's Community Release of SX based on build 18 - this is latest build but less tested - works on my laptop very well. You can get b18 here.

Wednesday, July 20, 2005

Safety in DTrace

What is one of the best features of DTrace? - that it's production ready. What it means? Well, Bryan Cantrill, one of the DTrace creators, has posted some background information about built-in (or should I write - architectured-in) safety in Dtrace. From my own user perspective, I must admit that this is one of the most important features of DTrace - I can safely use it in a production, and I have actually been doing it for almost 2 years. In practice using DTrace in a production proves to be so safe that I let our developers to use it on a production servers. And why is it so important to use tools like DTrace on a production systems? Well, most pressing problems occur while in a production and during peak hours. If you really want to find your bug quickly, find a bottleneck or some data flow characteristic, etc. you should be doing it at the place were a problem is - production. But you don't want to risk accidentally shutting down your application or entire system during peak hours, don't you? Without all these safety bulit-in DTrace still would be valuable software, but I wouldn't use it in a production so much if at all. When I'm talking to people about DTrace I always start talking about its safety in a first place.

Tuesday, July 19, 2005

Mathematica

Well known Mathematica is available on Solaris 10 x86 platform with 64bit Opteron support. This is great news for all Mathematica and Solaris x86/x64 users. All supported platforms are listed here.

Monday, July 18, 2005

What's going on with SPARC

Some SPARC news.

Oracle and multi-core chips

"Oracle will continue to recognize each core as a separate processor; however, the processor definition has been amended as it relates to counting multi-core chips to determine the total number of processor licenses required. For the purposes of counting the number of processors that require licensing, the number of cores in a multi-core chip now shall be multiplied by a factor of .75. Previously, each core was counted as a full processor."

"Oracle Standard Edition One or Standard Edition programs for use on a single processor server containing a maximum of 2 cores shall be priced as a single processor."


Oracle's News
eWeek

Wednesday, July 13, 2005

Solaris on x86 notebooks

I've just noticed new article on Open Solaris site about Solaris for x86 notebooks. It's a nice overview of current status.

I have Solaris dual-booted with Windows on my current (and previous) laptop for quite some time - over 3 years now. I know some other people who do have Solaris on their laptops too. I agree with the article that installation is quite easy, there're some problems with drivers - although it's getting better every month. Few months ago I had to manually tweak Xorg configuration to get 1400x1050 - with latest Solaris Express it works out of the box. There's 1400x1050 background for login screen (such a small thing but makes feel it better). Then there's GRUB for some time (starting with b14) - so booting Solaris/Windows is more user friendly and is much faster now (due to new boot architecture that GRUB is part of). Then there're being added such small features like virtual mouse (works great!) which let's you to use touchpad and usb/ps2 mouse simultaneously, nforce chipset support, nvidia divers, battery support, and so on. One of a common problems is NIC support - I use sfe driver thanks to Masayuki Murayama - you can find more drivers there for common ethernet cards. Some manufactures like Broadcom provide their own drivers (although with Solaris comes bge driver which covers quite a lot of Broadcom NICs - sometimes it's just a metter of addind new id). USB pendrives and disk drivers - work too. WiFi from Sun is coming, and so on.

While Solaris on x86 notebooks is not perfect, it's gettint better literally month by month (thanks to Open Solaris and SX) and it works really good for a lot of people.

Tuesday, July 12, 2005

libumem non-documented features

If you are developing an application in C on Solaris you should familarize yourself with libumem and it's debug abilities. I used it many times with good results. Here are some undocumented features of libumem.

DTracing GNOME

Bryan Cantrill has posted nice blog entry with quick looking in what's going on during logging to GNOME session. It's a nice intro to debugging other applications.

Friday, July 08, 2005

Building community around Open Solaris

Now, that's a good news! Another example that Sun is really serious in building real community with external folks around Open Solaris. This is part of a post by Bryan Cantrill on Open Solaris DTrace mailing list:


"We are pleased to announce that we have decommissioned Sun's internal
DTrace interest list, having added the members of that list to this one on
opensolaris.org. This adds over 400 people (!) to this list, and fulfills
a goal that we have long had -- to unify our internal and external DTrace
communities into one larger community. This should result in quite a bit
more traffic to this list (the internal DTrace list sees on the order of
five to ten posts per day), and it will certainly result in much more
DTrace expertise and interest looking at your question, comment or
contribution."

Wednesday, July 06, 2005

Getting LUNs for MPxIO devices

I wrote simple C program which displays basic info about FC HBAs in a system and lets you see available targets on each HBA with information like LUN number, target ID, WWPN, etc.
Why did I write it? Well, when you have a lot of devices under MPxIO and you often add new LUNs, then there's no simple (I mean quick) way to figure out which MPxIO devices are which. Then if there're several arrays attached it's getting even worse. Normally you can use luxadm but with a lot of LUNs it actually takes some time to find given LUN.
Program compiles and works on Solaris 10, makes use of libHBAAPI so not all HBAs will work (depends on driver). Qlogic HBAs with standard Solaris drivers works. I don't know about the others. Although this program works (for me at least) - I must admit that it's not a clean code and I'm not a programmer, some things are done ugly (static arrays, missing safe checks, etc.) - I have no time to correct this ('coz it works).

btw: looks like there's a tool named fcinfo in SX which can give the same (and more) info (but there's none in S10).

Ok, some example output.


bash-3.00# ./hba_inq
Number of HBAs: 2


HBA(0) name: QLogic Corp.-2200-0
Manufacturer : QLogic Corp.
SerialNumber :
Model : 2200
Description : 2200
SymbolicName :
HardwareVersion :
DriverVersion : 20050104-1.58
OptionROMVersion : 1
FirmwareVersion : 2.1.142
DriverName : SunFC Qlogic FCA v20050104-1.58
NumberOfPorts : 1
NodeWWN : 20:00:00:e0:8b:05:3e:7c


HBA(1) name: QLogic Corp.-2200-1
Manufacturer : QLogic Corp.
SerialNumber :
Model : 2200
Description : 2200
SymbolicName :
HardwareVersion :
DriverVersion : 20050104-1.58
OptionROMVersion : 1
FirmwareVersion : 2.1.142
DriverName : SunFC Qlogic FCA v20050104-1.58
NumberOfPorts : 1
NodeWWN : 20:00:00:e0:8b:01:94:01
bash-3.00#

// another server with less LUNs

bash-3.00# ./hba_inq -l
Number of HBAs: 2


HBA(0) name: QLogic Corp.-2200-0
Manufacturer : QLogic Corp.
SerialNumber :
Model : 2200
Description : 2200
SymbolicName :
HardwareVersion :
DriverVersion : 20050104-1.58
OptionROMVersion : 1
FirmwareVersion : 2.1.142
DriverName : SunFC Qlogic FCA v20050104-1.58
NumberOfPorts : 1
NodeWWN : 20:00:00:e0:8b:01:95:01
NumberOfLUNs : 6
bus 5 target 71424 lun 56 "/dev/rdsk/c4t600A0B80001652440000003C428E0AEBd0s2"
bus 5 target 71424 lun 55 "/dev/rdsk/c4t600A0B80001652440000003B428E0ACBd0s2"
bus 5 target 71424 lun 54 "/dev/rdsk/c4t600A0B80001652440000003A428E0AA7d0s2"
bus 5 target 71424 lun 53 "/dev/rdsk/c4t600A0B800016524400000039428E0A79d0s2"
bus 5 target 71424 lun 52 "/dev/rdsk/c4t600A0B800016524400000037428E0A49d0s2"
bus 5 target 71424 lun 31 "/dev/rdsk/c5t200400A0B8169D18d31s2"


HBA(1) name: QLogic Corp.-2200-1
Manufacturer : QLogic Corp.
SerialNumber :
Model : 2200
Description : 2200
SymbolicName :
HardwareVersion :
DriverVersion : 20050104-1.58
OptionROMVersion : 1
FirmwareVersion : 2.1.142
DriverName : SunFC Qlogic FCA v20050104-1.58
NumberOfPorts : 1
NodeWWN : 20:00:00:e0:8b:05:34:7c
NumberOfLUNs : 6
bus 1 target 135168 lun 56 "/dev/rdsk/c4t600A0B80001652440000003C428E0AEBd0s2"
bus 1 target 135168 lun 55 "/dev/rdsk/c4t600A0B80001652440000003B428E0ACBd0s2"
bus 1 target 135168 lun 54 "/dev/rdsk/c4t600A0B80001652440000003A428E0AA7d0s2"
bus 1 target 135168 lun 53 "/dev/rdsk/c4t600A0B800016524400000039428E0A79d0s2"
bus 1 target 135168 lun 52 "/dev/rdsk/c4t600A0B800016524400000037428E0A49d0s2"
bus 1 target 135168 lun 31 "/dev/rdsk/c1t200500A0B8169D18d31s2"
bash-3.00#

// now another server with a lot of luns
// it's easy to filter by given WWPN
// first see what we have

bash-3.00# cfgadm -al
Ap_Id Type Receptacle Occupant Condition
c0 scsi-bus connected configured unknown
c0::dsk/c0t0d0 disk connected configured unknown
c0::dsk/c0t1d0 disk connected configured unknown
c0::dsk/c0t6d0 CD-ROM connected configured unknown
c1 fc-fabric connected configured unknown
c1::200500a0b8169d18 disk connected configured unknown
c1::5006016008065109 disk connected configured unknown
c2 fc-fabric connected configured unknown
c2::200400a0b8169d18 disk connected configured unknown
c2::5006016108065109 disk connected unconfigured unknown
c2::5006016908065109 disk connected configured unknown
c2::500604843d489c84 disk connected configured unknown
c3 scsi-bus connected configured unknown
c3::dsk/c3t8d0 disk connected configured unknown
c3::dsk/c3t9d0 disk connected configured unknown
c3::dsk/c3t10d0 disk connected configured unknown
c3::dsk/c3t11d0 disk connected configured unknown
c3::dsk/c3t12d0 disk connected configured unknown
c3::dsk/c3t13d0 disk connected configured unknown
c3::dsk/c3t14d0 disk connected configured unknown
bash-3.00#

// lets see which devices are seen on c2::200400a0b8169d18
// only some last entries

bash-3.00# ./hba_inq -lw | grep "200400a0b8169d18" | tail
NodeWWN 200400a0b8169d17 PortWWN 200400a0b8169d18 bus 2 target 71424 lun 10 "/dev/rdsk/c4t600A0B8000169D170000001541C9C2A6d0s2"
NodeWWN 200400a0b8169d17 PortWWN 200400a0b8169d18 bus 2 target 71424 lun 9 "/dev/rdsk/c4t600A0B8000169D170000001441C9C27Ed0s2"
NodeWWN 200400a0b8169d17 PortWWN 200400a0b8169d18 bus 2 target 71424 lun 8 "/dev/rdsk/c4t600A0B8000169D170000001341C9C256d0s2"
NodeWWN 200400a0b8169d17 PortWWN 200400a0b8169d18 bus 2 target 71424 lun 7 "/dev/rdsk/c4t600A0B8000169D170000001241C9C230d0s2"
NodeWWN 200400a0b8169d17 PortWWN 200400a0b8169d18 bus 2 target 71424 lun 6 "/dev/rdsk/c4t600A0B8000169D170000000A41C9C0B8d0s2"
NodeWWN 200400a0b8169d17 PortWWN 200400a0b8169d18 bus 2 target 71424 lun 5 "/dev/rdsk/c4t600A0B8000169D170000001141C9C1FEd0s2"
NodeWWN 200400a0b8169d17 PortWWN 200400a0b8169d18 bus 2 target 71424 lun 4 "/dev/rdsk/c4t600A0B8000169D170000001041C9C1D8d0s2"
NodeWWN 200400a0b8169d17 PortWWN 200400a0b8169d18 bus 2 target 71424 lun 3 "/dev/rdsk/c4t600A0B8000169D170000000F41C9C1A2d0s2"
NodeWWN 200400a0b8169d17 PortWWN 200400a0b8169d18 bus 2 target 71424 lun 2 "/dev/rdsk/c4t600A0B8000169D170000000E41C9C17Cd0s2"
NodeWWN 200400a0b8169d17 PortWWN 200400a0b8169d18 bus 2 target 71424 lun 1 "/dev/rdsk/c4t600A0B8000169D170000000C41C9C148d0s2"
bash-3.00#


// so lets assume we are looking for LUN 55 which was just presented to the
// server and we don't know what MPxIO device it's

bash-3.00# ./hba_inq -lw|grep "200400a0b8169d18"|grep "lun 55"
NodeWWN 200400a0b8169d17 PortWWN 200400a0b8169d18 bus 2 target 71424 lun 55 "/dev/rdsk/c4t600A0B80001652440000003B428E0ACBd0s2"
bash-3.00#



hba_inq is covered by CDDL.

SX under VMWare

I've just installed Solaris Express b17 under VMWare Workstation on Windows on my notebook. I mounted SX ISOs as CDROM and installation went smoothly. The only problem was with emulating LSI chipset - I changed to the other one, emulated hard disk in file as IDE and then it just works.
Now I can post good quality GRUB screenshot :)

NFS client I/O architecture

Thanks to Sameer Seth you can find nice overview of Solaris NFS client I/O architecture here. IMHO this is good reference not only for developers but for sys admins too.

Friday, July 01, 2005

V40z with dual core Opterons review

Nice review of V40z with dual core Opterons. It's also quite a positive review of Solaris 10 (and a little comparison to Linux).


"As we mentioned earlier, scalability is a big issue but if anyone can tackle that obstacle, it's Sun. Sun spent a lot of time getting Solaris 10 ready for x86, and as you will see in our benchmarks section, the "Slowlaris" moniker might be dead."

From my own experience, Solaris 9 and especially Solaris 10 is really quite fast (comparing to Linux). It managed even to be faster than Linux on a just 2-way x86 servers in a production enviroment. Add all developer tools available on Solaris, DTrace in particular, and you get "developer's dream".


"Solaris is really a developer's dream. During the V40z's brief stay in our labs, we actually used the machine extensively for development of our RTPE software platform; partially because the V40z is 10 times more powerful than our entire RTPE cluster, but partially because of DTrace, MDB and libumem. Using some of the examples from the DTrace introduction above, we were able to use the analyzer to isolate instances where some of our RTPE bots were getting preempted for supposedly no reason at all. Kudos to that team at Sun!"

That's a real beaty of DTrace - you can start using it in a minutes just by looking at examples and actually get some nice results! IMHO DTrace alone is good enough reason in many cases to use Solaris instead of all the other OSes.



[...] if a single Zone is compromised, the whole system is effectively compromised. Fortunately, compromising a Solaris 10 system is not an easy task either; additional Pocess Rights Management and User Rights Management are prevalent in Solaris 10.

It's not a whole true. In most Zones configurations (and in a default one) you can't (in a zone) load/unload kernel modules, make devices, snoop a memory or network traffic of other zones, etc. - even if you get root account. So if a single Zone is compromised it doesn't mean that whole system and/or other zones are compromised. Actually quite the opposite. This is one reason why you should use Zones by default.



"Solaris 10 proved a fascinating endeavor for us as well. Our experience with the operating system as a whole were mixed, generally due to the amount of sharp edges around such a new OS. On the other hand, tools like DTrace proved invaluable to us and Sun really has a great tool on their hands for developers and administrators alike. Also note that Solaris didn't have a problem keeping up with SLES 9 in most of our benchmarks. SLES 9 is a tad slower than some of the slicker installs out there, but it wouldn't be very insightful to put Gentoo on a $39,000 system either. We were very impressed by the fact that Solaris managed to stay a little bit ahead of SLES during benchmarks with heavy scheduling. We really didn't expect this, so perhaps all the efforts of Sun to incorporate better code into the x86 portion of Solaris 10 really paid off. Coupled with the extensive support community and projects like OpenSolaris, Solaris 10 is a winner."


Amen.