Linux for SPARC Boot Issue

I am running an Oracle Linux for SPARC ldom and had a couple boot issues recently. This may help getting past boot issues.

First issue was because I had a cdrom attached to the ldom and that path was not valid. Like unmounted NFS path for example. That caused a kernel dump and per the development list they will take this as a bug and fix in a future update. The workaround of course was simple once I figured out what was choking. Just remove invalid disk attachment.

The second issue was much more tricky and not until I spotted some selinux message on kernel panics did I realize some recent change I made with selinux profiles must have caused a missing config. The fix is to disable selinux but that was not as easy as I thought. Here is what I did and it may help someone else trying to pass kernel bootup parameters.
1. disable auto-boot

# ldm set-var auto-boot\?=false linuxsparc_ldom

2. Get into the boot prompt. This was the tricky part because the linux kernel started booting as soon as I type boot or boot disk. Plus either I did not have enough time before Silo boots the kernel or it is having an issue with normal Esc or Shift keystrokes to pause bootup. I am not sure but it kept booting whatever keystrokes I tried. What I ended up doing is using “-s”. I did “boot -s” which in normal SPARC world means it will boot the kernel in single user mode. I did not really expect openboot to pass single user to linux kernel boot but at least it stops then at boot prompt.

{0} ok boot disk -s
Boot device: /virtual-devices@100/channel-devices@200/disk@0  File and args: -s
SILO Version 1.4.14 - Rel: 4.0.18.el6
\
Welcome to Linux for SPARC!
Hit <TAB> for boot options
Your imagename `-s' and arguments `' have either wrong syntax,
or describe a label which is not present in silo.conf
Type `help' at the boot: prompt if you need it and then try again.
boot: 
4.1.12-32.el6uek.sparc64  linux-uek                

3. Now boot the linux kernel with selinux=0

boot: 4.1.12-32.el6uek.sparc64 selinux=0
Allocated 64 Megs of memory at 0x40000000 for kernel
Loaded kernel version 4.1.12
Loading initial ramdisk (25972306 bytes at 0

Expanding a Solaris RPOOL

For reference I have a couple older articles on this topic here:

Growing a Solaris LDOM rpool

ZFS Grow rpool disk

Specifically this article is what I did recently on a SPARC LDOM to expand the RPOOL. The RPOOL OS disk is a SAN shared LUN in this case.

After growing the LUN to 50G on the back-end I did the following. You may have to try more than once. For me it did not work at first and I don’t know the sequence but I tried a combination of reboot, zpool status, label and verify and it worked. And yes I did say zpool status. I have had issues with upgrades in the past where beadm did not activate a new environment and zpool status resolved it.

Also you will notice my boot partition was already an EFI label. I don’t recall where but somewhere along the lines in Solaris 11.1 EFI labels became possible. If you have a SMI label you may have to try a different approach. And as always tinkering with partitions and disk labels is dangerous so you are warned.

# zpool list
NAME    SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
app    49.8G  12.9G  36.9G  25%  1.00x  ONLINE  -
rpool  29.8G  27.6G  2.13G  92%  1.00x  ONLINE  -

# format -e
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c1d0 <SUN-ZFS Storage 7330-1.0-50.00GB>
          /virtual-devices@100/channel-devices@200/disk@0
       1. c1d1 <Unknown-Unknown-0001-50.00GB>
          /virtual-devices@100/channel-devices@200/disk@1
Specify disk (enter its number): 0
selecting c1d0
[disk formatted]
/dev/dsk/c1d0s0 is part of active ZFS pool rpool. Please see zpool(1M).

[..]

format> verify

Volume name = <        >
ascii name  = <SUN-ZFS Storage 7330-1.0-50.00GB>
bytes/sector    =  512
sectors = 104857599
accessible sectors = 104857566
Part      Tag    Flag     First Sector         Size         Last Sector
  0        usr    wm               256       49.99GB          104841182
  1 unassigned    wm                 0           0               0
  2 unassigned    wm                 0           0               0
  3 unassigned    wm                 0           0               0
  4 unassigned    wm                 0           0               0
  5 unassigned    wm                 0           0               0
  6 unassigned    wm                 0           0               0
  7 unassigned    wm                 0           0               0
  8   reserved    wm         104841183        8.00MB          104857566

[..]

format> label
[0] SMI Label
[1] EFI Label
Specify Label type[1]:
Ready to label disk, continue? y

format> q

# zpool list
NAME    SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
app    49.8G  12.9G  36.9G  25%  1.00x  ONLINE  -
rpool  29.8G  27.6G  2.13G  92%  1.00x  ONLINE  -

# zpool set autoexpand=on rpool

# zpool list
NAME    SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
app    49.8G  12.9G  36.9G  25%  1.00x  ONLINE  -
rpool  49.8G  27.6G  22.1G  55%  1.00x  ONLINE  -

Live Migrate Oracle VM for SPARC Logical Domains

Short version of live migration between two T5-2’s.  Using shared fiber LUN’s.

Source Host:

Check running status:

# ldm ls | grep test10
test10           active     -n----  5002    8     8G       0.0%  0.0%  1m

Dry run first:

# ldm migrate-domain -n test10 10.2.10.12
Target Password:
Invalid shutdown-group: 0
Failed to recreate domain on target machine
Domain Migration of LDom test10 would fail if attempted

We have a couple issues.

# ldm set-domain shutdown-group=15 test10

# ldm migrate-domain -n test10 10.2.10.12
Target Password:
Failed to find required volume test10-disk0@primary-vds0 on target machine
Domain Migration of LDom test10 would fail if attempted

# ldm ls-bindings primary | grep test10
test10@primary-vcc          5002   on
vnet1@test10                00:14:4f:fa:17:4f 1913                      1500
test10-disk0                                   /dev/dsk/c0t600144F09D7311B5000054789ED30002d0s2
disk0@test10                test10-disk0

Target Host:
Fix the virtual device reference.

# ldm add-vdsdev /dev/dsk/c0t600144F09D7311B5000054789ED30002d0s2 test10-disk0@primary-vds0

# ldm migrate-domain -n test10 10.2.10.12

Check status on target.  I suggest also running a ping during the whole process.

# ldm ls | grep test10 test10           bound      -----t  5018    8     8G
# ldm ls | grep test10 test10           active     -n----  5018    8     8G       0.1%  0.1%  7m