10
Jun

IETD iSCSI SAN - OCFS2

   Posted by: admin   in Mẹo vặt của hiếu râu

download http://slackbuilds.org/repository/12.2/network/iscsitarget/

download src (link in iscsitarget.info)

./iscsitarget.SlackBuild

installpkg /tmp/iscsitarget-0.4.17-i486-1_SBo.tgz

vi /etc/ietd.conf

Target iqn.2001-04.com.example:storage.disk2.sys1.xyz
# Users, who can access this target. The same rules as for discovery
# users apply here.
# Leave them alone if you don’t want to use authentication.
#IncomingUser joe secret
#OutgoingUser jim 12charpasswd
# Logical Unit definition
# You must define one logical unit at least.
# Block devices, regular files, LVM, and RAID can be offered
# to the initiators as a block device.
Lun 0 Path=/dev/drbd1,Type=blockio
# Alias name for this target
Alias Test

/etc/rc.d/rc.iscsi-target start

OCFS2

download http://oss.oracle.com/projects/ocfs2-tools/files/

mkdir /etc/sysconfig

touch /sbin/chkconfig ; chmod 755 /sbin/chkconfig

rpm -ivh –nodeps ocfs2-tools-1.4.2-1.el5.i386.rpm

vi /etc/sysconfig/o2cb

O2CB_ENABLED=true
vi /etc/ocfs2/cluster.conf
node:
        ip_port = 7777
        ip_address = 10.10.50.6
        number = 0
        name = GSX-2
        cluster = ocfs2
node:
        ip_port = 7777
        ip_address = 10.10.50.5
        number = 1
        name = GSX-1
        cluster = ocfs2

cluster:
        node_count = 2
        name = ocfs2
vi /etc/init.d/o2cb
# Let’s try to use the LSB functions
. /lib/lsb/init-functions
if [ $? != 0 ]
then
echo “Unable to load LSB init functions” >&2
# exit 1
fi
/etc/init.d/o2cb configure
/etc/init.d/o2cb start
mkfs.ocfs2 -b 4k -C 32K -N 4 /dev/sdd1
mount -t ocfs2 /dev/sdd1 /mnt ( on all nodes )
/etc/init.d/o2cb status
/etc/init.d/o2cb: line 22: /lib/lsb/init-functions: No such file or directory
Unable to load LSB init functions
Driver for “configfs”: Loaded
Filesystem “configfs”: Mounted
Driver for “ocfs2_dlmfs”: Loaded
Filesystem “ocfs2_dlmfs”: Mounted
Checking O2CB cluster ocfs2: Online
Heartbeat dead threshold = 7
Network idle timeout: 10000
Network keepalive delay: 5000
Network reconnect delay: 2000
Checking O2CB heartbeat: Active
This entry was posted on Wednesday, June 10th, 2009 at 9:36 pm and is filed under Mẹo vặt của hiếu râu. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment