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
20121212
20121106
scan disks
# devfsadm
# cfgadm -al
# luxadm -e port
# luxadm -forcelip port
# luxadm -e dump_map port
# 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
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
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
CleanUp Multipath, Remove Failed Faulty Device
# for i in /sys/class/scsi_host/host*/scan
> do echo "- - -" > $i
> done
# DEV=`multipath -ll | grep failed | awk '{print $3}'`
# for i in $DEV
> do echo 1 > /sys/block/${i}/device/delete
done
> do echo "- - -" > $i
> done
# DEV=`multipath -ll | grep failed | awk '{print $3}'`
# for i in $DEV
> do echo 1 > /sys/block/${i}/device/delete
done
20120912
20120824
Create Empty Disk Image
# dd bs=8192 count=10000 if=/dev/zero of=/tmp/disk.iso
# mkfs.msdos /tmp/disk.iso
# mkfs.msdos /tmp/disk.iso
20120815
Redhat enable multipath
# yum install sysfsutils
# yum install device-mapper-multipath
# mpathconf --enable --with_multipathd y
# yum install device-mapper-multipath
# mpathconf --enable --with_multipathd y
20120814
System log filled by snmpd messages
[root@myxen ~]# tail -5 /var/log/messages
Aug 15 03:19:30 myxen snmpd[10298]: Received SNMP packet(s) from UDP: [127.0.0.1]:42695
Aug 15 03:19:45 myxen snmpd[10298]: Received SNMP packet(s) from UDP: [127.0.0.1]:40647
Aug 15 03:19:47 myxen snmpd[10298]: Received SNMP packet(s) from UDP: [127.0.0.1]:56802
Aug 15 03:20:02 myxen snmpd[10298]: Received SNMP packet(s) from UDP: [127.0.0.1]:55952
Aug 15 03:20:02 myxen snmpd[10298]: Received SNMP packet(s) from UDP: [127.0.0.1]:33076
Solution:
[root@myxen ~]# cat /etc/sysconfig/snmpd.options
# snmpd command line options
# OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"
OPTIONS="-LS 4 d -p /var/run/snmpd.pid -a"
Logging Options:
For -LF and -LS the priority specification comes before the file or facility token. The priorities recognised are:
0 or ! for LOG_EMERG,
1 or a for LOG_ALERT,
2 or c for LOG_CRIT,
3 or e for LOG_ERR,
4 or w for LOG_WARNING,
5 or n for LOG_NOTICE,
6 or i for LOG_INFO, and
7 or d for LOG_DEBUG.
-p FILE
Save the process ID of the daemon in FILE.
-a
Log the source addresses of incoming requests.
20120220
Enable SSH to HP ILO
# grep ilo /etc/inittab
ilo:2345:respawn:/sbin/agetty ttyS1 115200 vt100
# grep ttyS1 /etc/securetty
ttyS1
# kill -HUP 1
ilo:2345:respawn:/sbin/agetty ttyS1 115200 vt100
# grep ttyS1 /etc/securetty
ttyS1
# kill -HUP 1
20111125
- First find the device file.#ioscan -fnC fc Class I H/W Path Driver S/W State H/W Type Description ================================================================= fc 0 0/3/1/0 fcd CLAIMED INTERFACE HP A6826-60001 2Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 1) /dev/fcd0 fc 1 0/3/1/1 fcd CLAIMED INTERFACE HP A6826-60001 2Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 2) /dev/fcd1 fc 2 0/3/2/0 td CLAIMED INTERFACE HP Tachyon XL2 Fibre Channel Mass Storage Adapter /dev/td2
- Next use fcmsutil with that driver number to find fibre channel firmware version.#fcmsutil /dev/fcd0 vpd V I T A L P R O D U C T D A T A --------- ------------- ------- Product Description : "Dual Port 2Gbps/1Gbps Fibre Channel Universal PCI-X Adapter" Part number : "A6826-60001" Engineering Date Code : "A-4325" Part Serial number : "US00501499" Misc. Information : "PW=15W;PCI 66MHZ;PCI-X 133MHZ" Mfd. Date : "4334" Check Sum : 0xb6 EFI version : "001.30" ROM Firmware version : "003.002.168" Asset Tag : "NA"
20110902
20110714
Offending key in .ssh/known_hosts:<number>
vi .ssh/known_hostsremove the line, let say if the number is 348
:348
dd
:wq!
20110620
unable to qualify my own domain name
1) disable sendmail
OR
2) set the domain name & hostname to FQDN
make domain name permanent - use /etc/defaultdomain
3) add FQDN to /etc/hosts (next to IP)
OR
2) set the domain name & hostname to FQDN
make domain name permanent - use /etc/defaultdomain
3) add FQDN to /etc/hosts (next to IP)
20110531
ssh can be used in while or for loop
-n Redirects stdin from /dev/null (actually, prevents reading from stdin). This must be used when ssh is run in the background. A common trick is to use this to run X11 programs on a remote machine. For example, ssh -n shadows.cs.hut.fi emacs & will start an emacs on shadows.cs.hut.fi, and the X11 connection will be automatically forwarded over an encrypted channel. The ssh program will be put in the background. (This does not work if ssh needs to ask for a password or passphrase; see also the -f option.)
Subscribe to:
Posts (Atom)