Laser Blog

Articles tagged "solaris"

111 sed and iostat

Saturday 22nd November, 2008

This tip is specifically for the version of sed which came with Solaris. GNU sed has options which make solving this problem much easier.
Rob. April 2015.

I'm sure many Solaris admins will have come across this problem before. You have a SAN-attached host with dozens, maybe even hundreds of visible LUNs. Each LUN has a highly improbable and unwieldy name, as some of these SAN-attached devices do, and you need the iostat data for that LUN.

grep is no help, because you also want the four lines of data beneath the 'disk' name.

Well, you could just run iostat and painstakingly trawl through hundreds of lines of data, searching for the information you need. Or you could use the goodness of sed to find your LUN, and the four lines of data beneath it ...

$ iostat -En | sed -n '/c4t60060480000290101035533030433430d0/{p;n;p;n;p;n;p;n;p;}'

c4t60060480000290101035533030433430d0 Soft Errors: 0 Hard Errors: 1223 Transport Errors: 1170
Vendor: EMC      Product: SYMMETRIX        Revision: 5771 Serial No:
Size: 54.41GB <54408314880 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 75 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

And that is a genuine LUN id!

~

108 ZFS and Linux?

Sunday 18th May, 2008

This is concerning a cryptic entry from the blog of Jeff Bonwick. The two guys in the photos (follow the link) are Linus Torvalds and Jeff Bonwick. Jeff Bonwick is maybe not quite as well known as Linus Torvalds. He's the CTO of Storage Technologies at Sun Microsystems, he's also the ZFS development team leader, and his blog pretty much focuses on ZFS.

So, what's this about? Aren't there supposed to be licensing issues with Linux and ZFS? All I can assume when Jeff Bonwick says:

All I can say for the moment is... stay tuned."
is that there are "talks about talks". There are certainly interesting possibilities, ZFS is impressive stuff.

~

95 Solaris: NIS installation and configuration

Wednesday 5th September, 2007

(This article has been updated from the original, which focused on Solaris 8 only, to include Solaris 10-specific entries. Where the commands or entries for Solaris 8 and Solaris 10 differ, they are written down in purple for Solaris 8 and green for Solaris 10. In addition, I have added an extra note about changing the NIS Makefile in the event that you're not going to use group passwords.)

This is a step-by-step account of the method I used to install and configure a NIS master and slaves on servers running Solaris 8 (and more recently, Solaris 10). The steps detailed for Solaris 8 should work fine on earlier versions of Solaris, but as I have not explicitly tested other versions (except as clients) you may encounter issues. The clients used with this setup ranged from Solaris 7 to Solaris 10. The installation was in a medium-sized Solaris-only farm (100+ hosts).

Configuring NIS on Solaris is not quite as straightforward as it is on other OSes (such as some Linux distros). This didn't really surprise me, even though NIS is Sun's product. What this does allow is a more tailored end product.

There are three points I'd like to emphasise concerning this article:

  • This article is not an definitive how-to; there is more than one way to implement NIS. This way works, it's relatively straightforward, and is more secure than a default NIS installation.
  • This article is not an endorsement of NIS over other naming systems. My recommendation to the client was to use LDAP, but NIS had been used before, they were more or less happy with it *, and it did what they wanted it to. Having said that NIS is still used on many sites, it's versatile, it's easy to set up and maintain, and it can be made more secure without too much extra effort.
  • This article describes the set up of NIS only. Administration is another matter altogether.

(* The client's existing NIS setup was very old and exhibited quirky behaviour on some rare occasions. In addition, it had allowed encoded password values to be seen when running ypcat passwd. This was not acceptable.)

37 Solaris 8: NIS installation and configuration

Monday 15th January, 2007

(This article has been redrafted to include Solaris 10-specific commands and entries, as well as retaining the original Solaris 8 commands. In addition a couple of typos have been fixed and an extra note about changing the NIS Makefile has been added. This original article has not been altered, so follow the link above if you want to see the redrafted article.)

This is a step-by-step account of the method I used recently to install and configure a NIS master and slaves on servers running Solaris 8. The steps detailed should work fine on other versions of Solaris, but as I have not explicitly tested other versions (except as clients) you may encounter issues. The clients used with this setup ranged from Solaris 7 to Solaris 10. The installation was in a medium-sized Solaris-only farm (100+ hosts).

Configuring NIS on Solaris is not quite as straightforward as it is on other OSes (such as some Linux distros). This didn't really surprise me, even though NIS is Sun's product. What this does allow is a more tailored end product.

There are three points I'd like to emphasise concerning this article:

  • This article is not an definitive how-to; there is more than one way to implement NIS. This way works, it's relatively straightforward, and is more secure than a default NIS installation.
  • This article is not an endorsement of NIS over other naming systems. My recommendation to the client was to use LDAP, but NIS had been used before, they were more or less happy with it *, and it did what they wanted it to. Having said that NIS is still used on many sites, it's versatile, it's easy to set up and maintain, and it can be made more secure without too much extra effort.
  • This article describes the set up of NIS only. Administration is another matter altogether.

(* The client's existing NIS setup was very old and exhibited quirky behaviour on some rare occasions. In addition, it had allowed encoded password values to be seen when running ypcat passwd. This was not acceptable.)

1

Home