Monday, February 10, 2014

Linux FC command

# lspci | grep -i emulex
05:0d.0 Fibre Channel: Emulex Corporation LP9802 Fibre Channel Host Adapter (rev 01)
#
# cat /sys/class/scsi_host/host0/fwrev
1.90A4 (H2D1.90A4)
#
# cat /sys/class/scsi_host/host0/node_name
0x20000000c94f7dd9
#
# cat /sys/class/scsi_host/host0/port_name
0x10000000c94f7dd9
#
# cat /sys/class/scsi_host/host0/lpfc_drvr_version
Emulex LightPulse Fibre Channel SCSI driver 8.0.16.27
#
# cat /sys/class/scsi_host/host0/serialnum
MS54376943
#
# cat /sys/class/scsi_host/host0/speed
2 Gigabit
#
# cat /sys/class/scsi_host/host0/state
Link Up - Ready:
   Fabriccat /etc/redhat-release

[root@localhost ~]# cd /sys/class/scsi_host/host1/device/fc_host\:host1/
[root@localhost fc_host:host1]# more port_name
0x10000000c96dffce

===========

How to identify/get QLogic WWN on Red Hat Enterprise Linux 5 (RHEL5).

First identify your installed or recognized

# lspci | grep -i fibre
04:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
04:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
05:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
05:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)

On  Red Hat Enterprise Linux 5 (5.x) is on /sys/class/fc_host/hostX/port_name

(X is your device 1,2,3,…N)

For get use:

cat /sys/class/fc_host/hostX/port_name

Sample with multiple HBA (Fibre) QLogic

# ls /sys/class/fc_host/
host3  host4  host5  host6
# cat /sys/class/fc_host/host[3-6]/port_name
0x2100001b32936e24
0x2101001b32b36e24
0x2100001b32932821
0x2101001b32b32821

On Red Hat Enterprise Linux 4 (AS/ES) is on /proc/scsi/qla2xxx/1 (1,2,3,..N)

Sample:

# egrep [node|port] /proc/scsi/qlx2xxx/0
scsi-qla0-adapter-node=200000e08b1c19f2;
scsi-qla0-adapter-port=210000e08b1c19f2;
======================



# ls /sys/class/fc_host

host0  host1  host2  host3

fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l

echo "1" > /sys/class/fc_host/host0/issue_lip

echo "- - -" > /sys/class/scsi_host/host0/scan

echo "1" > /sys/class/fc_host/host1/issue_lip

echo "- - -" > /sys/class/scsi_host/host1/scan

echo "1" > /sys/class/fc_host/host2/issue_lip

echo "- - -" > /sys/class/scsi_host/host2/scan

echo "1" > /sys/class/fc_host/host3/issue_lip

echo "- - -" > /sys/class/scsi_host/host3/scan

cat /proc/scsi/scsi | egrep -i 'Host:' | wc -l

fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l
== delete LUN ==
#echo 1 > /sys/block/sdb/device/delete
#echo 1 > /sys/block/sdd/device/delete
================
===============

How to rescan LINUX OS for new Storage with Emulex HBA card

by Kumar on September 9, 2011

1.How to rescan the new Storage in RHEL4/RHEL5 with Emulex HBA Cards

In order to get the fiber channel adapters detail to rescan, list the /sys/class/fc_host directory. In old RHEL 4 host you will not be getting this listing. In this case you can use the /sys/class/scsi_host directory but it will list all internal adapters too.

# ls -l /sys/class/fc_host
total 0
drwxr-xr-x 3 root root 0 Jul  9 02:37 host0
drwxr-xr-x 3 root root 0 Jul  9 02:37 host1

#echo "1" > /sys/class/fc_host/host1/issue_lip
#echo "1" > /sys/class/fc_host/host2/issue_lip
#echo "- - -" > /sys/class/scsi_host/host1/scan
#echo "- - -" > /sys/class/scsi_host/host2/scan

2. After rescanning, confirm whether you are seeing the new storage disks[LUN] by listing the content under proc

cat /proc/scsi/scsi  or cat /proc/scsi/scsi | grep scsi | uniq

3. If you are using powerpath for multipathing, run the below command to scan the powerpath to get the newly added storage devices under powerpath control

powermt config

4. Then Check the newly added device under powerpath using the below command.

powermt display dev=all

5.If you are using device mapper multipathing, run the below command to scan the DMP to get the newly added storage devices under Linux DMP control

multipath -v1

multipath -v2

6.Then Check the newly added device under Linux DMP using the below command.

multipath -ll

=================
 How to scan newly added LUN using rescan-scsi-bus.sh ?
ENV : RHEL 5.4 and later

I suggest you NOT to scan the existing LUNs since I/O operations are still in use and if you scan them it will/may corrupt the file system.
So, I always suggest you to scan the new added device or storage. Once you add it,
HBA will detect the device and then you can scan this non-existent LUNs to the HBA. As an example you can execute the command like :

---
#rescan-scsi-bus.sh --hosts=1 --luns=2
---

Note : I assume that on host 1/or on HBA 1, lun 2 doesn't exist.

For more details please get help from :

---
#rescan-scsi-bus.s --help

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/rescan-scsi-bus.html
================
Here are outputs for commands:
# uname -a
Linux 64-cncrclinrpts 2.6.38-11-generic-pae #48-Ubuntu SMP Fri Jul 29 20:51:21 UTC 2011 i686 i686 i386 GNU/Linux

# file jasperreports-server-cp-4.1.0-linux-x64-installer.run
jasperreports-server-cp-4.1.0-linux-x64-installer.run: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.0, stripped

# ldd -r jasperreports-server-cp-4.1.0-linux-x64-installer.run
not a dynamic executable
== install CCI==
cd /
cpio -idmu  <  ./program/RM/HP-UX/RMHORC
/HORCM/horcminstall.sh

=============
This version supports hot adding new luns, etc. Please see text below on how
to perform the lun hot add procedure. The latest driver-v7.00.60-fo has the
mechanism which allows the user to force the driver to do re-scan of the
devices to allow a new device to be added. This triggers the driver to
initiate lun discovery process.

To do this from the command line:
#echo "scsi-qlascan" > /proc/scsi/<driver-name>/<adapter-id> (qlogic
driver will re-scan)

Where <driver-name> can be either one : qla2100/qla2200/qla2300 <adapter-id>
~ is the instance number of the HBA.

Once that has been done , user then can force the scsi mid layer to do
its own scan
and build the device table entry for the new device:
# echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
(scsi mid layer will re-scan) with "0 1 2 3"
replaced by your "Host Channel Id Lun". The scanning has to be done in
the above mentioned order.

