OCFS2はOracle Cluster File Systemの名前の通りOracleのRACなどで使用されているファイルシステムのOpenSourceです。
以下は、最小限のセットアップ手順として1ノードで確認するものです。
[bash]
$ sudo apt-get install ocfs2-tools
$ dpkg -l ocfs2-tools
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii ocfs2-tools 1.6.4-1ubunt amd64 tools for managing OCFS2 cluster
$ sudo vi /etc/default/o2cb
O2CB_ENABLED=true
$ hostname
iscsi-client-01
$ sudo vi /etc/ocfs2/cluster.conf
node:
name = iscsi-client-01
cluster = ocfs2
number = 0
ip_address = 127.0.0.1
ip_port = 7777
cluster:
name = ocfs2
node_count = 1
$ sudo service o2cb restart
Loading filesystem "configfs": OK
Mounting configfs filesystem at /sys/kernel/config: OK
Loading stack plugin "o2cb": OK
Loading filesystem "ocfs2_dlmfs": OK
Mounting ocfs2_dlmfs filesystem at /dlm: OK
Setting cluster stack "o2cb": OK
Starting O2CB cluster ocfs2: Failed
Cluster ocfs2 created
o2cb_ctl: Internal logic failure while adding node iSCSI-Client
Stopping O2CB cluster ocfs2: OK
$ sudo mkdir /mnt/ocfs2
$ sudo mkfs.ocfs2 /dev/sda
$ sudo mount -t ocfs2 /dev/sda /mnt/ocfs2/
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/localhost-root 13123096 1095308 11361164 9% /
udev 242108 4 242104 1% /dev
tmpfs 100648 276 100372 1% /run
none 5120 0 5120 0% /run/lock
none 251620 0 251620 0% /run/shm
none 102400 0 102400 0% /run/user
/dev/vda1 233191 29081 191669 14% /boot
/dev/sda 104857600 2237704 102619896 3% /mnt/ocfs2
[/bash]