Posts Tagged ‘solaris’

How To Add-Remove Vdisk From Guest LDOMS

September 8th, 2019, posted in Solaris
Share

I’ll share the simple steps needed to add and remove a virtual disk in a running domain without any outage.
This is a system running Oracle VM Server for SPARC 3.1 with a Solaris 11.1 guest domain named ldom0.
I used NFS storage because it is easy to set up and lets me use live migration.

 

Adding a virtual disk to a running domain

The entire sequence of commands in the control domain defines, adds and removes a disk while the guest domain runs:

# mkfile -n 20g  /ldomsnfs/ldom0/disk1.img       # 1. create a disk image file
# ldm add-vdsdev /ldomsnfs/ldom0/disk1.img vol01@primary-vds0 # 2. define vdisk
# ldm add-vdisk vdisk01 vol01@primary-vds0 ldom0 # 3. add disk to the domain
# ldm rm-vdisk vdisk01 ldom0                     # 4. take it away from the domain.
# ldm rm-vdsdev vol01@primary-vds0               # 5. undefine the virtual disk
# rm disk1.img                                   # 6. save a little space.

That’s all there is to it. The new disk is available for the domain’s use after step 3 until I take it away in step 4.

 

Viewing reconfiguration from within the guest

Let’s take a look from the guest domain’s perspective.
In the guest, you can see one disk before adding more (before command 3, above) via the formatcommand:

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c3d1 
          /virtual-devices@100/channel-devices@200/disk@1
Specify disk (enter its number): ^C

There’s one disk until ldm add-vdisk is issued in the control domain.
That results in a dynamic reconfiguration event that can be seen, if you are curious, by entering dmesg within the guest:

# dmesg|tail
...snip...
Nov 20 12:03:23 ldom0 vdc: [ID 625787 kern.info] vdisk@0 is online using ldc@16,0
Nov 20 12:03:23 ldom0 cnex: [ID 799930 kern.info] channel-device: vdc0
Nov 20 12:03:23 ldom0 genunix: [ID 936769 kern.info] vdc0 is /virtual-devices@100/channel-devices@200/disk@0
Nov 20 12:03:23 ldom0 genunix: [ID 408114 kern.info] /virtual-devices@100/channel-devices@200/disk@0 (vdc0) online

You can see the added disk using format and then use it. In this case I created a temporary ZFS pool.

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c3d0 
          /virtual-devices@100/channel-devices@200/disk@0
       1. c3d1 
          /virtual-devices@100/channel-devices@200/disk@1
Specify disk (enter its number): ^C
# zpool create temp c3d0
# zpool list
NAME    SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
rpool  19.9G  5.27G  14.6G  26%  1.00x  ONLINE  -
temp   19.9G   112K  19.9G   0%  1.00x  ONLINE  -

At this point I can just go ahead and use the added disk space. I could have done other things like add it to the existing ZFS pool
to make it a mirror, but this illustrates the point.

 

What happens if I try to remove an in-use disk

It could be very damaging to remove a virtual device while it is in use, so the default behavior
is that Solaris tells logical domains manager that the device is in use and cannot be removed.
That’s a very important advantage of Oracle VM Server for SPARC: the logical domains framework and Solaris work cooperatively,
in this and many other aspects.

In this case, we’re prevented from yanking a disk while it is in use.
If I try to remove the disk while it’s in use, I get an error message – exactly what you want:

# ldm rm-vdisk vdisk01 ldom0
Dynamic reconfiguration of the virtual device on domain ldom0
failed with error code (-122).
The OS on domain ldom0 did not report a reason for the failure.
Check the logs on that OS instance for any further information.
Failed to remove vdisk instance

The reason is “because it’s in use!” 🙂 An administrator would log into the guest to see what file systems are mounted.
This behavior can be overridden using the “-f” option if you are certain
you know what you’re doing.

Removing the disk

I issued zpool destroy temp in the guest and repeated the ldm rm-vdsdev and it worked.
Using zpool export temp would work just as well, and if I choose I can add that virtual disk to a different
domain and it could use zpool import temp to access data created by ldom0.
With other file systems, a regular umount would have the same effect, making it possible to remove the disk without -f.

The format command now shows only one disk again, and dmesg shows kernel messages when disk went offline:

Nov 20 12:42:10 ldom0 vdc: [ID 990228 kern.info] vdisk@0 is offline
Nov 20 12:42:10 ldom0 genunix: [ID 408114 kern.info] /virtual-devices@100/channel-devices@200/disk@0 (vdc0) offline

 

Summary

Solaris and the logical domain manager are engineered to work together in a coordinated fashion
to provide operational flexibility.
One of the values this provides is that
administrators can safely add and remove virtual devices while domains run.
This can be used for operational tasks like adding or removing disk capacity or IOPS as needed.
The same capabilities are also available for virtual network devices.

Share

Show Faulted Hardware in ILOM

August 5th, 2019, posted in Solaris
Share

in an ILOM (Integrated Lights Out Manager). On this page I will use the example of a chassis fan module error. If you follow my notes and the error clears Then you didn’t have a real issue. On the other hand, If after following my notes you can’t clear the error. Then you have a real hardware issue. You can’t clear errors if the error is still an issue.

This is how you login to the command line interface for the ILOM.

 

man@earth> ssh root@ilom


The command below is one way to show system faults. The only target you should see is shell. If you see anything other then shell it is a fault. In the example below, the ILOM shows a bad system fan. Shown as 0 (/SYS/FMO).

 

–> show /SP/faultmgmt

/SP/faultmgmt
Targets:
shell
0 (/SYS/FM0)

Properties:

Commands:
cd
show


Using the show faulty command is anther way to see the system faults. This command shows a lot more detail. If you have a support contract with Oracle, you will want to paste the output of this command into the ticket, you submit to MOS. The show faulty command can be used without any paths, which will be extra useful if are coming in from a chassis ILOM.

 

–> show faulty
Target                    | Property                   | Value
———————–+————————–+———————————
/SP/faultmgmt/0    | fru                            | /SYS/FM0
/SP/faultmgmt/0/   | class                         | fault.chassis.device.fan.fail
faults/0                  |                                  |
/SP/faultmgmt/0/   | sunw-msg-id            | SPX86-8X00-33
faults/0                  |                                  |
/SP/faultmgmt/0/   | component               | /SYS/FM0
faults/0                   |                                 |
/SP/faultmgmt/0/   | uuid                          | 8692c3e4-G481-635e-f8e2-f3f215d1
faults/0                   |                                 | 13f0
/SP/faultmgmt/0/   | timestamp                | 2013-10-02/12:10:43
faults/0                   |                                 |
/SP/faultmgmt/0/   | detector                   | /SYS/FM0/ERR
faults/0                   |                                  |
/SP/faultmgmt/0/   | product_serial_number | 1203FMM107
faults/0                   |                                  |

The command below shows the event log, which will also contain the system hardware errors.

 

–> show /SP/logs/event/list


To clear the hardware fault from the logs run the command below.

 

–> show /SP/logs/event/ clear=true


Run this command to clear the fan error.

 

–> set /SYS/FM0 clear_fault_action=true

Try to clear the hardware fault. If the hardware is really having an issue, the hardware fault will come back. In about a minute or less. If you can’t clear the error and you have a support contract then this is when you summit your ticket.

If you have any questions or I missed something let me know.

Share

Segmentation Fault (core dumped)

September 4th, 2018, posted in Solaris
Share

Segmentation Fault or Segmentation Fault (core dumped)

Cause

Segmentation faults usually come from a programming error. This message is usually accompanied by a core dump, except on read-only file systems.

Action

To see which program produced a core(4) file, run either the file(1) command or the adb(1) command. The following examples show the output of the file(1) and adb(1) commands on a core file from the dtmail program.

$ file core
core: ELF 32-bit MSB core file SPARC Version 1, from `dtmail'
$ adb core
core file = core -- program `dtmail'
SIGSEGV  11: segmentation violation
^D      (use Control-d to quit the adb rogram)

 

Segmentation Fault (core dumped) or Segmentation Fault,Segmentation Fault (core dumped), Segmentation Fault,core dumped,solaris,solaris 10,Solaris Common Messages and Troubleshooting Guide,Solaris Common Messages,Troubleshooting Guide,Solaris Troubleshooting,

Segmentation Fault (core dumped) or Segmentation Fault,Segmentation Fault (core dumped), Segmentation Fault,core dumped,solaris,solaris 10,Solaris Common Messages and Troubleshooting Guide,Solaris Common Messages,Troubleshooting Guide,Solaris Troubleshooting ,

Share

How to manually mount CD-DVD-ROM in Solaris

March 3rd, 2018, posted in Solaris
Share

Add A User From The Command Line In Solaris,Add A User From The Command Line In Solaris 10,Add A User From The Command Line, In Solaris10 ,Add A User ,The Command Line In Solaris10,The Command Line In Solaris,solaris 10,

Recently while trying to build a Solaris JumpStart server, I encountered an error in reading the home-burnt DVD-ROM disk of Solaris 10 10/08.  There are many threads out on the internet that talk about the same difficulty and issue.  To circumvent the issue, I needed to manually mount the DVD-ROM.  To do this, you first need to disable the volmgmt software in Solaris.  Since I am running Solaris 10, the command is simple:

 

# svcadm disable volfs
# svcs volfs
STATE          STIME    FMRI
disabled        7:29:01 svc:/system/filesystem/volfs:default
# ps -ef |grep vol
    root 10189   936   0 07:26:10 pts/1       0:00 grep vol

 

Once that is done, you should be able to mount the DVD-ROM using the following command:

 

# mount -F hsfs -o ro /dev/sr0 /cdrom
# cd /cdrom
# ls
Copyright                    License                      boot                         platform
JDS-THIRDPARTYLICENSEREADME  Solaris_10                   installer

Once done, don’t forget to re-enable volume management.  That is done by:

 

# svcadm enable volfs
# svcs volfs
STATE          STIME    FMRI
online          8:33:21 svc:/system/filesystem/volfs:default
Share

Taking explorer on SUN machines

April 21st, 2016, posted in Linux OS
Share

If your system is a SunFire midframe server (38×0, 48×0, or 68×0 model), use this command to include data from the system console:

/opt/SUNWexplo/bin/explorer -q -e -w default,scextended

If your system uses an alom (advanced lights out manager), some additional data can be collected. Systems that use that include:
Sun Fire V210,V240,V250,V245,V440,V440R,V445 Server Netra 240,440 (AC) Server
Use this command:

# /opt/SUNWexplo/bin/explorer -q -e -w default,alomextended

 

If your system uses T1 processors (system type starts with T, and uname -a command will say architecture is sun4v), use this command:

# /opt/SUNWexplo/bin/explorer -q -e -w default,Tx000

For any other model of Sun system, use this command:

# /opt/SUNWexplo/bin/explorer -q -e

 

The -q option suppresses printing of error messages during the run.
The -e option prevents explorer from automatically sending email.
The -w scextended option collects data from the system console (sc).

If you cannot run explorer for some reason, here are the most important things to collect:

/var/adm/messages or messages.# file for the time when the crash was taken. Be sure to include any messages that occurred just before panic.

/etc/system file

output of the showrev -p command, for a list of patches on system

Detailed hardware configuration of the system. To determine which command to use, issue the command uname -m to find the system architecture type.

If it is sun4u, send the output of this command:
/usr/platform/sun4u/sbin/prtdiag -v
If it is sun4v, send the output of this command:
/usr/platform/sun4v/sbin/prtdiag -v
Output of this command:
prtconf -vp

If your system is a SunFire midframe server (38×0, 48×0, or 68×0 model), include the output of these commands to collect data from the system console:

showlogs -v
showlogs -d showboards -v showplatform -v showenvironment -v showsc -v

Link : http://ram-y.blogspot.com/2011/02/taking-explorer-on-sun-machines.html

Share