First the driver (qla2300/qla2200 driver etc) and then the Linux scsi
mid layer.
---schnipp---


You take a look into "dmesg | less" and search for the information about
"Host Channel Id Lun", the Lun you have to know, from the Storage
Administrator.

echo "scsi-qlascan" > /proc/scsi/qla2200/1
echo "scsi-qlascan" > /proc/scsi/qla2200/2

echo "scsi add-single-device 1 0 0 6" >/proc/scsi/scsi

than take a look into "cat /proc/partions" if the pation is not there
you can do a "partprobe" (man partprobe).

==================
+ Multi Path
==================
#cat /etc/multipath.conf
multipaths {
       multipath {
               wwid                    360060e80105425e0056fcaee0000000d
               alias                   tuan
        }
}
defaults {
        user_friendly_names yes
}
blacklist {
        devnode "sda"
}

# multipath -ll
tuan (360060e80105425e0056fcaee0000000d) dm-2 HITACHI,DF600F
[size=100G][features=0][hwhandler=0][rw]
\_ round-robin 0 [prio=1][active]
 \_ 1:0:0:0 sdb 8:16  [active][ready]
\_ round-robin 0 [prio=0][enabled]
 \_ 2:0:0:0 sdc 8:32  [active][ready]


==============


Wednesday, June 19, 2013

CentOS / Red Hat Linux: Install and manage iSCSI Volume


by on October 30, 2007 · 51 comments· LAST UPDATED February 18, 2011
Internet SCSI (iSCSI) is a network protocol s that allows you to use of the SCSI protocol over TCP/IP networks. It is good alternative to Fibre Channel-based SANs. You can easily manage, mount and format iSCSI Volume under Linux. It allows access to SAN storage over Ethernet.

Open-iSCSI Project

Open-iSCSI project is a high-performance, transport independent, multi-platform implementation of iSCSI. Open-iSCSI is partitioned into user and kernel parts.
Instructions are tested on:
[a] RHEL 5
[b] CentOS 5
[c] Fedora 7
[d] Debian / Ubuntu Linux

Install Required Package

iscsi-initiator-utils RPM package - The iscsi package provides the server daemon for the iSCSI protocol, as well as the utility programs used to manage it. iSCSI is a protocol for distributed disk access using SCSI commands sent over Internet Protocol networks. This package is available under Redhat Enterprise Linux / CentOS / Fedora Linux and can be installed using yum command:
# yum install iscsi-initiator-utils

A note about Debian / Ubuntu Linux

If you are using Debian / Ubuntu Linux install open-iscsi package, enter:
$ sudo apt-get install open-iscsi

iSCSI Configuration

There are three steps needed to set up a system to use iSCSI storage:
  1. iSCSI startup using the init script or manual startup. You need to edit and configure iSCSI via /etc/iscsi/iscsid.conf file
  2. Discover targets.
  3. Automate target logins for future system reboots.
  4. You also need to obtain iSCSI username, password and storage server IP address (target host)

Step # 1: Configure iSCSI

Open /etc/iscsi/iscsid.conf with vi text editor:
# vi /etc/iscsi/iscsid.conf
Setup username and password:
node.session.auth.username = My_ISCSI_USR_NAME
node.session.auth.password = MyPassword
discovery.sendtargets.auth.username = My_ISCSI_USR_NAME
discovery.sendtargets.auth.password = MyPassword

Where,
  • node.session.* is used to set a CHAP username and password for initiator authentication by the target(s).
  • discovery.sendtargets.* is used to set a discovery session CHAP username and password for the initiator authentication by the target(s)
You may also need to tweak and set other options. Refer to man page for more information. Now start the iscsi service:
# /etc/init.d/iscsi start

Step # 2: Discover targets

Now use iscsiadm command, which is a command-line tool allowing discovery and login to iSCSI targets, as well as access and management of the open-iscsi database. If your storage server IP address is 192.168.1.5, enter:
# iscsiadm -m discovery -t sendtargets -p 192.168.1.5
# /etc/init.d/iscsi restart

Now there should be a block device under /dev directory. To obtain new device name, type:
# fdisk -l
or
# tail -f /var/log/messages
Output:
Oct 10 12:42:20 ora9is2 kernel:   Vendor: EQLOGIC   Model: 100E-00           Rev: 3.2
Oct 10 12:42:20 ora9is2 kernel:   Type:   Direct-Access                      ANSI SCSI revision: 05
Oct 10 12:42:20 ora9is2 kernel: SCSI device sdd: 41963520 512-byte hdwr sectors (21485 MB)
Oct 10 12:42:20 ora9is2 kernel: sdd: Write Protect is off
Oct 10 12:42:20 ora9is2 kernel: SCSI device sdd: drive cache: write through
Oct 10 12:42:20 ora9is2 kernel: SCSI device sdd: 41963520 512-byte hdwr sectors (21485 MB)
Oct 10 12:42:20 ora9is2 kernel: sdd: Write Protect is off
Oct 10 12:42:20 ora9is2 kernel: SCSI device sdd: drive cache: write through
Oct 10 12:42:20 ora9is2 kernel:  sdd: unknown partition table
Oct 10 12:42:20 ora9is2 kernel: sd 3:0:0:0: Attached scsi disk sdd
Oct 10 12:42:20 ora9is2 kernel: sd 3:0:0:0: Attached scsi generic sg3 type 0
Oct 10 12:42:20 ora9is2 kernel: rtc: lost some interrupts at 2048Hz.
Oct 10 12:42:20 ora9is2 iscsid: connection0:0 is operational now
/dev/sdd is my new block device.

Step # 3: Format and Mount iSCSI Volume

You can now partition and create a filesystem on the target using usual fdisk and mkfs.ext3 commands:
# fdisk /dev/sdd
# mke2fs -j -m 0 -O dir_index /dev/sdd1

OR
# mkfs.ext3 /dev/sdd1
Tip: If your volume is large size like 1TB, run mkfs.ext3 in background using nohup:
# nohup mkfs.ext3 /dev/sdd1 &
Mount new partition:
# mkdir /mnt/iscsi
# mount /dev/sdd1 /mnt/iscsi

Step #4: Mount iSCSI drive automatically at boot time

First make sure iscsi service turned on at boot time:
# chkconfig iscsi on
Open /etc/fstab file and append config directive:
/dev/sdd1 /mnt/iscsi ext3 _netdev 0 0
Save and close the file.

Further readings:

http://www.cyberciti.biz/tips/rhel-centos-fedora-linux-iscsi-howto.html

How do I... Install, configure, and use Microsoft's iSCSI initiator?

http://www.techrepublic.com/blog/howdoi/how-do-i-install-configure-and-use-microsofts-iscsi-initiator/107

This blog post is also available as a TechRepublic download in PDF form.
Internet Small Computer System Interface (iSCSI) has taken the storage world by storm. No longer is shared storage a niche enjoyed by only large, wealthy corporations. Internet SCSI is leveling the playing field by making shared storage available at a reasonable cost to anyone. By leveraging the ubiquitous Ethernet networks prevalent in most organizations, IT staff training costs for iSCSI are very low and result in quick, seamless deployments.
Further, operating system vendors are making it easier than ever to get into the iSCSI game by making iSCSI initiator software freely available. iSCSI networks require three components:
  1. An iSCSI target — A target is the actual storage array or volume, depending on how you have things configured.
  2. An iSCSI initiator — An iSCSI initiator is the software component residing on a server or other computer that is installed and configured to connect to an iSCSI target. By using an iSCSI initiator, target-based volumes can be mounted on a server as if they were local volumes and are managed as such.
  3. A gigabit Ethernet network infrastructure — iSCSI requires an IP-based Ethernet network for its transport between systems with initiators (servers) and targets (storage arrays).
In this How do I… blog post, I will show you how to install and configure Microsoft’s iSCSI initiator.

Step 1: Set up your target and communications infrastructure

Before you install the iSCSI initiator on any of your servers or workstations, you must have something to which the initiator will connect. This can be one of the enterprise class arrays, such as those available from LeftHand, EqualLogic, Dell, or EMC or, if you’re on a tighter budget and want to build your own array, a target running iSCSI target software, such as StarWind. For more information about building a SAN on the cheap, take a look at:
I recommend that, whenever possible, you use either a physically separate infrastructure or separate IP network/VLAN for your iSCSI traffic. By doing so, you simplify troubleshooting and configuration later on.
Setting up and configuring your target is beyond the scope of this article.

Step 2: Configure your local iSCSI network adapter

One best practice is to assign either a dedicated gigabit Ethernet NIC or TCP offload adapter (ToE adapter) in each server to handle iSCSI traffic — in other words, don’t share your user-facing network connection for storage traffic. If you’ve created a separate physical network or VLAN for storage traffic, assign this adapter an IP address that works on the storage network. By placing storage traffic on its own network that is routed separately from the main network, you increase the overall security of your storage infrastructure and simplify the overall configuration.

Step 3: Download Microsoft’s iSCSI initiator — if necessary

Depending on the operating system you’re using, you may need to download Microsoft’s iSCSI initiator software. If you’re planning to connect to an iSCSI target from a Windows XP or Windows Server 2003 system, visit Microsoft’s iSCSI initiator download page and obtain the software. If you’re connecting from a Windows Vista or Windows Server 2008 computer, Microsoft’s iSCSI initiator is included with these operating systems, so you can safely skip this step.
Make sure to download the initiator that is designed for your operating system. Microsoft provides builds for both 32-bit and 64-bit Windows. In the 64-bit category, versions are available for both x64-based processors and Itanium-based processors.

Step 4: Install the iSCSI initiator

If you’re running an operating system on which the iSCSI initiator software is not installed, execute the file you downloaded and follow the installation instructions (Figure A). The installer will ask you to decide which components you would like to install.

Figure A

Choose your installation options.
  1. Initiator service — This is the service behind the actual work.
  2. Software initiator — The software initiator is the software service that handles iSCSI traffic.
  3. Microsoft MPIO Multipathing Support for iSCSI — MPIO is a way that you can increase the overall throughput and reliability of your iSCSI storage environment. See Step 6 for more information about how MPIO can be of benefit.
If you have a target that supports Microsoft’s MPIO (check with your manufacturer), you should enable this option. Otherwise, if your target supports MPIO through the use of a proprietary device-specific module (DSM), obtain that DSM from your array manufacturer and follow the manufacturer’s installation recommendations.

Step 5: Connect to the iSCSI array

Now that you have the initiator software installed, you need to tell it where to look for mountable volumes. Start the initiator configuration by going to the Control Panel and choosing the iSCSI Initiator option. From the initiator, choose the Discovery tab, shown in Figure B.

Figure B

The iSCSI initiator’s Discovery tab.
On the Discovery tab, click the Add button under the Target Portals box. This will open the Add Target Portal dialog box, shown in Figure C.

Figure C

The Add Target Portal dialog box.
In the Add Target Portal dialog box, provide the name or IP address of your iSCSI array. The default communication port for iSCSI traffic is 3260. Unless you have changed your port, leave this as is. If you have configured CHAP security or are using IPSec for communication between your client and the array, click on the Advanced button and make necessary configuration changes. The Advanced Settings dialog box is shown in Figure D.

Figure D

Advanced options for connecting to your iSCSI array.
Back on the Add Target Portal, click the OK button to make the initial connection to the iSCSI array. Note that, at this point, you’re not connecting to an actual volume, but only to the array in general. (Figure E)

Figure E


The target portal has been added to the initiator.

Step 6: Connect to a target/volume

Even though you’re connected to the array itself, you still need to tell the initiator exactly which target or volume you want to mount on your local machine. To see the list of available targets on the array you selected, choose the Targets tab, shown in Figure F.

Figure F

The iSCSI initiator Target tab in this example has only a single volume available.
To connect to an available target, choose the target and click the Log On button. A window pops up (Figure G) with the target name and two options from which you can choose.

Figure G

iSCSI target Log On options.
The two options are important. If you want your server to connect to this volume automatically when your system boots, make sure you choose the Automatically Restore This Connection When The System Boots check box. Unless you have a good reason otherwise, you should always select this check box. If you do not, you can’t make the iSCSI target persistent after a reboot and will need to manually reconnect it.
To enable high availability and to boost performance, choose the Enable Multi-path check box. Make sure to understand that multi-pathing (MPIO) requires multiple network adapters dedicated to the iSCSI task, and for maximum availability, you should also have a fully meshed gigabit Ethernet architecture for your storage traffic.
Again, if you are using CHAP or IPSec for communication with a target, click the Advanced button to bring up the Advanced Settings dialog box you saw in Figure D.
Once you finish making decisions regarding how you want to connect to your target, from the Log On To Target window, click the OK button. The target status in the imitator window should change to Connected. (Figure H)

Figure H

The target is now connected.

Step 7: Bind the targets

