0% found this document useful (0 votes)
229 views5 pages

Installing The OCFS File System

The document discusses configuring an OCFS2 file system on a Linux system. It describes creating a logical volume on a partition, installing OCFS2 software packages, configuring the OCFS2 cluster daemon (o2cb), adding nodes to the cluster, formatting the logical volume with OCFS2, and mounting the OCFS2 file system.

Uploaded by

Ajay Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
229 views5 pages

Installing The OCFS File System

The document discusses configuring an OCFS2 file system on a Linux system. It describes creating a logical volume on a partition, installing OCFS2 software packages, configuring the OCFS2 cluster daemon (o2cb), adding nodes to the cluster, formatting the logical volume with OCFS2, and mounting the OCFS2 file system.

Uploaded by

Ajay Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

 Installing the OCFS file system binaries

Create /dev/sda3 lv
Fdisk /dev/sda3
Command (m for help): n

Command action

e extended

p primary partition (1-4)

Partition number (1-4): 3

First cylinder (5222-7832, default 5222):

Using default value 5222

Last cylinder, +cylinders or +size{K,M,G} (5222-7832, default 7832): +10G

Command (m for help): t

Partition number (1-4): 3

Hex code (type L to list codes): 8e

Changed system type of partition 3 to 8e (Linux LVM)

Command (m for help): p

Disk /dev/sda: 64.4 GB, 64424509440 bytes

255 heads, 63 sectors/track, 7832 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x0007047e

Device Boot Start End Blocks Id System


/dev/sda1 * 1 64 512000 83 Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2 64 5222 41430016 8e Linux LVM

/dev/sda3 5222 6527 10485087+ 8e Linux LVM

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table. The new table will be used at

the next reboot or after you run partprobe(8) or kpartx(8)

Syncing disks.

[root@node1 ~]# vgcreate vg_oracle7 /dev/sda3

Physical volume "/dev/sda3" successfully created

Volume group "vg_oracle7" successfully created

[root@node1 ~]# lvcreate --name lv_drbd --extents 2559 vg_oracle7

Logical volume "lv_drbd" created.

[root@node1 ~]# lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

sr0 11:0 1 3.7G 0 rom

sda 8:0 0 60G 0 disk

├─sda1 8:1 0 500M 0 part /boot

├─sda2 8:2 0 39.5G 0 part

│ ├─vg_node1-lv_root (dm-0) 253:0 0 37.6G 0 lvm /

│ └─vg_node1-lv_swap (dm-1) 253:1 0 2G 0 lvm [SWAP]

└─sda3 8:3 0 10G 0 part


└─vg_oracle7-lv_drbd (dm-2) 253:2 0 10G 0 lvm

You can remove the VG now.


# vgremove vg_oracle7

[root@node1~]#
wget http://shapeblue.s3.amazonaws.com/ocfs2-kmod-1.5.0-1.el6.x86_64.rpm

rpm -i ocfs2-kmod-1.5.0-1.el6.x86_64.rpm

cp -Rpv /lib/modules/2.6.32-71.el6.x86_64/extra/ocfs2/ /lib/modules/2.6.32-754.el6.x86_64/extra/ocfs2

depmod -a

cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-ol6.repo

cd /etc/pki/rpm-gpg/
wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle-ol6

yum install -y ocfs2-tools

sed -i "/online \"\$1\"/a\/sbin\/modprobe \-f ocfs2\nmount\-a" /etc/init.d/o2cb

cd /etc/ocfs2/
vim cluster.conf

o2cb cluster-status
output: offline

o2cb add-cluster tclust

o2cb list-cluster tclust

output:

cluster:
node_count = 0
heartbeat_mode = local
name = tclust

o2cb add-node tclust node1.abc.com –ip 192.168.0.60

o2cb add-node tclust node2.abc.com –ip 192.168.0.70

o2cb list-cluster tclust

output:

heartbeat:
region = 8BE187A3EA304C77B52686E96F8CD289

cluster = tclust

node:

number = 0

name = node1.jkpoltel.com

ip_address = 192.168.0.60

ip_port = 7777

cluster = ocfs2

node:

number = 1

name = node2.jkpoltel.com

ip_address = 192.168.0.70

ip_port = 7777

cluster = ocfs2

cluster:

node_count = 2

heartbeat_mode = local

name = tclust

o2cb add-heartbeat tclust /dev/sda3

/etc/init.d/o2cb configure or service o2cb configure


Load O2CB driver on boot (y/n) [y]: y

Cluster stack backing O2CB [o2cb]: ENTER


Cluster to start on boot (Enter "none" to clear) [ocfs2]: ENTER
Specify heartbeat dead threshold (=7) [31]: ENTER
Specify network idle timeout in ms (=5000) [30000]: ENTER
Specify network keepalive delay in ms (=1000) [2000]: ENTER
Specify network reconnect delay in ms (=2000) [2000]: ENTER

mkdir –p /san/primary/

mkfs.ocfs2 -L OCFS2_label -T vmstore --fs-feature-level=max-compat /dev/sda3

update /etc/fstab and add the at bottom

/dev/sda3 /san/primary ocfs2 rw,noatime,nodiratime,_netdev 0 0


mount –a

rm /etc/udev/rules.d/70-persistent-net.rules

You might also like