Escolar Documentos
Profissional Documentos
Cultura Documentos
What is OCFS2
Cluster stack
Versus NFS
Fewer points of failure Data consistency OCFS2 nodes have direct disk access
Higher performance
In Linux kernel Novell SLES9, SLES10 Oracle support for RAC customers
OCFS2 Uses
File Serving
FTP NFS
Switches: $3,000 - $20,000 Cards: $500 - $2,000 Cables, GBIC Hundreds of dollars Disk(s): The sky's the limit
Hardware
Refurbished from name brands (Dell, HP, IBM, etc) Large hardware stores (Fry's Electronics, etc) Online Ebay, Amazon, Newegg, etc Dual core CPUs running at 2GHz and up Gigabit network SATA, SATA II
Impressive Performance
3 node cluster for less than $1,000! One machine exports disk via network
Dedicated gigabit network for the storage At $50 each, simple to buy an extra, dedicated disk Generally, this node cannot mount the shared disk
Can be routed Support for authentication, many enterprise features iSCSI server Can run on any disks, regular files Kernel / User space components iSCSI client
iqn.YYYY-MM.com.example:disk.name Lun definitions describe disks to export fileio type for normal disks Special nullio type for testing
Add discovery address Log into target When done, log out of target
$ iscsiadm -m discovery --type sendtargets portal examplehost [cbb01c] 192.168.1.6:3260,1 iqn.2006-08.com.example:lab.exports $ iscsiadm -m node --record cbb01c -login
$ iscsiadm -m node --record cbb01c -logout
Easiest option
Supported by Novell/Suse OCFS2 also integrated with Linux-HA software Demo on Wednesday
Very easy to set up auto configuration via Ethernet broadcast Not routable, no authentication
Very small, user space daemon Buffered I/O against a device or file
Stock performance is not very high vbladed <shelf> <slot> <ethn> <device>
Aoetools package
OCFS2
1.2 tree
Shipped with SLES9/SLES10 RPMS for other distributions available online Builds against many kernels Feature freeze, bug fix only Active development tree Included in Linux kernel Bug fixes and features go to -mm first.
1.3 tree
OCFS2 Tools
mkfs.ocfs2, mount.ocfs2, fsck.ocfs2, etc Cluster aware o2cb to start/stop/configure cluster Work with both OCFS2 trees Can create entire cluster configuration Can distribute configuration to all nodes
OCFS2 Configuration
/etc/ocfs2/cluster.conf
$ /etc/init.d/o2cb online <cluster name> Loading module "configfs": OK Mounting configfs filesystem at /sys/kernel/config: OK Loading module "ocfs2_nodemanager": OK Loading module "ocfs2_dlm": OK Loading module "ocfs2_dlmfs": OK Mounting ocfs2_dlmfs filesystem at /dlm: OK Starting O2CB cluster ocfs2: OK
Sample cluster.conf
node: ip_port = 7777 ip_address = 192.168.1.7 number = 0 name = keevan cluster = ocfs2 node: ip_port = 7777 ip_address = 192.168.1.2 number = 1 name = opaka cluster = ocfs2 cluster: node_count = 2 name = ocfs2
May result in node reboots for lower performance clusters Timeout must be same on all nodes Increase O2CB_HEARTBEAT_THRESHOLD value in /etc/sysconfig/o2cb
OCFS2 Tools 1.2.3 release will add this to the configuration script.
mkfs.ocfs2 -T filesystem-type
Keep directory sizes small to medium Read only access is not a problem Try to keep writes local to a node
Each node has it's own directory Each node has it's own logfile
Allows you to fine tune mkfs options depending on file system target usage
References