Now, you have successfully connected to a shared target on your iSCSI array. If you selected the Automatically Restore This Connection When The System Boots check box as explained in the previous step, you can now add the target to the iSCSI service’s binding list. By doing so, you make sure that Windows does not consider the iSCSI service fully started until connections are restored to all volumes on the binding list. This is important if you have data on an iSCSI target that other services depend on. For example, if you create a share on your server and that shared data resides on an iSCSI target, the Server service that handles the share depends on the iSCSI service’s complete availability to bring up the shares.
Note: With older versions of the iSCSI initiators, creating this kind of dependency structure required you to reconfigure individual service dependencies — a process that could get complicated. With the iSCSI Initiator version 2, Microsoft has fixed this issue, but you still need to bind the targets.
The best option is to choose the Bound Volumes/Devices tab from the iSCSI Initiator’s control panel and click the Bind All button at the bottom of the window (Figure I). This will bind all available iSCSI targets (that can be bound) to the iSCSI startup process. If you want to choose individual targets to bind, click the Add button. However, you will need to know the target’s drive letter or mount point. At this point in these instructions, we haven’t gotten quite that far.

Figure I


Bound volumes are listed on this tab.

Step 8: Manage the new volume(s)

When you mount a brand new iSCSI-based volume on your server, Windows treats it the same as if you had added a new hard drive to your computer. Take a look at this: Open Computer Management (Start | Right-click My Computer | Manage). Choose the Disk Management option. If the volume you are using is still blank — that is, newly created on your iSCSI target and does not contain data — Windows will pop up the Disk Initialization wizard, as shown in Figure J.

Figure J


The Windows Disk Initialization wizard.
Note in Figure J that Disk 1 is not yet initialized and has a size of 1,020 MB. This disk is a small target I created on my iSCSI host. An iSCSI-based volume follows the same rules as any other Windows volume. You can create this volume as basic or dynamic (although dynamic is not recommended for iSCSI) or even as GPT (GUID partition table) volumes, which support volumes in excess of 2TB.
Just as is the case with any Windows volume, you need to initialize the new drive, create a partition, and format the new volume. Take note in Figure J that Windows truly sees this disk as just another typical volume. There is nothing on the Disk Management screen to indicate that Windows is treating this volume any differently because it is stored on an iSCSI array.

Summary

Once you get past the mental adjustment that has to take place when you start using shared storage, you’ll probably find that iSCSI (or Fibre Channel, for that matter) shared storage opens up a number of possibilities. These steps are designed to get you quickly on your way and will not cover every scenario, but it will get you started.

Friday, April 26, 2013

Brocade Password Recovery

Brocade Communities : Brocade Password Recovery Notes Publication Number: 53-1000114-01: "Fabric OS

Password Recovery Notes

Supporting Fabric OS v2.6.x, v3.1.x, v4.x, v5.x

2 of 12 Fabric OS Password Recovery Notes

Publication Number: 53-1000114-01

Copyright © 2006, Brocade Communications Systems, Incorporated.

ALL RIGHTS RESERVED. Publication Number: 53-1000114-01


If you have access to the root account you can reset the passwords for all other accounts on the system including: the

factory, admin, and user accounts. The root account can reset the root, factory, and admin accounts; admin can reset the

user login. See “Password Recovery Using Root Account” on page 3.

If you do not have access to the root account, you can use the Boot PROM password to reset the system passwords to

default values. This option is only available on Fabric OS v4.1 or greater, and you must have the Boot PROM password

(unless no Boot PROM password was set). See “Password Recovery Using the Boot PROM” on page 4.

If you do not have either the root or Boot PROM password, or your system is loaded with a version older than Fabric OS

v4.1, contact your switch service provider for a Boot PROM recovery string to regain access to the switch. See “Obtaining

the Boot PROM Recovery Password” on page 7.

Password Recovery Using Root Account

If you have access to the root account, you can reset the password for any admin, factory, and user accounts without

knowing the account’s current password.

To reset any account password from the root account:

1. Open a CLI session (serial or telnet for an unsecured system and sectelnet for a secure system) to the switch.

2. Log in as root.

3. At the prompt, enter the passwd command, followed by the account name as shown below:

switch:root> passwd account

Note

When connected through a serial cable to the console, always save the output using the capture functionality

under windows (or script functionality for UNIX or Linux).

Note

In a fabric with Secure Fabric OS enabled, you must log in to the primary FCS to perform these tasks.

4 of 12 Fabric OS Password Recovery Notes

Publication Number: 53-1000114-01

4. Follow the prompts to reset the password for the selected account. For example:

Password Recovery Using the Boot PROM

If you know the Boot PROM password or none was set on your system, use this procedure to reset the passwords to

default values on the switch or director. The current Fabric OS level of the switch or director must be v4.1 or greater.

To reset the root password to default using the Boot PROM password:

1. Connect to the serial console port of the switch (SilkWorm 200E, 3250, 3850, 3900, 4100, 4900 or 7500 switch) or

the standby CP of a director (SilkWorm 12000, 24000, or 48000). Use the hashow command to see which CP is

active and which is standby.

2. Enter the reboot command.

3. Press ESC at the message “Press escape within 4 seconds...” The Boot PROM menu is displayed with the following

options:

- 1) Start system

Used to reboot the system.

- 2) Recover password.

Used to generate a character string for your support provider to recover the Boot PROM password.

- 3) Enter command shell.

Used to enter the command shell, to reset all passwords on the system.

switch:root> passwd admin

Changing password for admin

Enter new password: xxxxxxx

Re-type new password: xxxxxxx

passwd: all authentication tokens updated successfully

Saving password to stable storage.

Password saved to stable storage successfully.

Note

This procedure is disruptive to traffic on the SilkWorm 200E, 3250, 3850, 3900, 4100, 4900 and 7500 switches,

because it requires you to reboot the switch; traffic resumes after the switch is rebooted. On a SilkWorm 12000,

24000, or 48000 director, you can reset the passwords without disruption by performing this procedure on the

standby CP.

Note

If you are attempting to recover passwords for Fabric OS v4.4.0, you must review “Password Recovery for

Fabric OS v4.4.0” on page 8 prior to beginning this procedure.

Fabric OS Password Recovery Notes 5 of 12

Publication Number: 53-1000114-01

4. Type 3 at the prompt to open the command shell.

5. Type the Boot PROM password, if prompted, then press Enter. The Boot PROM has a password only if one was

defined earlier.

6. Run the printenv command, then save the output to a file. You will need to refer to this output later in the procedure.

7. Locate the first memory address; it is the string after OSLoader= in the printenv output.

8. Run the boot command with the first memory address and the –s option. For example:

9. For a SilkWorm 200E, 3250, 3850, 3900, 4100, 4900, or 7500 switch, perform the following steps:

a. Enter the mount command with the following parameters:

> mount -o remount,rw,noatime /

This will remount the root partition as read/write.

b. Enter the mount command with the following parameters where hda is followed by the second partition value

(such as 1 or 2) from OSRootPartition in the printenv output:

> mount /dev/hda2 /mnt

The system is coming up, please wait...

Checking system RAM - press any key to stop test

01a00000

System RAM check terminated by keyboard

System RAM check complete

Press escape within 4 seconds to enter boot interface.

1) Start system.

2) Recover password.

3) Enter command shell.

Option? 3

1) Start system.

2) Recover password.

3) Enter command shell.

Option? 3

Boot PROM password has not been set.

> printenv

AutoLoad=yes

ENET_MAC=0060696019B4

InitTest=MEM()

LoadIdentifiers=Fabric Operating System;Fabric Operating System

OSBooted=MEM()0xF0000000

OSLoadOptions=quiet;quiet

OSLoader=MEM()0xF0000000;MEM()0xF0800000

OSRootPartition=hda1;hda2

SkipWatchdog=yes

>

> boot MEM()0xF0000000 -s

Booting 'Manually selected OS' image.

Entry point at 0x00800000 ...

6 of 12 Fabric OS Password Recovery Notes

Publication Number: 53-1000114-01

c. Enter the passwddefault command, as follows:

> /sbin/passwddefault

This resets all account passwords to the default values. If there were additional user accounts created, they are

deleted and only the default accounts and passwords remain.

d. Reboot the switch using the reboot –f command.

> reboot -f

Traffic flow resumes when the switch completes rebooting. If you do not use the –f you will have to manually

reboot the switch.

e. Log in as root to the switch by serial or telnet and set new passwords for all accounts.

The process is now complete.

10. For a SilkWorm 12000, 24000, or 48000 director, perform the following steps

a. From the serial connection to the standby CP, determine the hostname of the CPs. This can be done using the

# /bin/cat /etc/hosts command:

b. From the serial connection to the standby CP, set the appropriate hostname to the CP. Use the hostname displayed

in the previous step. In the above example mycp0 is the standby CP.

hostname

c. Start networking on the standby CP:

> /etc/init.d/network start

d. Perform one of the following according to which slot the CP card is in:

- If the standby CP card is in slot 5 (CP0), enter:

> rsh 10.0.0.6 /sbin/passwddefault

- If the standby CP card is in slot 6 (CP1), enter:

> rsh 10.0.0.5 /sbin/passwddefault

e. Reboot the standby CP using the reboot –f command.

> reboot –f

If you do not use the –f option you will have to manually reset the CP by moving the slider switch to the off and

then on position.

# /bin/cat /etc/hosts

127.0.0.1 localhost

10.64.148.23 swd77 #sw0 255.255.240.0

10.64.148.24 swd76 #sw1 255.255.240.0

10.64.148.25 mycp0 #cp0 255.255.240.0 < CP0 SLOT 5

10.64.148.26 cp1 #cp1 255.255.240.0 < CP1 SLOT 6

0.0.0.0 fc0 #fc0 0.0.0.0

0.0.0.0 fc1 #fc1 0.0.0.0

10.0.0.5 cp_0_inteth #cp_0_internaleth

10.0.0.6 cp_1_inteth #cp_1_internaleth

Note

The hostname for CP0 or CP1 are user definable, and may be different for each installation.

Fabric OS Password Recovery Notes 7 of 12

Publication Number: 53-1000114-01

f. Log in to the active CP as admin from a telnet or serial connection, and enter Ctrl + C to bypass the request to

modify passwords.

g. Log in to either logical switch by serial or telnet as admin and set new passwords for all accounts. The password

recovery procedure is now complete.

Obtaining the Boot PROM Recovery Password

This section explains how to gather the information you need to send to your switch support provider in order to get a

Boot PROM recovery password. Once you have received the Boot PROM recovery password, and gained access to the

Boot PROM, you reset the passwords using “Password Recovery Using the Boot PROM” on page 4.

To obtain the Boot PROM recovery password from your switch support provider:

1. Connect to the serial port interface of the switch or standby CP.

2. Reboot the switch or standby CP.

3. Press ESC within four seconds after the message “Press escape within 4 seconds...”.

4. Enter 2 at the prompt. A character string is displayed.

5. Send the character string to your switch support provider to obtain a Boot PROM recovery password.

6. Perform the appropriate steps to set the Boot PROM password if it was not set, as prompted:

Recovery password is NOT set. Please set it now.

7. Enter the Recovery Password that is generated from your support provider when prompted.

8. When prompted with “New password:”, enter the new Boot PROM password and re-enter when prompted.

9. Record the new password for future reference.

10. Enter the saveenv command.

1) Start system.

2) Recover password.

3) Enter command shell.

Option? 2

Send the following string to Customer Support for password recovery:

/uasLR1raCqT3FToqy0ZjA==

Enter the supplied recovery password.

Recovery Password: YnfG9DDrlFMDVkNM0RkPtg== < Supplied by your support provider

Re-enter Recovery Password: YnfG9DDrlFMDVkNM0RkPtg==

New password: xxx

Re-enter new password: xxx

> saveenv

8 of 12 Fabric OS Password Recovery Notes

Publication Number: 53-1000114-01

Password Recovery for Fabric OS v4.4.0

In Fabric OS v4.4.0, you must take additional steps prior to and after performing the “Password Recovery Using the Boot

PROM” on page 4. Otherwise, the switch is left in single-user mode.

Password Recovery Steps Before Root Command

1. Connect to the serial port of the switch or the standby CP.

2. Reboot the switch and press ESC within 4 seconds after the message 'Press escape within 4 seconds...'.

3. Enter the Boot PROM password.

4. Enter 3 at the prompt to enter the command shell.

5. Enter the printenv command and save the output. For example:

6. From the output of the printenv, record the value for OSLoader.

OSLoader ___________________________________________

Password Recovery Steps After Root Command

After you have recovered the passwords:

1. Connect to the serial port interface of the switch or standby CP.

2. Reboot the switch and press ESC within 4 seconds after the message 'Press escape within 4 seconds...' displays.

'Enter Boot PROM interface:'

3. Enter the Boot PROM password.

4. Enter 3 at the prompt to enter the command shell.

The system is coming up, please wait...

Checking system RAM - press any key to stop test

Checking memory address: 01300000

System RAM check terminated by keyboard

System RAM check complete

Press escape within 4 seconds to enter boot interface.

1) Start system.

2) Recover password.

3) Enter command shell.

Option? 3

Password:

> printenv

AutoLoad=yes

ENET_MAC=006069602BD6

InitTest=MEM()

LoadIdentifiers=Fabric Operating System;Fabric Operating System

