How to get all the zfs kernel parameters

November 16th, 2010 | by | opensolaris, solaris, sun

Nov
16

Here is how to get all get zfs kernel parameters

root@kyuss:~# echo "::zfs_params" | mdb -k
arc_reduce_dnlc_percent = 0x3
zfs_arc_max = 0x0
zfs_arc_min = 0x0
arc_shrink_shift = 0x5
zfs_mdcomp_disable = 0x0
zfs_prefetch_disable = 0x0
zfetch_max_streams = 0x8
zfetch_min_sec_reap = 0x2
zfetch_block_cap = 0x100
zfetch_array_rd_sz = 0x100000
zfs_default_bs = 0x9
zfs_default_ibs = 0xe
metaslab_aliquot = 0x80000
mdb: variable reference_tracking_enable not found: unknown symbol name
mdb: variable reference_history not found: unknown symbol name
spa_max_replication_override = 0x3
spa_mode_global = 0x3
zfs_flags = 0x0
mdb: variable zfs_txg_synctime not found: unknown symbol name
zfs_txg_timeout = 0x5
zfs_write_limit_min = 0x2000000
zfs_write_limit_max = 0x3fde5800
zfs_write_limit_shift = 0x3
zfs_write_limit_override = 0x0
zfs_no_write_throttle = 0x0
zfs_vdev_cache_max = 0x4000
zfs_vdev_cache_size = 0xa00000
zfs_vdev_cache_bshift = 0x10
vdev_mirror_shift = 0x15
zfs_vdev_max_pending = 0xa
zfs_vdev_min_pending = 0x4
zfs_scrub_limit = 0xa
zfs_no_scrub_io = 0x0
zfs_no_scrub_prefetch = 0x0
zfs_vdev_time_shift = 0x6
zfs_vdev_ramp_rate = 0x2
zfs_vdev_aggregation_limit = 0x20000
fzap_default_block_shift = 0xe
zfs_immediate_write_sz = 0x8000
zfs_read_chunk_size = 0x100000
zfs_nocacheflush = 0x0
zil_replay_disable = 0x0
metaslab_gang_bang = 0x20001
metaslab_df_alloc_threshold = 0x20000
metaslab_df_free_pct = 0x4
zio_injection_enabled = 0x0
zvol_immediate_write_sz = 0x8000

1 Comment »

Solaris corrupted the boot_archive after appling kernel patch on sun4v

October 13th, 2009 | by | solaris

Oct
13

Found this bug after appling the patch 141414-10 on a T5220.  It is a standard practice to apply the JASS toolkit on the system. By default JASS restrict /tmp to 512mb. This can cause problems on sun4v machines, because bootadm will fail to create the boot_archive, making the server unbootable.

To recover this problem you can check my post about recover Solaris under SVM.

No Comments »

Recover boot_archive with Solaris Volume Manager

October 13th, 2009 | by | solaris

Oct
13

After booting in failsafe mode, Solaris wan’t mount automaticly your root filesystem. Sun recommend to break the mirror and boot directly on one side of the mirror.

If found this method can cause more problems then solving the initial problem. For that reason, I found it easier to mount the meta directly.

Here is the steps you should perform:

  • Boot in failsafe mode if you are using a new-boot kernel: boot -F failsafe
  • Mount one side of the mirror in read-only: mount -o ro /dev/dsk/c0t0d0s0 /a
  • Copy the file /a/kernel/drv/md.conf to /kernel/drv/md.conf
  • Reload the kernel module: update_drv -f md
  • Initialize SVM: metainit -r
  • Re-sync the mirror if needed: metasync -r
  • fsck the meta if you want
  • Mount the meta: mount /dev/md/dsk/d0 /a
  • Update the boot archive: bootadm update-archive -R /a
  • Umount the root filesystem
  • Reboot

Here is an example session:

Executing last command: boot -F failsafe
Boot device: /pci@1f,0/pci@1/scsi@8/disk@1,0:a  File and args: -F failsafe
SunOS Release 5.10 Version Generic_141444-09 64-bit
Copyright 1983-2009 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Configuring devices.
Searching for installed OS instances...
/dev/dsk/c0t0d0s0 is under md control, skipping.
To manually recover the boot archive on a root mirror, please refer
to procedure written in this section of the Solaris Administration Guide.
        How to Manually Update the Boot Archive on a RAID-1 (Mirror) Volume
The section is located at URL :

http://docs.sun.com/app/docs/doc/817-1985/ghgnq?a=view

SUNW,eri0 : 100 Mbps full duplex link up
SUNW,eri1 : 100 Mbps full duplex link up
/dev/dsk/c0t1d0s0 is under md control, skipping.
To manually recover the boot archive on a root mirror, please refer
to procedure written in this section of the Solaris Administration Guide.
        How to Manually Update the Boot Archive on a RAID-1 (Mirror) Volume
The section is located at URL :

http://docs.sun.com/app/docs/doc/817-1985/ghgnq?a=view

No installed OS instance found.

Starting shell.
# mount -o ro /dev/dsk/c0t0d0s0 /a
# cp /a/kernel/drv/md.conf /kernel/drv/md.conf
# umount /a
# update_drv -f md
devfsadm: mkdir failed for /dev 0x1ed: Read-only file system
# metainit -r
# metastat -c
d5               m  2.8GB d25 (maint) d15 (maint)
    d25          s  2.8GB c0t1d0s5
    d15          s  2.8GB c0t0d0s5
d4               m  3.0GB d24 (maint) d14 (maint)
    d24          s  3.0GB c0t1d0s4
    d14          s  3.0GB c0t0d0s4
d1               m  2.0GB d21 (maint) d11 (maint)
    d21          s  2.0GB c0t1d0s1
    d11          s  2.0GB c0t0d0s1
d0               m  9.0GB d20 (maint) d10 (maint)
    d20          s  9.0GB c0t1d0s0
    d10          s  9.0GB c0t0d0s0
# metasync -r
# metastat -c
d5               m  2.8GB d25 d15
    d25          s  2.8GB c0t1d0s5
    d15          s  2.8GB c0t0d0s5
d4               m  3.0GB d24 d14
    d24          s  3.0GB c0t1d0s4
    d14          s  3.0GB c0t0d0s4
d1               m  2.0GB d21 d11
    d21          s  2.0GB c0t1d0s1
    d11          s  2.0GB c0t0d0s1
d0               m  9.0GB d20 d10
    d20          s  9.0GB c0t1d0s0
    d10          s  9.0GB c0t0d0s0
# fsck /dev/md/rdsk/d0
** /dev/md/rdsk/d0
** Last Mounted on /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3a - Check Connectivity
** Phase 3b - Verify Shadows/ACLs
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cylinder Groups
74831 files, 2955971 used, 6329329 free (3377 frags, 790744 blocks, 0.0% fragmentation)
# mount /dev/md/dsk/d0 /a
# bootadm update-archive -R /a
Creating boot_archive for /a
updating /a/platform/sun4u/boot_archive
15+0 records in
15+0 records out
# umount /a
# init 6

The system is being restarted.
# syncing file systems... done
rebooting...

12 Comments »

FCoE on OpenSolaris: First try

September 9th, 2008 | by | solaris

Sep
09

Ok I tried for the first time to setup FCoE. You need at least OpenSolaris b93 for the initialtor and the target to work.  Good because I did not upgrade my OpenSolaris box to b97 yet. After downloading the packages at http://opensolaris.org/os/project/fcoe/, I remove the packages that I needed to installed:

# pkgrm SUNWfcp SUNWfcprt SUNWfcsm SUNWfctl SUNWstmf SUNWstmfu

Then I installed the new packages:

# pkgadd -d . SUNWfcip SUNWfcoe SUNWfcoei SUNWfcoet SUNWfcp SUNWfcprt SUNWfcsm SUNWfctl SUNWstmf SUNWstmfu

On the target you need to create a new lun with comstar:

# zfs create rpool/comstart

# zfs  -V 2g create rpool/comstar/lun0

# sbdadm create-lu /dev/zvol/dsk/rpool/comstar/lun0

# sbdadm list-lu

Found 1 LU(s)

GUID                    DATA SIZE           SOURCE
——————————–  ——————-  —————-
600144f016000000000048c2ed710001      2147418112       /dev/zvol/dsk/rpool/comstar/lun0

# stmfadm  add-view 600144f016000000000048c2ed710001

# fcadm create-fcoet-port -f bge

# fcadm   hba-port
HBA Port WWN: 0100001d09f22101
Port Mode: Target
Port ID: ea
OS Device Name: Not Applicable
Manufacturer: Sun Microsystems, Inc.
Model: FCoE Virtual FC HBA
Firmware Version: N/A
FCode/BIOS Version: N/A
Serial Number: N/A
Driver Name: COMSTAR FCOET v20080829-1.0
Driver Version: 20080829-1.0
Type: point-to-point
State: online
Supported Speeds: 1Gb 10Gb
Current Speed: not established
Node WWN: 1000001d09f221ba

Ok good it looks easy on the target. Now I need to setup the initialtor. I then try on a xVM domU to see if it works. After installing and removing the packages I try to setup the initialtor:

# fcadm create-fcoei-port -f  xnf0
Success ! Add target port xnf0

# fcadm hba-port
HBA Port WWN: ef0000163e6430ef
Port Mode: Initiator
Port ID: 0
OS Device Name: /dev/cfg/c2
Manufacturer:
Model:
Firmware Version:
FCode/BIOS Version:
Serial Number: not available
Driver Name: not available
Driver Version: not available
Type: unknown
State: offline
Supported Speeds: not established
Current Speed: not established
Node WWN: 100000163e6430b3
NPIV Not Supported

Humm does not look good. Port state offline..

Ok then, I will jumpstart my Netra X1 and try it out. Installed b97 and installed the new packages from the FCoE project. Then I tried:

# fcadm create-fcoei-port -f dmfe0
Success ! Add target port dmfe0
# Sep  9 00:02:04 netrax1 fp: WARNING: fp_attach: ins(0)
Sep  9 00:02:04 netrax1 fctl: FCA doesn’t support ulp
WARNING: prlifcoe: c8fd0012
WARNING: PRLI: 8, 1, 0

panic[cpu0]/thread=2a10014fca0: BAD TRAP: type=34 rp=2a10014f570 addr=3000133f50e mmu_fsr=0

sched: alignment error:
addr=0x3000133f50e
pid=0, pc=0x7bf099ec, sp=0x2a10014ee11, tstate=0×80001600, context=0×0
g1-g7: 0, 0, 0, 0, 0, 0, 2a10014fca0

000002a10014f290 unix:die+98 (34, 2a10014f570, 3000133f50e, 0, 10c1c00, 2a10014f350)
%l0-3: 00000000fa062008 00000000c0c00000 00000000c1e00000 00000000c0800000
%l4-7: 00000000c1800000 0000000000000000 0000000000000000 0000000000000001
000002a10014f370 unix:trap+688 (2a10014f570, 0, 80000b00000034, 80000b, 10000, 0)
%l0-3: 0000000000010000 000002a10014fca0 000000000003fe8d 0000000001835bc0
%l4-7: 0000000000000000 0000000000000000 0000000000000000 0000000000010009
000002a10014f4c0 unix:ktl0+48 (300034a29a0, 10, ffffffffffffffff, 2, 300034a29a0, 3)
%l0-3: 0000000000000001 0000000000001400 0000000080001600 000000000101b7b0
%l4-7: 0000000000000001 0000000000000000 0000000000000000 000002a10014f570
000002a10014f610 3 (3000133f506, 300021aa980, c, ffff, 17, 17)
%l0-3: 0000000000000040 00000000003c0000 0000000000000003 0000000000000800
%l4-7: 00000000000007ff 0000000000000003 000000000000003b 0000000000000000
000002a10014f6c0 fcoei:fcoei_process_sol_fcp_resp+22c (1, 0, 3, 3000133f4ee, c, 300034a2830)
%l0-3: 00000300034a29a0 0000000000000000 0000000000000000 000003000133f4ee
%l4-7: 0000000000000003 0000000000000003 00000300034a2830 0000000000000000
000002a10014f780 fcoei:fcoei_process_unsol_frame+838 (30001db5e80, 2a10014fca0, 300035af0a8, 7, 300035af0a8, 300035af0a8)
%l0-3: 00000300034a29a0 0000000000060400 0000000000000010 0000000000000000
%l4-7: 0000030001f1d000 000000007bf161c0 0000030001f1d000 000000000000fc00
000002a10014f860 fcoei:fcoei_process_events+cc (300035aefc0, 0, 300035af098, 88e50, 300035af088, 30003527ef8)
%l0-3: 000000000026dce8 00000000018bbc00 000002a10014fca0 3ffffffffbc2de80
%l4-7: 0000000000000032 0000030001db5f38 0000000000000003 00000000011fe000
000002a10014f910 fcoei:fcoei_watchdog+ac (300035aefc0, 7bf0b000, 300035af0cc, 20, 300035af098, 300035af0bc)
%l0-3: 00000300035af088 00000300035aefe8 0000000000000064 00000300035af080
%l4-7: 000000000026dce8 00000300035af0b8 00000300035af0c8 0000000000000032
000002a10014f9c0 genunix:taskq_thread+19c (300039eb6d8, 300039eb730, 10001, 17462ce080c7, 2a10014fa8a, 2a10014fa88)
%l0-3: 0000000000010000 00000300039eb70a 00000300039eb708 00000300039eb700
%l4-7: 0000030000fcd340 0000000001867800 000000000026dc00 00000300039eb6f8

syncing file systems… done
dumping to /dev/md/dsk/d1, offset 215154688, content: kernel
100% done: 12086 pages dumped, compression ratio 2.90, dump succeeded
rebooting…

Doh!! Well no luck.. Not for tonight.

No Comments »

Automatic startup of domU in OpenSolaris xVM

September 8th, 2008 | by | solaris

Sep
08

By default in xVM the domU do not start up when xend start.

You will need to dump the configuration and modify “on_xend_start ignore” to “on_xend_start start” and reload the configuration. Here is an example:

# xm list -l xvm09 | sed -e ‘s/on_xend_start ignore/on_xend_start start/’ > xvm09.cfg

# xm new -F xvm09.cfg

1 Comment »