Formatting code for FileSystemOCFS2


show source only

{{parent page="LinuxFilesystem"}}

===OCFS2===
Get packages from if not available from repo
ocfs2 kernel package - http://oss.oracle.com/projects/ocfs2/files/
ocfs2-tools - http://oss.oracle.com/projects/ocfs2-tools/files/

==Create ocfs2 config==
Node name must match with hostname
%%(text;/etc/ocfs2/cluster.conf)
node:
ip_port = 7777
ip_address = 10.0.0.20
number = 0
name = vlinux32
cluster = ocfs2
node:
ip_port = 7777
ip_address = 10.0.0.26
number = 1
name = vlinux-i2
cluster = ocfs2
cluster:
node_count = 2
name = ocfs2
%%

==Configure cluster service==
%%
/etc/init.d/o2cb configure
%%

==Poor man's shared storage==
One can use a shared vmdk file on ESX servers as shared storage.

Configure the shared vmdk file as SCSI 1:x (OS on SCSI 0:x). An additional SCSI controller will be added. From the properties of that new SCSI controller, select "Virtual" such that the vmdk file can be shared among guests. Then you need to create a vmdk file **on the console** with the **thick** option.

On ESX, one should be able to enable that option by:
%%
vmkfstools -a lsilogic -d thick -c 250000m /vmfs/volumes/FileStore/fs/fs-home.vmdk
%%

If you are even lower on budget and ends up with an ESXi server, this will require additional work. Running concole commands on ESXi server: Go to the console of the box or put a kvm on, at the yellow screen, press ALT-F1 then enter "unsupported". You will get a password prompt where you can login with your root password. Ref: http://forum.advance.homelinux.net/index.php?topic=8172.0 will try it out tomorrow.


==Prepare the ocfs2 partition==
This should be done to a shared storage, and be done from one node only. I'm trying to see if it is possible to use VMWare's vmdk file as a shared storage. So far out of luck :(
%%
fdisk /dev/sdb
mkfs.ocfs2 /dev/sdb1
%%

==Prepare fstab==
%%
/dev/sdb1 /san ocfs2 _netdev,datavolume 0 0
%%

==Start o2cb, ocfs2==
%%
chkconfig o2cb on
chkconfig ocfs2 on
service o2cb start
service ocfs2 start
%%
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki