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
nota kaki | foot note
I can't memorize much, so i take notes. Make sure you know what it does before using it. I will not be held responsible for any loss or damage that is caused by the content of this blog.
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
Labels:
solaris
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
Labels:
xen
20120917
Get WWN Redhat 6
# systool -v -c fc_host | grep port_name
requires sysfsutil pkg
update:
# /lib/udev/scsi_id --page=0x83 --whitelisted --device=/dev/sdw
requires sysfsutil 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 /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
Labels:
linux
Subscribe to:
Posts (Atom)