Showing posts with label domain. Show all posts
Showing posts with label domain. Show all posts

Thursday, May 21, 2009

Powering Sun M4000/5000 Series Servers Down And Up From The XSCF

Hey There,

Today's post is more beginner-oriented than the last few days' posts on deleted data recovery on Linux and Unix.

Below is a little walkthrough on the very basics of powering on, and powering off, M4000/5000 Series Sun Servers from the XSCF (eXtended System Controller Facility, or something roughly approximate) command line. These instructions should also apply to the M8000/9000 Series servers as well, but, since I'm getting all my output directly from an M4000, I don't want to "assume" anything incorrect about the higher end servers.

The basic steps we're going to walk through are simply logging in, powering down a domain, powering on a domain, and jumping back and forth between the XSCF command line and the M4000 console.

For the purposes of today's post, we're going to assume that the basic XSCF setup has been completed and you have an admin login account on it. You've also set up ssh (naturally) and disabled the web-based interface (because its so insecure... ;) Your admin account is "admin" - Also, in the spirit of keeping this simple, we're going to assume that you've only set up one domain on your M4000, and you've used the default first domain: domain 0.

Connecting to the XSCF is as simple as connecting to any server, assuming you have an account ;)

host # ssh admin@host-xscf
admin@host-xscf's password:
Last login: Sat Mar 28 17:55:52 2009 from fridgehost.beernutz.com


Once you're logged on, if you want to get to the console of your M4000 server, all you need to do is use the "console" command, like so (-d denotes the domain number and I use -y so I don't have to answer the "are you sure?" question every time):

XSCF> console -d 0 -y
Connect to DomainID 0?[y|n] :y

host console login: user
Password:
-bash-3.00$ exit


To get back to the XSCF prompt from the console, just type "pound dot" (literally #.) and it will kick you back to the XSCF from the console.

host console login: #.
XSCF>


Powering off the M4000 from the XSCF prompt is even more trivial ;) It should be noted that running "poweroff" at the XSCF command line is equal to running "init 5" at the command line, as root. "poweroff" will not tell you if your command was successful or not (neither will "poweron"), but you can find out the status of your request easily, by using the "showlogs" command. Also, just running "poweroff" again will let you know the status. If your previous invocation worked, you'll get an error that the machine is already powered off:

XSCF> poweroff -d 0 -y
DomainIDs to power off:00
Continue? [y|n] :y
....
XSCF> showlogs power
Example: Jan 08 16:47:45 EST 2009 Domain Power Off Operator 00 Locked
XSCF> exit


Powering on the server from the XSCF prompt is pretty much the same rigmarole :)

XSCF> poweron -d 0 -y
DomainIDs to power on:00
Continue? [y|n] :y
....
XSCF> showlogs power
Example: Jan 08 16:47:45 EST 2009 Domain Power On Operator 00 Locked
XSCF>


And that will, eventually, bring you right back to up. You can log into the console, from the XSCF prompt, before POST begins, if you want to see everything that happens on the console when you boot:

XSCF> console -d 0 -y
Connect to DomainID 0?[y|n] :y

b0939db-s console login: user
Password:
Last login: Sun Apr 5 16:57:14 from host
-bash-3.00$ exit

host console login: #.
XSCF> exit


And that's pretty much all there is to powering on and off your M4000/5000 Series server using the XSCF :)

Enjoy, but (as always) use caution if you're not sure what you're doing. As one last hint. If you get stuck at the XSCF prompt and need to know what to type next (There are no obvious hints), just type:

XSCF> man intro

or

XSCF> [tab][tab]
do you want to see all .... entries


That's literally hitting the tab key twice, above. Then it will ask you if you want to see all the available commands listed out. If you know what you want to do and you just can't remember the command name, [tab][tab] is your friend. If you think you know the name, and you also need to know a little bit about the command, then the man page for "intro" is your best bet.

Enjoy and cheers

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Monday, February 23, 2009

Sun M-Series Enterprise Unix Servers And DSCP - Why?

SPECIAL NOTE: Friday's post on the absorption of knowledge was written on Blogspot in IE7 and suffered from some horrible display problems on FireFox and other browsers. It has been completely retooled. Apologies for any inconvenience that post caused. Even though I write some goofy rants, missing text wasn't supposed to be part of that post's intentionally cryptic style. Thanks :) - Mike

Hey there,

Today, we're going to look at DSCP (The Domain to Service processor Communication Protocol) and why it was introduced with the newer M series Enterprise servers from Sun. The first time I ran into it, I thought approximately the following: All right, here's something else that can make my life more complicated ;) Now, not only do I have to hop onto a private network (added security at work) to connect to the service processor (SP), but then I have to be sure that an entirely separate network is functioning correctly in order for me to connect to a domain on my machine if I want to get there directly from the SP. I'm naturally negative, but I keep it inside until I've given myself the time to realize that things are either not as bad or better than I initially assumed, which goes a long way toward maintaining good relationships with other human beings ;)

DSCP, although it "is" another layer of complication, is actually a pretty good idea. In essence, it's an attempt at damage control and resource sharing (which almost never works entirely), on par with earlier "HUGE" Sun computers, which does a pretty decent job at a relatively low cost. And, I use the word "cost" in reference to the amount of work you have to put into getting it all set up and working correctly. It's practically free, in that respect, so kudos (The plural, pronounced kyu-doze) to Sun for adding a little extra protection and making it an additon to an existing model that doesn't encumber the admin or user to a noticeable degree. Once it's set up, it may as well be non-existent. ...unless you have problems with it, but that's a general rule when it comes to anything.

Inter-process communication on the 6800/6900, etc boxes was handled pretty decently as well, but didn't really lay ground for the possiblity of scaling easily in the future. On those boxes, shared memory (for example) was "stuck" to a single SP, so if you had multiple SP's, you essentially had multiple machines, each alienated from the other with regards to system resources. The 6800/6900's were, as one would expect, worse in this regard than the 15k-and-up models (check out the price tags. Some times it can be an indicator of quality. Is the difference in ease of sharing worth it? Depends on your situation)

The 15k-and-up servers ran physical ethernet from the service processor(s) to the domain controllers (whereas, if I forgot to mention above, the older mailbox-architecture was imbedded and much more difficult to "change"). This setup made it slightly easier to re-allocate resources since you basically had a MAN setup on your Sun system (Maintenance Area Network for those of us who still care ;). Since the MAN operated at the application layer of the stack, all you had to do to scale up when you added a new product or application was assign a new TCP port. And that was that: Sharing made much simpler. There's a lot of nitty-gritty behind it all, but who wants to read about that? If you do, check out docs.sun.com and go nuts ;)

So, now, we've made it all the way up to the almost-present (we'll just consider it the "now" for now ;) and the M-Series servers. Since the MAN configuration of the 15k-and-up servers worked out so beneficially, that concept was guaranteed to be built in to the next generation of Enterprise computers. The one big drawback, from an architectural perspective, was the fact that the 15k-and-up servers had a whole bunch of externally exposed cables patched all over the place to maintain that separate MAN network (lots of ways to goof that up). The DSCP is Sun's way of taking care of that issue while maintaining the extended reliablity (and security) introduced with the MAN concept.

DSCP reproduces the 15k-and-up MAN using shared RAM, a pseudo-serial driver and PPP. To the user, this means all the benefits of a MAN, without all of the cords ;) Actually, it's a very nice implementation of physical-to-virtual transformation. And, as we all know, in about 10 to 15 years, we'll all be virtual and the only people left alive on the planet earth will be maintenance technicians ;)

The best thing about DSCP is how incredibly complicated it is to set up. Just kidding ;) It's actually incredibly simple. So simple that, if you're like me, you're wondering when a monkey is going to be able to start doing your job ;) Assuming an unlimited amount of Domains attached to a service processor, setup of DSCP is as simple as this:

XSCF> setdscp -i 10.0.0.1 -m 255.255.255.0
Commit these changes to the database? [y|n] : y


or, even simpler:

XSCF> setdscp
DSCP network [10.0.0.1 ] >
DSCP netmask [255.255.255.0 ] >
XSCF address [10.0.0.2 ] >
Domain #00 address [10.0.0.3 ] >
Domain #01 address [10.0.0.4 ] >


These examples are from an M4000 with only 2 domains, but the flavour stays the same on the larger boxes in the series. The only thing you really have to worry about (just like your MAN networks) is that you pick a network that doesn't get used. Generally, as shown above, using a non-routable network is best practice. Although I accidentally typed a 24-bit netmask for a class C IP (and used 1 for the network instead of 0), it doesn't really make a difference.

Of course, displaying the information is just as simple (should you forget):

XSCF> showdscp

DSCP Configuration:

Network: 10.0.0.1
Netmask: 255.255.255.0

Location Address
---------- ---------
XSCF 10.0.0.2
Domain #00 10.0.0.3
Domain #01 10.0.0.4


The key benefit, aside from the easier resource sharing that carries over from the MAN days, is the extra protection each domain is provided. Assuming an exploit is commited against one domain, whoever's gotten onto your box and screwed up that configuration will have to work harder to get to the other connected domains, since they'll have to go through the XSCF to get there. There is no absolute direct connection between domains. Although, since I know somebody out there is thinking this, it "is" still possible to attack all the domains on an M-Series machine at once; just not in an overt fashion. For instance (and I'm not encouraging this behaviour in any way whatsover) if you can create a situation whereby the administrator needs to power-cycle his/her M-Series server to restore functionality to the exploited domain, you've just brought all of the domains down in one fell swoop.

And, in closing, if you can't get to the XSCF to check out the DSCP configuration and you have the proper privilege and access to a domain hosted on an M-Series server, you can obtain that same information using the prtdscp command. Even more convenient, you can SSH (assuming you've set it up) directly from your domain to the DSCP IP using a command similar to:

host # ssh `prtdscp -s`

If you work somewhere that can afford it, enjoy the convenience :)

Cheers,

, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Saturday, January 19, 2008

Installing System Boards on SunFire 6800 Servers

This week has been pretty intense (I'm actually in the middle of working another lovely Friday through Saturday maintenance window), so I thought I'd start out the weekend with a quick how-to regarding adding system boards to SunFire 6800 servers. Some of it is manual, but some can be scripted out to run on Solaris hands free. For the most part, when you're dealing with this stuff, I'd recommend not scripting it out. Odds are something important is on a machine that costs more than most people make in a year ;)

The first thing you'll want to do is connect to your system console, via SSH or Telnet (Or direct to the machine - your choice). You can find information on the basics of getting on to the 6800/6900 series machines in this previous post.

Here's a walkthrough of the commands you'd enter at the system console for "Domain B" if you were going to add, say, system board 3 (SB3).

First we'd start out by issuing the following commands at the "Domain B" system console, after having physically inserted the board. Note that all the showboards commands aren't absolutely necessary. I did include them however, because, even if the board you're adding never physically existed in your 6800/6900 SunFire box (Just a placeholder), it's almost always "owned" by a Domain, so it's best to delete the non-existent board before adding it. That doesn't seem to make a whole lot of sense, does it? Count yourself amongst the many ;)

host-sc0:B> showplatform -v
host-sc0:B> showboards -v
host-sc0:B> deleteboard SB3
host-sc0:B> showboards
host-sc0:B> addboard -d C SB3
host-sc0:B> showboards
host-sc0:B> poweron SB3
host-sc0:B> showboards
host-sc0:B> testboard SB3
host-sc0:B> showplatform -v
host-sc0:B> showboards -v


Now, that we've verified that the board is installed correctly and the system recognizes it, we get to the part that we could, theoretically, script out. There are so many variables here, that, maybe we should leave that up to Sun. If we all write them enough, maybe they'll include it in a future release of Solaris. It should raise the going price from an-unbelievable-amount-of-money to an-unbelievable-amount-of-money and 99 cents ;)

