Monday Jun 29, 2009

Sun HPC Software, Developer Edition 1.0 for OpenSolaris

Just couple days ago, Sun announced the Sun HPC Software, Developer Edition 1.0 for OpenSolaris. It's a fully-featured HPC development environment that is distributed as a virtual machine (VM). It is based on OpenSolaris 2009.06 and includes pre-configured:

  • Sun Grid Engine 6.2u3
  • Sun HPC ClusterTools 8.1
  • Sun Studio 12u1
  • Sun Studio IDE Plugins
  • Examples of DTrace and performance analysis
  • Accounting and Reporting Console (ARCo)

The compelling feature for HPC developers is that this VM can add cluster resources from Amazon EC2 when local simulated 3-node cluster is insufficient. See the architecture diagram here.

If you wish to give it a try on VirtualBox rather than on VMware follow this blog post.

Additional links:

Download page
Wiki documentation
Release notes

Tuesday Jun 23, 2009

How to share ZFS over NFS in OpenSolaris 2009.06

It might be strange, but sharing a ZFS file system over NFS in OpenSolaris can be tricky. The reason is that not all mechanisms that one might expect to work  actually work on ZFS file systems in all cases.

There are many ways to share a file system over NFS:

  1. System -> Administration -> Shared Folders - starts a graphical tool to create a share (Note: if you install OSOLvpanels-sharemgr package, the started application will be very different and more advanced)
  2. share command (see share(1M) man page)
  3. zfs command (see zfs(1M) man page) - works only on zfs datasets

Now to explain the tricky part. When I share a zfs dataset using 1) or 2) it works only if I don't specify any security attributes. As an example let's share /test directory that is backed up by a pool/test ZFS dataset. The share command now returns:

# share 
-               /test   rw   "Test"

All is fine and the /test directory is mountable by the remote hosts. Now for security reasons, I want to restrict the access to my private network subnet. If I do that using the 1) or 2) the output of the share commands get changed to following:

# share
-               /test   sec=sys,rw=@172.20.15.0/24 "Test"

While the output seems to be correct, none of the hosts on the 172.20.15.0/24 subnet can mount the /test folder with a message saying permission denied by server. This doesn't seem right. So let's try to share the /test using method 3) the zfs command:

# zfs set sharenfs=rw=@172.20.15.0/24 pool/test
# share
-@pool/test    /test    sec=sys,rw=@172.20.15.0/24   ""

Notice the difference in the share outputs, it now contains the @pool/test and surprisingly hosts can again mount /test and the access is restricted only to my private subnet. I've enter an OpenSolaris bug for that. Let's see when it gets some attention.

For now share ZFS filesystems over NFS with the zfs command.

Wednesday Mar 04, 2009

Joining a Hidden WPA2 Secured Wireless Network Using OpenSolaris 2008.11

Couple days ago I setup my new wireless router (hidden and secured by WPA2). The problem I had was that OpenSolaris 2008.11 was not able to join it. It offers to specify a network using the NWAM GUI, but strangely not the password. However there is a way, let's use dladm command.

 First you need to setup a password and then you may join the network using this password.

 # pfexec dladm create-secobj -c wpa private_key1
 # pfexec dladm connect-wifi -k private_key1 -e private_wifi iwk0

