UnixTips.net

* use my tips at your own risk !!

* use my tips at your own risk !!

Categories

  • Other (3)
  • Scripting (10)
  • Unix (70)
  • Wordpress (2)

Powered by Genesis

Archives for March 2014

Solaris : The file just loaded does not appear to be executable.

After ufs to zfs conversion.

Rebooting with command: boot
Boot device: disk File and args: 

detached mirror

Can't mount root

Evaluating: 
The file just loaded does not appear to be executable.

To boot the system from the ok prompt this worked for me:

{3} ok boot /pci@9,600000/SUNW,qlc@2/fp@0,0/disk@1,0 -Z rpool/ROOT/Solaris10ZFS

Check the bootfs setting on the zpool

# zpool get all rpool
NAME PROPERTY VALUE SOURCE
rpool size 136G -
rpool capacity 59% -
rpool altroot - default
rpool health ONLINE -
rpool guid 14558664169034125133 -
rpool version 32 default
rpool bootfs - default <============== no bootfs specified.
rpool delegation on default
rpool autoreplace off default
rpool cachefile - default
rpool failmode continue local
rpool listsnapshots on default
rpool autoexpand off default
rpool free 55.5G -
rpool allocated 80.5G -
rpool readonly off -

To fix the issue:

zpool set bootfs=rpool/ROOT/Solaris10ZFS

Reattach the mirror:

# zpool attach rpool c1t0d0s0 c1t1d0s0

In order to boot from either disk (in the event one of the disks fail)

At the ok prompt > setenv boot-device zfsdisk1 disk0
or
In OS > eeprom boot-device=zfsdisk1,disk0

HPUX : Lun ID

Method 1 : scsimgr

# ioscan -m dsf
Persistent DSF           Legacy DSF(s)
========================================
/dev/pt/pt2              /dev/rscsi/c4t10d0
/dev/pt/pt3              /dev/rscsi/c6t9d0
/dev/pt/pt5              /dev/rscsi/c8t0d0
/dev/rdisk/disk10        /dev/rdsk/c5t0d0
                         /dev/rdsk/c7t0d0

# scsimgr get_attr -D /dev/rdisk/disk10 -a serial_number

        SCSI ATTRIBUTES FOR LUN : /dev/rdisk/disk10

name = serial_number
current = "1111150H0000"  <---- lun id is "0F0"
default = 
saved = 

Method 2 : inq for EMC devices

Lun id is :SER NUM

# inq -nodots
Inquiry utility, Version V7.3-1305 (Rev 1.0)      (SIL Version V7.3.1.0 (Edit Level 1305)
Copyright (C) by EMC Corporation, all rights reserved.
For help type inq -h.



-------------------------------------------------------------------------------
DEVICE               :VEND    :PROD            :REV   :SER NUM    :CAP(kb)     
-------------------------------------------------------------------------------
/dev/rdsk/c5t0d0     :EMC     :SYMMETRIX       :5875  :55500h0000 :        2880
/dev/rdsk/c7t0d0     :EMC     :SYMMETRIX       :5875  :55500h0000 :        2880

Script for HPUX 11.31 only : Use at your own risk !

#!/usr/bin/sh

export PATH=$PATH:/sbin:/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/local/bin

for disk in `ioscan -m dsf | grep rdisk | grep -v _p | awk '{print $1}'`
do

CDISK=`echo $disk | sed -e 's/rdisk/disk/g'`
VENDOR=`diskinfo $disk | grep vendor | awk -F: '{print $2}'`
SIZEKB=`diskinfo $disk | grep size | awk '{print $2}'`
LUNID=`scsimgr get_attr -D $disk -a wwid | grep current | awk -F= '{print $2}' | sed -e 's/\(^....*\)\(....$\)/\2/'`
SIZEGB=$(($SIZEKB/1024/1024))

echo "${disk}:${VENDOR}: ${LUNID} : ${SIZEGB}GB"

done

Windows : Remove Text Formatting When Pasting To Outlook

This was just annoying me.

I am working with a php webpage and when I copy paste into Outlook it was also copying the font and highlighting.

The fix:

  1. Select the text
  2. Ctrl + Spacebar

This is a nice link to other Outlook Shortcuts:

http://office.microsoft.com/en-us/outlook-help/keyboard-shortcuts-for-outlook-HP001230396.aspx