Now, we'll take a look at the following output - all should indicate your new system board (SB3) as active and available. This is done from the OS, as opposed to the "Domain Console"

host # usr/platform/sun4u/prtdiag -v
host # psrin
fo

Then, we'll need to make sure that Solaris absolutely positively knows it's there by "configuring" it, like so:

host # cfgadm -c configure N0.SB3

This step can take upwards of 15 to 20 minutes to complete. If you've ever powered down or powered up a 6800, this will seem like the blink of an eye :P

The next step really is quick. We'll use cfgadm again to "connect" the board:

host # cfgadm -c connect N0.SB5

Then, again, we'll just verify that it's there and, to be doubly sure, log back into the system console and ensure that it's been installed without errors as well, with:

host # /usr/platform/sun4u/prtdiag -v
host # psrinfo


And, then connect to the system console and do:

host-sc0:B> showplatform -v
host-sc0:B> showboards -v


And you should be all set, with the board showing up as belonging to your Domain :)

In a future post, we'll look at how horribly things can wrong in this scenario. I'll hope and pray that you don't have to suffer that in this lifetime!

Cheers,

, Mike




Saturday, December 15, 2007

Shutting Down Domains on Sun 6800/6900 Servers

Here's a little information that comes in handy every once in a while. As you get used to working with Sun's larger machines, the convenience of some of the more advanced features becomes almost trivial. It's common (at least for me) to forget, from time to time, that ServerA and ServerB actually reside on the same physical server (Server1, for example).

That's one thing you get reminded of very quickly when, say, ServerB has a hardware related problem and you need to fix it. When you're dealing with DataCenter class machines, you generally don't want to make a mistake and accidentally pull a card that belongs to ServerA in your attempts to fix ServerB. The headache-multiplication theory is taken for granted, not to mention that company's generally throw lots of money at humongous hardware so they can house systems of "greater importance" on them. ServerA and ServerB, almost literally, translate into lost-revenue when they go down. When you're stuck in this sort of situation, taking your time and doing things right (even if you need to take a gut-punch and "read the manual" ;) is always more important than trying to blast your way through it and hoping for the best.

Luckily, when you're dealing with the 6800/6900 server series from Sun, dealing with domains and working on a "single" machine on a multi-domain system is pretty simple as long as you take the necessary precautions (never be embarrased to type "help"). Also, just so I can start typing 6800 instead of 6800/6900 from now on; the only real difference between the two is the internal architecture. The 6800's are SCSI-based, while the 6900's are fiber. You'll note that this is the difference with almost all of Sun's server series that relate closely (the v480 and v490, or the v880 and v890 - All of them are just slightly different). The 900's and 90's were released because internal fiber disk is much faster than internal scsi-connected disk. To keep it simple ;)

As a for instance, let's say that ServerB is suffering terrible failures (even Sun can't readily explain them). A number of HBA's on the I/O boards have failed and there's a problem with one of the System Boards. Also, your root mirror disk is giving off errors left and right. This is a potentially horrible scenario for which no resolution will be given. We're just using it to make it so we can walk through the process of bringing ServerB down completely and replacing parts.

The first thing you'll want to do is to connect to the System Controller. This can be done any number of ways. Your site should have documentation related to how they've set it up. Generally it will be an SSH or Telnet connection to the SC. You can also set up direct connects for the Domain Consoles, but, even when we have them, I prefer to connect to the SC, as you can get to all of the Domain Consoles from there, as well as the "Platform Shell"! Assuming you've connected, you'll be at a terminal screen that looks something like this.

System Controller 'Server1':

Type 0 for Platform Shell

Type 1 for domain A console
Type 2 for domain B console
Type 3 for domain C console
Type 4 for domain D console