OSLoader=MEM()0xF0000000;MEM()0xF0800000

OSLoadOptions=quiet;quiet

OSRootPartition=hda1;hda2

SkipWatchdog=yes

Fabric OS Password Recovery Notes 9 of 12

Publication Number: 53-1000114-01

5. Enter the following command strings, one at a time, to reset the passwords:

unsetenv OSBooted

setenv LoadIdentifiers=Fabric Operating System;Fabric Operating System

setenv OSLoadOptions=quiet;quiet

setenv OSLoader=MEM()0xF0000000;MEM()0xF0800000

saveenv

printenv

reset

Password Recovery on VXWorks-Based Switches

This procedure requires Password Recovery firmware, available from your switch support provider. The Password

Recovery firmware is effective only for the first time it is launched. You cannot use the Password Recovery firmware to

perform any other switch functions.

These procedures require switch downtime. Brocade recommends removing the switch from the fabric and rejoining it

after the recovery process is complete.

In order to complete the steps in this section you need the following:

• Password Recovery firmware: Send the switch WWN to your switch support provider with a request for the Password

Recovery firmware. This firmware can be launched once, and it recovers the password for the specific switch only.

• Ethernet connection between host and switch. It can be either a network connection from a host to the switch or a

direct connection with an Ethernet crossover cable.

• Serial connection to the switch

Reset Passwords for Fabric OS v2.6.1+, and v3.1+

To reset the passwords on a Fabric OS v2.6.x and greater, or v3.1.x and greater switch using the Password Recovery

firmware:

1. Copy the Password Recovery firmware to a secure location that is accessible to the switch; that is, an FTP server

accessible to the switch. You must use either FTP or RSHD to copy the firmware. If FTP is used, the password cannot

be blank.

2. Connect to the console port.

3. Power the switch off and back on.

4. Set the boot parameters on your switch to perform a netboot:

a. At the “[VxWorks Boot]” prompt for the switch, enter c.

Note

The value of the OSLoader= string should be set to the exact value from step 6 on page 8.

10 of 12 Fabric OS Password Recovery Notes

Publication Number: 53-1000114-01

b. Type the requested information at the prompts. To accept the default value for a parameter, press Enter.

The parameters are defined as follows.

host name Name of machine on which Password Recovery firmware is located

file name Full pathname where Password Recovery firmware is located

inet on ethernet Switch IP address

host inet Host IP address

gateway inet Gateway address

user Login name of user account on host machine

Press any key to stop auto-boot...

[VxWorks Boot]: c

'.' = clear field; '-' = go to previous field; ^D = quit

boot device : fei

processor number : 0

host name : host

file name : /usr/switch/firmware resetPasswd303f6f

inet on ethernet (e) : 192.168.132.217:fffff000

inet on backplane (b):

host inet (h) : 192.168.132.133

gateway inet (g) : 192.168.132.133

user (u) : user

ftp password (pw) (blank = use rsh):

flags (f) : 0x0

target name (tn) : sw2800

startup script (s) :

other (o) :

Fabric OS Password Recovery Notes 11 of 12

Publication Number: 53-1000114-01

5. Type @ at the [VxWorks Boot] prompt to begin booting the Password Recovery version of the firmware from the

network.

The user, admin, factory, and root passwords are reset to the default values.

6. Power the switch off and back on.

7. Press any key when you see the message “Press any key to stop autoboot...” This provides access to the boot prompt.

8. Set the switch to boot from the flash again:

a. At the [VxWorks Boot] prompt, type c to begin resetting the boot parameters to the default settings.

b. Remove the values that you added by typing a period (.) after each parameter, then pressing Enter. The boot

parameters are returned to the default settings.

9. Power the switch off and back on to reload the original firmware from flash. The switch resumes normal operation.

10. Log in to the switch by telnet or serial as root, and set new passwords for all accounts.

[VxWorks Boot]: @

boot device : fei

processor number : 0

host name : host

file name : resetPasswd303f6f

inet on ethernet (e) : 192.168.132.217:fffff000

host inet (h) : 192.168.132.133

gateway inet (g) : 192.168.132.133

user (u) : user

flags (f) : 0x0

target name (tn) : sw2800

Attaching network interface fei0... done.

Attaching network interface lo0... done.

host is alive <-------------------------CONNECTION TO HOST PROVIDING FIRMWARE IMAGE

Loading... 4407608 + 329564 + 1153796

Starting at 0x10400000...

Attaching network interface fei0... done.

Attached TCP/IP interface to fei unit 0

Attaching network interface lo0... done.

telnetInit: telnetd initialized.

NFS client support not included.

efwHookAdd: Added Ethernet Hook

Adding 9407 symbols for standalone.

Model: 4

flash time 0, creation time 1048818644

Committing configuration...done.

setting passwd to defaults <-------FIRMWARE IMAGE RESETS PASSWORD TO BROCADE

DEFAULTS

Time Bomb has been set

RESTRICTED ONE TIME USE

Passwords have been reset. Please power cycle the switch.

12 of 12 Fabric OS Password Recovery Notes

Publication Number: 53-1000114-01

Thursday, January 17, 2013

Powerdown parameter for Solaris boxes

http://gurkulindia.com/main/2012/09/powerdown-parameter-for-solaris-boxes/#more-7132

I came across one unique parameter which I would like to share on our gurkulindia, specially for small business organisations where we dont have seperate power backups for DC.
Has anyone noticed while working on Solaris boxes if you will power down (init 5 or poweroff from LOM/ALOM/ILOM) the Solaris boxes, they wont come up automatically after physical power on (only LOM boots but No OS). Which is a serious concern if any power outage occur or any power unit failure occurs etc etc…
Ex: Suppose a power outage occurred in any DC and 100 Solaris boxes went down. Now after power restoration, you wont be able to see any Solaris Box up and running. Manual intervention is required and SA need to power on the boxes manually from LOM prompt. Practically this situation is highly unacceptable in any organisation and this is the default feature of Solaris.
After a long investigation and googling and PDF’s I safely landed on earth :-) and the landmark is below. There is a parameter on LOM/ALOM (for Sparc arch.) and ILOM (for intel arch.) which you wont find in help. The default value for that parameter is FALSE which wont allow your OS instance to boot up and hence it just stuck and wait for manual intervention at LOM level only.
I have tested the same in large scaled Solaris environment while performing hardware replacements & upgrades, when the value is FALSE the server stuck at LOM and OS wont come up, on the other hand if the value is changed to TRUE and power restored the Box comes up.
Below is the PARAMETER explanation with possible options:
sc_powerstatememory
ALOM runs as soon as power is applied to the host server, even if the server is powered off. When you first apply power to the host server, ALOM starts to run, but the server does not start up until you power it on.
The sc_powerstatememory variable allows you to specify the state of the host server as false (keep the host server off) or true (return the server to the state it was in when the power was removed). This is useful in the event of a power failure, or if you physically move the server to a different location.
For example, if the host server is running when power is lost and the sc_powerstatememory variable is set to false, the host server remains off when power is restored. If the sc_powerstatememory variable is set to true, the host server restarts when the power is restored.
The values for this variable are as follows.
true — “Remembers” the state of the host server when power was removed and returns the server to that state when power is reapplied.
 
