Blog posts for June 2011

Web-O-Rhythm update

Free Biorhythm Charts

Free Biorhythm charts are now available on this website from the Web-O-Rhythm page.

Web-O-Rhythm

ZFS boot disk mirror

After installing Solaris 11 Express, mirroring the "rpool" created by the installer is a Good Idea.  To do this we assume our second hard disk is the same geometry as the first, and we assume the following device names:

  • /dev/dsk/c7t0d0s0
  • /dev/dsk/c7t1d0s0

verify device names
View available block storage devices.  Check to be sure the device for current rpool is c7t0d0s0
cfgadm -s "select=type(disk)"
zpool status

configure fdisk partition
Use the -B option to create a default, single partition spanning the entire drive.  The first drive should be partitioned this way.
fdisk -B c7t1d0p0
View the partition table
fdisk -W - c7t1d0p0

configure vtoc slices
We cheat here and just copy the VTOC table (slices) from the first hard disk.  There is one for boot and one for ZFS "rpool".
prtvtoc /dev/rdsk/c7t0d0s0 | fmthard -s - /dev/rdsk/c7t1d0s0

Run format and verify two drives with same geometry show up
format

attach mirror slice
If everything looks good, attach the new slice to the existing zpool to form a mirror.  Use "zpool status" to monitor the resilvering.
zpool attach -f rpool c7t0d0s0 c7t1d0s0

grub
We need to install a grub MBR.  In case the first disk fails, we can boot from the second.
installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c7t1d0s0

Add user to Solaris root role

After creating a new UNIX account with useradd (or equivalent) in Solaris 11 Express or in OpenSolaris, one may want this new account to be able to su to root or be able to run pfexec to run commands as root.  The new account must be listed in /etc/user_attr to make this happen.

i.e.
vi /etc/user_attr

Solaris x86 fdisk

Prior to use by ZFS or even format, fdisk must be run on the x85 architecture.  With Solaris 10, fdisk is used in the traditional PC way to define a Solaris2 partition.

Solaris x86, including Solaris 11, then treat the Solaris2 fdisk partition like a whole disk.  An SMI disk label must be placed and then slices defined in the traditional Solaris manner.

A slice can then be used by ZFS for use in a pool.

In this example, we are using SATA target 4 (the fifth drive on a six disk SATA controller).  SATA targets, like SCSI targets, start counting at zero.

View existing fdisk partitions

fdisk -W - /dev/rdsk/c7t4d0p0

Interactive fdisk session

fdisk /dev/rdsk/c7t4d0p0

Or simply use entire disk for Solaris2 partition

fdisk -B  /dev/rdsk/c7t4d0p0

Label the disk

prtvtoc /dev/rdsk/c7t4d0s0 | fmthard -s - /dev/rdsk/c7t4d0s0

Run format and define slice zero for use by ZFS

Tags:
Created by Administrator on 07/09/2013
    
This website content is not licensed to you. All rights reserved.
XWiki Enterprise 9.11.1 - Documentation