20140116

20140115

increase vmware disk size and resize PV

increase vdisk size (vsphere client)
echo 1 > /sys/class/scsi_device/*/device/rescan

pvresize 

20131207

Could not sign in. Please check your network connection and try again.

Key applications on Mac such as iMessage, FaceTime and even Facebook integration with Notifications depend on your Mac's Serial Number. If the System Information is showing #Serial Number, you will not be able to sign in.

To solve, search for Blank Board Serializer.

20130913

redhat disable ipv6

* /etc/sysconfig/network - add "NETWORKING_IPV6=no"
* /etc/sysctl.conf - add "net.ipv6.conf.all.disable_ipv6 = 1"

20130911

# hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso
# diskutil list
# diskutil unmountDisk /dev/diskN
# sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m
# diskutil eject /dev/diskN

20130826

Re-build Grub on Proliant

/etc/grub.conf
boot=/dev/cciss/c0d0


/boot/grub/device.map
(fd0)     /dev/fd0
(hd0)    /dev/cciss/c0d0

/sbin/grub --batch --device-map=/boot/grub/device.map \
   --config-file=/boot/grub/grub.conf --no-floppy
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

original

20130823

Issues after upgrading SuSE


  1. Permission of /root is 710 by default after upgrade
  2. Timezone may change
  3. If server is configured with kdump enabled, Kdump parameter is not preserved in /boot/grub/menu.lst

20130821

no gdm and gnome in sles 11

ensure repo is good
zypper install -t pattern x11 gnome
edit /etc/sysconfig/displaymanager and windowmanager
default_wm=gnome
default_display=gdm
check /root perm
init 5

20130719

remove ^M characters in vim

:%s/^M//g where ^M is entered by ctrl+V and ctrl+M

20130715

set vxdisk to use persistent dsf (agile)


# vxddladm set namingscheme=osn mode=new

20130611

20130605

ps process which is fuser a fs

ps -fp `fuser -m /tmp`

get total sum of filesystem usage

df -mP | awk '{sum += $3;} END {print sum;}'

20121212

ocfs2

install ocfs2 and latest version of ocfs2-tools
identify the right ocfs2 version, echo ocfs2-`uname -r`
mkdir /etc/ocfs2
cat /etc/ocfs2/cluster.conf

[root@camkh1ddevdb001 ~]# cat /etc/ocfs2/cluster.conf
cluster:
        node_count = 2
        name = bkpcvrd

node:
        ip_port = 7777
        ip_address = 10.32.37.68
        number = 0
        name = camkh1ddevdb001
        cluster = bkpcvrd

node:
        ip_port = 7777
        ip_address = 10.32.37.69
        number = 1
        name = camkh1ddevdb002
        cluster = bkpcvrd
# service o2cb configure
# mkfs.ocfs2 -L anylabel /dev/mapper/blabla
mount like normal

20121106

multipath

# stmsboot -e | -d
# mpathadm test lu
# ls /kernel/drv/s*.conf
# ls /kernel/drv/scsi*conf

scan disks

# devfsadm
# cfgadm -al
# luxadm -e port
# luxadm -forcelip port
# luxadm -e dump_map port  

20121031

Xen: Connecting and Disconnecting Device


# xm block-list domain
Vdev  BE handle state evt-ch ring-ref BE-path
768    0    0     1      -1     -1    /local/domain/0/backend/vbd/20/768
5632   0    0     1      -1     -1    /local/domain/0/backend/vbd/20/5632
# xenstore-read /local/domain/0/backend/vbd/20/5632/params
/mnt/w7.iso
# xm block-detach domain 5632 -f
# xm block-attach domain file:/path/to/device /dev/hdc r

20120917

Get WWN Redhat 6

# systool -v -c fc_host | grep port_name

requires sysfsutils pkg


update:
# /lib/udev/scsi_id --page=0x83 --whitelisted --device=/dev/sdw


modprobe: FATAL: Error inserting bonding



modprobe: FATAL: Error inserting bonding  (/lib/modules/2.6.18-194.17.1.el5/kernel/drivers/net/bonding/bonding.ko):  Unknown symbol in module, or unknown parameter 
Resolution
Within the modprobe configuration file : /etc/modprobe.conf
Change the line:
install ipv6 /bin/false
to
options ipv6 disable=1
to load the bonding module with success.

20120914

One Whole VG for an LV


#!/pathtoshell
VG=$1
LV=$2
MOUNTPOINT=$3
MPATH=0
for i in `ls /sys/class/scsi_host/host*/scan`
  do echo "- - -" > $i; done
sleep 5
multipath -ll
echo -n "enter mpath:"
read MPATH
pvcreate /dev/mapper/${MPATH}
vgcreate -s 32 $VG /dev/mapper/${MPATH}
lvcreate -l 100%VG -n $LV $VG
mkfs.ext4 /dev/mapper/${VG}-${LV}
if [ ! -d $MOUNTPOINT ]
  then mkdir $MOUNTPOINT; fi
mount /dev/mapper/${VG}-${LV} $MOUNTPOINT
echo -e \
  "/dev/mapper/${VG}-${LV}" "\t" \
  "${MOUNTPOINT}" "\t" \
  "ext4" "\t" "defaults" "\t" "1 2" \
  >> /etc/fstab