false — Keeps the server off when power is applied
I think one change this value to TRUE on Solaris servers so that in case if any unintentional power outage occurs (when NO power backup is there) the server restoration time would be minimum.
Below is the procedure to check and set this parameter is below:
sc> showsc sc_powerstatememory
False
sc> setsc sc_powerstatememory true
sc> showsc sc_powerstatememory
True
Note: 1.) AIX and Linux are having this feature by default i.e both will boot up after power restoration by default.
              2.) Dont get confused with auto-boot, auto-boot is to restrict your OS to OK prompt.

Deployment and understanding of LDOMS (Logical Domains)

http://gurkulindia.com/main/2012/07/deployment-and-understanding-of-ldoms-logical-domains/#more-6944

Deployment and understanding of LDOMS (Logical Domains):
Ldom technology allows us to allocate a system’s various resources such as memory, CPUs and devices (I/O,Networl interfaces etc) into logical groupings and create multiple, discrete systems each having their own operating system, resources, and identity within a single computer system.
Ex: In General Server Techonoly, an OS is directly interacting with hardware through defined system procedure calls and uses complete hardawre resources. But in LDOM the concept is bit different, a new layer between Hardware and OS has been introduced which is called “HYPERVISOR”. It interacts as a medium between Hardware & OS and hence present the hardware components as defined by users to OS. In this case the resource allocation/representation is be done by HYPERVISOR and hence individual OS can have well defined hardware resources. Also remember in LDOM the allocated devices/resources are called VDEV’s (Virtual Devices).
Note: Ldom techology only supported on T-series servers, sparc-4v architecture with Solaris-10  only.
Role of Hypervisor:
===============
The hypervisor, with its stable sun4v interface, is the centerpiece to creating logical domains. Important points to remember are:
• The hypervisor is the layer between the operating system and hardware.
• The hypervisor implements a stable sun4v interface. The operating system makes calls to the hypervisor, and therefore, does not need to know intimate details about the hardware, even if the platform changes.
• The hypervisor is very thin; it exists only to support the operating system for hardware-specific functions, making it small and simple, which assists in
stability.
• The hypervisor creates a virtual machine allowing the system to be partitioned by exposing some of the resources to a specific partition and hiding others.
• The hypervisor creates communication channels, logical domain channels (LDCs), between domains to provide a conduit for services such as networks and shared devices.
Domain Types:
============
There are several different roles for logical domains, and these are mainly defined by context, their usage defines them. A domain may have one or more of these roles, such as combining the functions of an I/O and service domain:
• Control domain – Creates and manages other logical domains and services by communicating with the hypervisor.
• Service domain – Provides services, such as a virtual network switch or a virtual disk service, to other logical domains.
• I/O domain – Has direct ownership of and direct access to physical input/output devices, such as a PCI Express card or a network device. Can optionally share those devices to other domains by providing services.
• Guest domain – Presents a virtual machine that subscribes to services provided by service domains, and is managed by the control domain.
LDOM Daemons:
==============
There are two LDOM daemons ruuning on the system which are.
LDMD (Logical Domain Daemon)
VNTSD (Virtual Network Terminal Server Daemon)
Note: Some common terms used in LDOM are Virtual Machine Description (ldm list-spconfig), Virtual Devices (CPU’s, Memory, I/O Devices), Networking (Virtual network (vnet) device, Virtual network switch (vsw)), Storage (Virtual disk client (vdc) driver, Virtual disk server (vds) driver), Console, Cryptographic Devices etc. I will suggest to refer man ldm for all these terms to have much clear understanding.
In this section, I will expalin and create a Controler Domain (Host Domain or Primary Domain).
Pre-requisites:
============
1.) Solaris OS release level:
=====================
The Solaris OS release level should be at-least Solaris 10 11/06 OS. If not then release upgrade should be required to have LDOM software on your system.
# cat /etc/release
  Solaris 10 11/06 s10s_u3wos_10 SPARC
 Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
  Use is subject to license terms.
       Assembled 14 November 2006
2.) Recommneded Patches:
======================
Its always recommneded to have latest Bundle patch installed on your system. Otherwise make sure below patches should be there in the system. If not present kindly install them before proceeding further:
•118833-36, Kernel update patch
•124921-02, which contains updates to the Logical Domains 1.0 drivers and utilities
•125043-01, which contains updates to the qcn (console) drivers.
Note: Kindly go through the readme file for these patches as they required reconfig reboots.
3.) Firmware Versions:
==================
Its always recommended to have latest firmware level installed on your system. As this ensures the hardware and hypervisor can communicate correctly, and all of the features of the your servers can operate.
We can check our current firmware level at ALOM/OS level as follow:
sc> showhost
Sun-Fire-T2000 System Firmware 6.7.12  2011/07/06 20:03
Host flash versions:
   OBP 4.30.4.d 2011/07/06 14:29
   Hypervisor 1.7.3.c 2010/07/09 15:14
   POST 4.30.4.b 2010/07/09 14:24
# prtconf -V
OBP 4.30.4.d 2011/07/06 14:29
Note: I have carried out my testing on T-2000 server and patched the box to latest firmware level.
4.) Installation of Logical Domains Manager:
===================================
The LDOM package is not a default part of Solaris OS. We have to download it from Oracle site and have to apply that on our system as superuser.
SUNWldm.v – Logical Domains Manager package
SUNWjass – Solaris Security Toolkit packages
I have installed LDOM 1.2 version on my machine as shown below:
# pkginfo -l SUNWldm
   PKGINST:  SUNWldm
      NAME:  Logical Domains Manager
  CATEGORY:  application
      ARCH:  sparc.sun4v
   VERSION:  1.2,REV=2009.06.25.09.48
   BASEDIR:  /
    VENDOR:  Sun Microsystems, Inc.
      DESC:  LDoms Manager – UltraSPARC CMT virtualization
    PSTAMP:  svlpen-on10-020090625094807
  INSTDATE:  Jun 21 2012 11:44
   HOTLINE:  Please contact your local service provider
    STATUS:  completely installed
     FILES:       66 installed pathnames
                  11 shared pathnames
                  20 directories
                  18 executables
                6564 blocks used (approx)