Where private_key1 is the key object (you'll be interactively asked to provide the password), private_wifi is the name of my router (ESSID), iwk0 is my wireless interface (like bge0 for ethernet). Note that the driver (iwk in my case) must support WPA2 otherwise this will not work.

Once the connect_wifi command is started the NWAM kicks in and network is configured and can be used later automatically, without typing the above commands ever again.

Worth mentioning are also show-wifi, disconnect-wifi and delete-secobj sub-commands of the dladm. For a complete reference type man dladm.

Monday Aug 11, 2008

Updating OpenSolaris (snv_86) to snv_94 Problematic

Today I tried to update OpenSolaris 2008.05 (snv_86) to the latest build snv_94. Everything went smoothly except after the reboot the gnome did not start.

I got an error message on the console that gdm service is in maintainance. Message suggested that gdm dumped core, but in fact it was Xorg. Following the issue on the opensolaris mailing list, it seems like there's something wrong with the packaging system and it might happen that incomplete files get installed. In my case Xorg amd64 binary was only 1.1MB while it should be around 2.4MB!

BTW: snv_94 includes Firefox 3, so if you're an adventurer like me, try it out right now :-)

UPDATE (Aug 14th): Now there's a script that will check and fix any corrupted packages. You can find it at http://www.opensolaris.org/os/project/pkg/pkgfix

To verify all packages do (I used '...' to shorten the output):

> pfexec pkg verify -f
PACKAGE                                             STATUS 
pkg:/SUNWPython                                      ERROR
    file: usr/lib/python2.4/ConfigParser.pyc
        Group: 'root' should be 'bin'
        Hash: e5d8daa86c36cf9c7ec51124317a7c742e059486 should be 22bf2aab02829e3f10e9e20a3552c0272b79d0a8
        ...
        file: usr/lib/python2.4/warnings.pyc
        Group: 'root' should be 'bin'
        Hash: 4babb3430440dc5232e371fe21e505cfbc5b58e5 should be 46dbc23e42c5502fcbf98b32f425f3906d4f6766
pkg:/SUNWafe                                         ERROR 
    driver: afe
        extra minor node permission '\* 0666 root sys' found in etc/minor_perm
pkg:/SUNWcs                                          ERROR 
    hardlink: etc/rc2.d/S82mkdtab
        No such path etc/rc2.d/S82mkdtab
        ...
pkg:/SUNWgnome-python-libs                           ERROR 
    file: usr/lib/python2.4/vendor-packages/cairo/__init__.pyc
        ...
pkg:/SUNWgrub                                        ERROR 
    ...
pkg:/SUNWintgige                                     ERROR 
    ...
pkg:/SUNWipkg                                        ERROR 
    ...
pkg:/SUNWipkg-gui                                    ERROR 
    ...
pkg:/SUNWmlib                                        ERROR 
    file: usr/lib/amd64/libmlib.so.2
        Unexpected Exception: failed to load dynamic section
pkg:/SUNWnge                                         ERROR 
    driver: nge
        extra minor node permission '\* 0666 root sys' found in etc/minor_perm
pkg:/SUNWpsdcr                                       ERROR 
    driver: asy
        extra minor node permission '\*,cu 0600 uucp uucp' found in etc/minor_perm
pkg:/SUNWxorg-mesa                                   ERROR 
    file: usr/X11/lib/modules/dri/amd64/r300_dri.so
        Unexpected Exception: failed to load dynamic section
pkg:/SUNWxorg-server                                 ERROR 
    file: usr/X11/bin/amd64/Xorg
        Unexpected Exception: failed to load dynamic section

As you can see several packages were corrupted, mostly python. However corrupted \*.pyc files are not really corrupted, so I've been told.

Now to fix the corrupted packages do:

  1. Download the pkgfix script
  2. Make it executable: chmod 755 pkgfix
  3. Fix corrupted packages: pfexec ./pkgfix
This might fix the problem for you, however it was not my case, since the scripts does not yet handle corrupted ELF files. I've successfully updated to snv_95 today, which resolved my problems.

Saturday Jun 28, 2008

Disabling touchpad in OpenSolaris

Well, one thing drove me crazy on the OSDEVCON when using the ASUS M50SV laptop was that both touchpad and mouse were enabled and I sometimes unintentionally moved the mouse cursor using the touchpad. That meant I suddenly continued typing on a different line. I decided to turn the touchpad off.

I first tried to see what mouse drivers do I have:

> modinfo | grep mouse
113 fffffffff7a075b8    c50 116   1  mouse8042 (PS/2 Mouse 1.48, 05/10/25)
114 fffffffff8106000   2410   -   1  vuid3ps2 (mouse events to vuid events)
136 fffffffff8284000   2e08   -   1  usbms (USB mouse streams 1.26)

Since I don't have any PS/2 ports and my mouse is USB, mouse8042 must have been the driver I wanted to get rid of. As user with root role call:

> pfexec modunload -i 113

And indeed after unloading the driver touchpad is no longer working. Cool!

This got me thinking if I can enable the touchpad again by loading the driver back in. And seems like I can:

> pfexec modload /kernel/drv/amd64/mouse8042

Touchpad works again. Unfortunately if I do unload/load again the touchpad does not start working the second time (on svn91). Nevertheless it's OK with me since I always use USB mouse.

UPDATE (Dec 1st 2008):

I was told that this only worked due to a bug. Normally the driver should be automatically reloaded when unloaded. Probably only way in later OpenSolaris builds is to prevent the driver to be loaded in the first place.

Adding following line to /etc/system file:

exclude  mouse8042

will prevent the driver named mouse8042 from being loaded when system is starting.


Tuesday Jun 24, 2008

OpenSolaris Developer Conference 2008

Second OpenSolaris developer conference starts tomorrow in Prague, Czech Republic. For more information visit http://www.osdevcon.org/2008/

About

Lubomir Petrik

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today