Since this is also very specific to how your machine was set up, we'll go with the assumption that ServerA is on the "Domain A" console and ServerB is on the "Domain B" console. Since we want to work on ServerB, and leave ServerA up and running while we do, we'll type in the following (This may seem counter-intuitive at first, but the fact that I'm logging into the "Platform Shell" rather than the "Domain B" console can offer some enhanced control (when you get around to playing with it) and allows you to connect to any domain directly from it):

Input: 0

Platform Shell

Server1:SC>


Now we're at the SC prompt, at the Platform Shell level -- Remember, at almost any point along the way you can type "help" to get a list of all available commands. When you get a chance, do so, and you'll see what I mean about the enhanced flexibility that starting off at the Platform Shell offers. To continue, we'll connect directly to the "Domain B" console, which is just like logging into a regular machine serial console:

Server1:SC> console b

Connected to Domain B

ServerB console login: root
Password: ******


And, just like on any other machine, we'll bring it down to an ok> prompt as if it weren't a part of a larger physical organism (Server1 - the big 6800)

ServerB# init 0

You'll get the regular system messages and whatever else gets spit to the screen when you normally shut down, and you're there. Now, we'll want to switch from the "Domain Console" to the "Domain Shell." We can do that like so:

{c} ok

<---------- Here type a literal [ctl]+] (the control key and the right bracket (]) simultaneously) - this will get you to a Telnet or SSH prompt - depending on your setup. Then, you'll send a "break" signal to make the switch from Console to Shell.

telnet> send break

Domain Shell for Domain B - ServerB

ServerB:B> setkeyswitch off
<-- This command is the one that will "turn off" ServerB. Note that, if you've looked at the "help" output, you don't want to run "poweroff" - That could seriously ruin your day ;) The "poweroff" command is used for powering off the physical grids. Generally, on a two domain 6800, you'll only have one, so running "poweroff" might bring down both ServerB and ServerA. Sun only requires you to split your 6800 into 2 grids if you want to have 3 or 4 domains!

Powering boards off ...
ServerB:B>


Now your "virtual" server (ServerB) is off, and ServerA is still up and running as if nothing were going on. You're ready to begin replacing parts.

As a quick note; before you completely disconnect from the "Domain Shell," I always find it's good practice to run the following comand:

ServerB:B> showboards

Slot Pwr Component Type State Status Domain
---- --- -------------- ----- ------ ------
/N0/SB1 Off CPU Board Assigned Not tested B
/N0/SB2 Off CPU Board Assigned Not tested B
/N0/SB3 Off CPU Board Assigned Not tested B
/N0/IB7 Off PCI I/O Board Assigned Not tested B
/N0/IB9 Off PCI I/O Board Assigned Not tested B


Write down the left-most column (Slot) and glance over the entries to make sure that they're all in the correct Domain (B, here) and that the "Pwr" (power) column lists them all as off. This will help make doubly sure you don't accidentally affect ServerA, as the CPU Board and I/O Board numbers are listed on the outsides of the devices and, if you've written this information down, you can refer to it and easily locate what part of the system you can safely work with.

And, of course (very quickly) for those of you who want to know how to get everything back up and running, just do the following (A very quick summary of commands and output here, as the concepts are all the same, but done in a logical reverse order; with the exception of the rarely needed "resume" command noted below)

System Controller 'Server1':

Type 0 for "Platform Shell"

Type 1 for domain A console
Type 2 for domain B console
Type 3 for domain C console
Type 4 for domain D console

Input: 0

Platform Shell

Server1:SC>

Server1:SC> console b

Connected to Domain B


<---------- Here type a literal [ctl]+ ]

telnet> send break

Domain Shell for Domain B - ServerB

ServerB:B> setkeyswitch on
Powering boards on ...
ServerB:B>resume
<--- Note that this command and the following are not usually necessary. Once you power on your system by doing the "setkeyswitch on," the 6800 will run through extensive system tests and boot the OS directly.

ok> boot

Hopefully the amount of time spent reading this will save you much much more in the future :)

Cheers,

, Mike