# ldm -V
Logical Domain Manager (v 1.2)
        Hypervisor control protocol v 1.3
        Using Hypervisor MD v 1.1
System PROM:
        Hypervisor      v. 1.7.3.       @(#)Hypervisor 1.7.3.c 2010/07/09 15:1415
        OpenBoot        v. 4.30.4.      @(#)OBP 4.30.4.d 2011/07/06 14:29
Note: This package is installed as a script and not as a package.
Creation of Controller Domain:
=========================
1.) Test the ldom software is working and is communicating with the HYPERVISOR:
# ldm list
——————————————————————————
Notice: the LDom Manager is running in configuration mode. Configuration and
resource information is displayed for the configuration under construction;
not the current active configuration. The configuration being constructed
will only take effect after it is downloaded to the system controller and
the host is reset.
——————————————————————————
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -t-c–  SP      32    32640M   0.1%  5d 4h 54m
Note: a.) Path for ldm comamnd is /opt/SUNWldm/bin/
            b.) The “t” in FLAGS shows the domain is not yet up and “n” instead of “t” indicates that the server is up.
2.) Creation of default services, which should always be there in Controller Domains. The services are Disk Services, Console Services and Network services. Below are the steps to create them:
# /opt/SUNWldm/bin/ldm add-vds primary-vds0 primary
—————————————————————————-
Notice: the LDom Manager is running in configuration mode. Any configuration
changes made will only take effect after the machine configuration is
downloaded to the system controller and the host is reset.
—————————————————————————-
# /opt/SUNWldm/bin/ldm add-vcc port-range=5000-5100 primary-vcc0 primary
—————————————————————————-
Notice: the LDom Manager is running in configuration mode. Any configuration
changes made will only take effect after the machine configuration is
downloaded to the system controller and the host is reset.
—————————————————————————-
# /opt/SUNWldm/bin/ldm add-vsw net-dev=e1000g0 primary-vsw0 primary
—————————————————————————-
Notice: the LDom Manager is running in configuration mode. Any configuration
changes made will only take effect after the machine configuration is
downloaded to the system controller and the host is reset.
—————————————————————————-
3.) List the services which we have just created:
# /opt/SUNWldm/bin/ldm list-services primary
—————————————————————————-
Notice: the LDom Manager is running in configuration mode. Configuration and
resource information is displayed for the configuration under construction;
not the current active configuration. The configuration being constructed
will only take effect after it is downloaded to the system controller and
the host is reset.
—————————————————————————-

Vds: primary-vds0
Vcc: primary-vcc0
port-range=5000-5100
Vsw: primary-vsw0
mac-addr=0:14:4f:f9:68:d0
net-dev=e1000g0
mode=prog,promisc
4.) Now our next step would be to provide the Resources to controller Domain. We will specify an amount of CPU and memory that should be considered a good starting point. Our Primary Domain resources would be as:
• 1 x MAU (cryptographic) unit – these are bound on a per-core basis, and need
to be set up prior to assigning VCPUs
• 4 x virtual CPUs (1 core on an Ultra SPARC T1 system)
• 1024 Mbytes memory (as we will not be using ZFS to deliver disk services, we
do not need the minimum of 4Gbytes memory.)
• Configuration will be saved as “initial”
# /opt/SUNWldm/bin/ldm set-mau 1 primary
—————————————————————————-
Notice: the LDom Manager is running in configuration mode. Any configuration
changes made will only take effect after the machine configuration is
downloaded to the system controller and the host is reset.
—————————————————————————-
# /opt/SUNWldm/bin/ldm set-vcpu 4 primary
—————————————————————————-
Notice: the LDom Manager is running in configuration mode. Any configuration
changes made will only take effect after the machine configuration is
downloaded to the system controller and the host is reset.
—————————————————————————-
# /opt/SUNWldm/bin/ldm set-memory 1024m primary
—————————————————————————-
Notice: the LDom Manager is running in configuration mode. Any configuration
changes made will only take effect after the machine configuration is
downloaded to the system controller and the host is reset.
—————————————————————————-
5.) Creation and use of newly created configuration:
Now that the control domain is configured the way we want it, we need to store it. The hypervisor will then use this configuration after the next power cycle. First, we will list available configurations and then create a new one called initial, and finally confirm its creation:
# /opt/SUNWldm/bin/ldm list-spconfig
factory-default [current]
# /opt/SUNWldm/bin/ldm add-spconfig initial
# /opt/SUNWldm/bin/ldm list-spconfig
factory-default [current]
initial [next]
Note: We can see the new configuration initial has been created and listed as the configuration to use at the next reboot. If a configuration with the name initial already existed, we would receive an error, and would need to use the ldm remove-spconfig command to remove the existing configuration first.
6.) Now we need to reboot our box for the previous changes which we have made to take effects releasing resources for other logical domains.
# shutdown -i6 -g0 -y
Note: Do not use reboot comamnd. Always use init or shutdown command so that no rc phase gets bypassed.
7.) Enable Daemons, This is the point where we have to enable our vntsd.
# svcadm enable vntsd
# svcs -a | grep -i ldom
# svcs -a | grep -i ldom
disabled       Jun_27   svc:/ldoms/agents:default
online         Jun_27   svc:/ldoms/ldmd:default
online        Jun_27   svc:/ldoms/vntsd:default
8.) Check the services running on the controller domain:
# /opt/SUNWldm/bin/ldm list-bindings primary
———————————————————————
Name: primary
State: active
Flags: transition,control,vio service
OS:
Util: 12%
Uptime: 11m
Vcpu: 4
vid pid util strand
0 0 18% 100%
1 1 13% 100%
2 2 9.8% 100%
3 3 5.4% 100%
Mau: 1
Memory: 124m
real-addr phys-addr size
0×4000000 0×4000000 124m
Vars: reboot-command=boot
IO: pci@780 (bus_a)
pci@7c0 (bus_b)
………………….
# ldm list
——————————————————————————
Notice: the LDom Manager is running in configuration mode. Configuration and
resource information is displayed for the configuration under construction;
not the current active configuration. The configuration being constructed
will only take effect after it is downloaded to the system controller and
the host is reset.
——————————————————————————
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-c–  SP      4     1024M   0.1%  5d 1h 10m
Our first controller Domain is ready for use. I will explain and create our Guest Domains in my next post and will cover the complete LDOM stuff in that. Moreover I will try to cover the release upgrade and Ldom patchings for Guest and Controller domains with backout plans.
Reference: Oracle Documentation & support.oracle.com