oracle ocfs

25
OCFS Oracle Cluster FileSystem for Linux Users Guide

Upload: omkar

Post on 04-Jun-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 1/25

OCFS

Oracle Cluster FileSystem for Linux

Users Guide

Page 2: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 2/25

Table of ContentsQ. Can I install the Oracle Distribution in an OCFS partition?....................................19

Q. My partitions don't mount automatically durin boot. !hat's "ron?....................19

Q. !hen runnin #sc$.oc#s% it returns the error &!()I)*+ non,ero bytes a#ter the dis$ header structure-. !hat does it mean?..................................................................19

Q. !hat are the most appropriate recommended/ tool IO and capacity analysis o#  OCFS?...........................................................................................................................19

Q. Can I use oc#s on a )S )et"or$ ttached Storae/ de0ice li$e )etpp?..........2

Q. Can I use 34M or MD to create my OCFS #ilesystem on top o# it?.......................2

Q.I "ant to per#orm some tests usin (C5OCFS% but I don't "ant to spend too much  money on hard"are. Do I ha0e any other solution?......................................................2

Q.!hy do I ha0e to include the option 6netde0 in the #stab on (ed7at?.....................2

Q.!hat is the best "ay to archi0e the los to an OCFS directory?..............................2

Q.Is OCFS supported on 8 bit plat#orm li$e Itanium?................................................1

Q. Can I run oc#s on non enterprise 3inu: distributions li$e (ed7at 9?......................1

Q.Do I need any speci#ic 0ersion o# ;nited 3inu: to run OCFS?................................1

Q. Can I run the latest OCFS on a plain (ed7at S .1% "ithout any errata applied?.1

Q.!hat is the ad0antae o# runnin oc#s aainst ra" de0ices?....................................1

Q.!hat happen i# I ha0e to chane the I< ddress o# my systems?............................

Q.My )et"or$ Inter#ace Card had to be replaced. Do I need to do somethin?..........

Q.I ha0e a partition that is not mounted. 7o" do I $no" i# it is an oc#s partition or  

not?................................................................................................................................

Q.Can I use my OCFS partition to store reular #iles?.................................................Q.7o" much do I lose in terms o# per#ormance compared to ra" de0ices?................

Q.7o" do I enable async I5O on Oracle usin OCFS?.................................................

Q.7o" do I bac$up my OCFS #iles? Can I use tar or other OS command?.................

Q.Is it possible to resi,e an e:istin OCFS partition?..................................................=

Q.I'm ha0in problems "ith OCFS. 7o" can I debu OCFS?.....................................=

Q.Can I run OCFS in a stand>alone system? !hat are the ad0antaes o# runnin it?..=

Q.I ha0e a database runnin on OCFS in a stand>alone node. !hy it is so slo"  

compared to other stand>alone systems runnin on e:t=?............................................=

Q.7o" can I obtain more in#ormation about OCFS?...................................................=Q.I ha0e a customi,ed (ed7at S $ernel on my system. Does Oracle support OCFS  

and the (DMS on it?..................................................................................................

Q.7o" do I $no" i# my OCFS 0ersion is o##icially supported by Oracle?..................

Q.Is OCFS is mountable on 3inu: and !indo"s 222 simultaneously?.....................

Page 3: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 3/25

Introduction.

OCFS is a shared disk cluster filesystem. The current version (version 1)

released for Linux is specifically desined to alleviate the need formanain ra! devices. "t can contain all the oracle datafiles# archive lo

files and controlfiles. "t is ho!ever not desined as a eneral purpose

filesystem.

This document descri$es the steps re%uired to install OCFS on Linux and

!ill also ive uidelines for optimi&ations and some more in depth

understandin of ho! the filesystem !orks.

Downloading OCFS.

OCFS can $e do!nloaded from 'httposs.oracle.compro*ectsocfs + forthe follo!in distri$utions ,ed-at dvanced Server /.1 and 0nited

Linux 1. (Conectiva# SuSe# Tu$oLinux and SCO). Oracle officially

supports the Oracle data$ase on OCFS if it is installed from the $inary

packaes that are availa$le for do!nload.

"f the user decides to do!nload the source code and compile it# then there

!ill $e no formal support provided $y Oracle.

"n addition to the OCFS $inaries# !e also provide a collection of utilities

(cp# dd# tar and textutils) that ena$le O23",4CT. The updated tools are

recommended to $e used as they make more efficient use of the operatin

system in con*unction !ith OCFS.5inary distri$utions for ia6/ and ia78 can $e found under each one of the

supported platforms.

There are $asically three rpm packaes to do!nload in order to install

OCFS. Those packaes are

•OCFS>Support

•OCFS>@ools

•OCFS Module

5efore do!nloadin the OCFS 9odule# make sure it is compati$le !iththe kernel version in use (uname :a).

Installing OCFS

"nstallin OCFS is an easy process. fter do!nloadin the packaes#

issue the follo!in command on the directory !here the packaes !ere

Page 4: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 4/25

do!nloaded

# rpm -Uhv ocfs*.rpm

This !ill install the support tools# the actual kernel module for the

filesystem and a raphical confiuration tool.

 Automatically mount OCFS during boot.

fter installin the OCFS packaes# verify that the module !ill $e

properly initiali&ed on startup usin the command

# chkconfig list !gr"p -i ocfs

"f the output looks like

ocfs $off %$off &$off '$on ($on )$on $off 

Then# no action is re%uired# $ut if the output doesn;t sho! 'on+ on 6#8

and < (rc levels)# issue the follo!in command to ena$le automatic

startup of the ocfs durin $oot# chkconfig ocfs on

Configuring OCFS.

OCFS depends on a node specific confiuration file. This file is named

ocfs.conf   and it is located in the  /etc  directory= it can $e enerated

automatically or manually usin the ocfstool. 3urin the next sections#

the etcocfs.conf file and $oth methods of confiurin !ill $e descri$ed in

detail. This file is needed on every node in the cluster and it is hihly

recommended to use ocfstool to confiure each node.

1.1.1 /etc/ocfs.conf file.

The etcocfs.conf file can have the follo!in parameters

ip2address > Specify the "? ddress to $e used $y the OCFS 3L9. The

server must $e a$le to reach all nodes participatin on the cluster

throuh the interface related to the "? ddress specified in this field.

ip2port > Specify the port to $e used $y the OCFS 3L9 to communicate

!ith the other nodes in the cluster. The port must $e the same on all

nodes in the cluster.

@ode2name > Specify the server hostname associated to the "? ddress

specified in the ip2address parameter.

comm2votin > Specify !hich method for votin is oin to $e used $y

OCFS. "f set to (default)# it means that OCFS !ill $e votin usin the

disk# if set to 1# it !ill $e usin the net!ork to vote. "f the OCFS is set to

use net!ork to vote and it $ecomes unavaila$le for some reason# it !ill

Page 5: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 5/25

Page 6: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 6/25

  comm_oting = 1

  guid = !"2!!!!1"$"2%&'($""000)(70$'E7%

,oading ocfs.

The etcinit.docfs startup script is provided in the packae and

automatically loads the OCFS module if there is an entry for it in

etcfsta$. 0sin this startup script is the preferred method to load OCFS

as it does all the verification $efore loadin the module and mountin the

partitions.

"f for some reason there still is a need of manually load the OCFS

module# *ust issue the command load2ocfs as root. "f the process is

successfully executed# it should sho! a messae like

# load+ocfs

 sbininsmod ocfs nod"+nam"ca-t"st&.us.oracl".com ip+addr"ss%...% ip+port/cs%0)1 guid12&1111%2C2&)3F(C22'(/CF4/) 

Using libmodul"s&.(.1-"-"nt"rpris"-A25ocfsocfs.o

Formatting an OCFS 6artition.

Similar to confiurin the OCFS# there are t!o !ays to format an OCFS

partition. One is usin the 'ocfstool + command and the A0"

environment# and the other is usin the 'mkfs.ocfs+ command from the

shell prompt. 5oth commands needs to $e executed as root .

@one of the ocfs utilities !ill partition the disk at any time. So# $efore

formattin# choose the utility of your preference and partition the disk

accordin to the needs of your implementation# and make sure the

diskpartition is not $ein used $y anythin else to avoid data loss.

ith OCFS you have to format a partition only once on one node# after

that every node !ill $e a$le to mount this filesystem. (of course the device

needs to $e visi$le on every node in the cluster)

1.1.& Format using ocfstool.

Start $y invokin the ocfstool command like descri$ed in the section

'6././ utomatic confiuration usin ocfstool+. fter ettin the ocfstool

!indo!(See illustration 7)# press either the se%uence key ECT,L:F orfrom the menu# choose TasksFormat. Fill in all #ields and clic$ the &OA- button. For more in#ormation on the parameters% chec$ the format item under

ocfstool  section.

Page 7: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 7/25

1.1.' Format using m(fs.ocfs.

For people !ho do not have a A0" availa$le# use mkfs.ocfs. "f a A0" is

availa$le# the preferred method to format an OCFS partition is to use the

ocfstool . The mkfs.ocfs command has the follo!in syntax# mkfs.ocfs

usag"$ mkfs.ocfs -b block-si7" 8-C9 8-F9 8-g gid9 8-h9 -, volum"-lab"l 

  -m mount-path 8-n9 8-p p"rmissions9 8-:9 8-u uid9 8-;9 d"vic"

  -b 2lock si7" in kilo byt"s

  -C Cl"ar all data blocks

  -F Forc" format "<isting OCFS volum"

  -g =53 for th" root dir"ctory 

  -h >"lp

  -, ;olum" lab"l 

  -m 6ath ?h"r" this d"vic" ?ill b" mount"d 

  -n @u"ry only 

  -p 6"rmissions for th" root dir"ctory 

  -: @ui"t "<"cution

  -u U53 for th" root dir"ctory 

  -; 6rint v"rsion and "<it 

hen usin the mkfs.ocfs  command# the user has to provide all the

information that is prompt $y the ocfstool  utility.

The usae of the ':C+ arument !ill force the mkfs.ocfs  to clear all

$locks. 3ependin on the si&e of the partition# it may $e a lon process.

The ':F+ arument should $e used only if the partition !as previously

formatted as an OCFS.

The ':$+ arument specify the $locksi&e that the partition !ill $e

formatted. The $locksi&e specifies the maximum si&e of the partition that

can $e mounted. "t oes from 8k to 19 and allo!s volumes from 6/A$ up

to GT$. Format !ith 1/Gk$ $locksi&e is optimal si&e. Si&es $et!een 8k$

and 1m$ are supported. The smaller $locksi&es !ill have a performancepenalty# $ut !ill $e useful for the future !hen !e !ill support reular

files. 1/Gk$ $locksi&e means that every file created !ith content uses up a

minimum of 1/Gk$ space on disk. 4ven if there is only 1 $yte of data in

the file. The filesystem !ill allocate chunks of space in E$locksi&e

chunks.

Page 8: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 8/25

The example $elo! sho! an ordinary partition $ein formatted and its

output.

# mkfs.ocfs -F -b %&0 -g dba -u oracl" -, u% -m u% - p //) d"vsdb%

Ch"cking h"art b"at on volum" ..........

Cl"aring volum" h"ad"r s"ctors...Cl"ar"d volum" h"ad"r s"ctors

Cl"aring nod" config s"ctors...Cl"ar"d nod" config s"ctors

Cl"aring publish s"ctors...Cl"ar"d publish s"ctors

Cl"aring vot" s"ctors...Cl"ar"d vot" s"ctors

Cl"aring bitmap s"ctors...Cl"ar"d bitmap s"ctors

Cl"aring data block...Cl"ar"d data block

riting volum" h"ad"r...rot" volum" h"ad"r

#

Bount OCFS partitions.

1.1.) $ounting manually.

t least for the first time# it is ood to have the partitions mounted

manually instead of automatically. That;s $ecause the user has control

over all the process and can check if everythin !orks fine.

To mount the ne! OCFS partition# use the mount  command !ith the ':t+

arument specifyin 'ocfs+ in front of it. The example $elo! sho!s ho!

an OCFS partition is mounted

# mount -t ocfs d"vsdb% u%

1.1.* $ounting automatically

To mount the OCFS partitions automatically# *ust add the partition

information to the  /etc/fstab file. The example $elo! sho! an entry for

,ed-at S /.1.

 d"vsdb% u% ocfs +n"td"v 

 d"vsdd% u& ocfs +n"td"v 

Tools

ocfstool 

ocfstool  is a A0" frontend for manain and de$uin OCFS volumes on

the system= and also the preferred method for manain OCFS. One can

Page 9: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 9/25

mount and unmount volumes# format partitions# vie! information and

individual files# see the current node map% and bloc$ bitmap.

#ter startin the tool you are presented "ith a "indo" consistin o#

sections or sements.

@he top portion maps all $no"n partitions that are OCFS #ormatted and allo"users to mount and unmount these partitions. @he mount operation "ill try to

mount the #ilesystem to the mountpoint speci#ied durin the #ormat operation.

3i$e any other #ilesystem the umount operation "ill only succeed i# there isno process usin it.

@he bottom portion has a series o# #olders that are di0ided by areas o#

manaement and bro"sin. It "ill sho" the in#ormation related to the de0ice

selected in the top portion o# the screen.

@he in#ormation that can be obtained is di0ided in +

Aeneral B Contain eneral in#ormation about the #ilesystem See "llustration

1/. 3i$e oc#s 0ersion that #ormatted the de0ice% mountpoint% si,e o# the#ilesystem% number o# e:tents% userid and roupid "ith pri0ilees on the#ilesystem and the appropriate permission.

File Listin  B !ill sho" #ile in#ormation about the #ilesystem See

"llustration //. Selectin a #ile or directory% one can see its in#ormation% li$e

si,e% allocation unit% o"nership and protection. One can also see "hich nodesha0e the partition mounted at that speci#ic point in time.

Confiured @odes  B On this #older% one can see "hich nodes ha0e the

selected partition See "llustration 6/.

5itmap Hie! B On this #older% one can see the bitmap allocation #or the

selected partition See "llustration 8/.

Free Space B On this #older% one can see a list o# #ree space #or the selected partition See Illustration ). This list !ill sho! the si&e and the $itI of the

free space.

Page 10: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 10/25

 Illustration 1

 Illustration 2

Page 11: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 11/25

 Illustration 3

 Illustration 4

Page 12: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 12/25

 Illustration 5

"n addition to the t!o portions sho!ed# there are the tasks that can $e

reached $y the menu. The availa$le tasks on the menu are

1.1.+ Format.

@here are t"o "ays to in0o$e the #ormat "indo"% one is pressin theECT,LJF $ey seuence and the other is in0o$in by selectin the menu

TasksFormat.

!hen the #ormat "indo" is in0o$ed% the #ollo"in options "ill be a0ailable+

3evice B From the pull>do"n menu% select the de0ice that is oin to beOCFS #ormatted. Ma$e sure the de0ice is not in use by any other application

or #ilesystem be#ore proceedin.

5locksi&e  B Select the bloc$si,e on "hich the partition is oin to be

#ormatted. 4alid 0alues are $% E$% 18$ =$% 8$% 1E$% 8$% 1$ and12$. @he optimal si,e suested by Oracle is 1E$. Smaller bloc$si,e can

 be selected but they "ill carry some per#ormance penalty. @his is also oin tolimit the si,e o# the partition that can be used "hen #ormattin "ith OCFS=*b to E@b/.

Holume La$el B @his "ill speci#y the 0olume label. @his is use#ul i# the user

"ants to use the 0olume label to mount the #ilesystem.

9ountpoint  B Speci#y the location "here the partition is oin to be

mounted. @he mount point must e:ist on all nodes in the cluster that "ill share

Page 13: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 13/25

the de0ice.

0ser B Speci#y the user that "ill o"n the #ilesystem. !hen the #ilesystem is

mounted% it is automatically o"ned by the user speci#ied in this #ield.

Aroup B Speci#y the roup that the #ilesystem "ill belon to. Similar to the

;ser #ield.?rotection  B Sets the de#ault permission o# the #ilesystem "hen mounted.

;sually set to 2.

Clear all 3ata 5locks B !hen chec$ed% this option "ill ma$e oc#s #ormat

 bloc$ by bloc$% ,eroin all the #ilesystem. @his option "ill increase the timenecessary to #ormat the partition considerably. S3O!/

Force > This options needs to $e checked if the partition to $e formatted

!as previously formatted $y OCFS.

 Illustration 6 

1.1., -enerate Config.

"nvokin this task !ill promptly enerate the etcocfs.conf file accordin

to the server confiuration. 9andatory fields !ill $e automatically filled

!ith the server information. There is no need to do any further steps as

the process !ill automatically enerate the uid in the confiuration file..

!hen the *enerate Con#i "indo" is in0o$ed% the #ollo"in options "ill be

a0ailable+

"nterface  B Select the inter#ace that is oin to be used by the OCFS to

enerate uniue identi#ication. @his inter#ace "ill also be used by the OCFSDistributed 3oc$ Manaer D3M/ in #uture implementation. Ma$e sure that

all nodes that "ill be sharin the OCFS can be reached throuh the selected

inter#ace.

?ort B Select the port number that is oin to be used to communicate to the

Page 14: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 14/25

other nodes. ny non>used port can be assined to OCFS. Ma$e sure all nodes

ha0e the same port con#iured.

@ode:@ame B Select the node name associated to the inter#ace selected.

?referred @ode @um$er B @his is an optional #ield. I# there is a need to ha0e

an speci#ic node assined to a number% #ill this #ield% other"ise% lea0e it to theOCFS.

 Illustration 7 

4<tfind"r 

4<tfind"r  is an utility to report a list of contiuous free extents in the ocfs

filesystem. "t !ill sho! ho! framented the filesystem is after usae.

3"bugocfs

The d"bugocfs utility is used to extract metadata information from the

OCFS partition. This information is useful to help dianose eventual

pro$lems that may arise. The de$uocfs syntax is

d"bugocfs$ Usag"$ d"bugocfs 8-9 8-h9 8-g9 8-l9 8-v rang"9 8-p rang"9 

  8-d dirnam"9 8-f fil"nam" 8-s pathtofil"99 8-a rang"9 8-A rang"9 

  8-b rang"9 8-2 rang"9 8-r rang"9 8-c rang"9 8-, rang"9 8-B rang"9 

  8-n nod"num9 d"vnam"

  -h$ volum" h"ad"r 

  -g$ global bitmap

  -l$ full listing of all fil" "ntri"s

  -v$ vot" s"ctor 

  -&$ print 0-byt" numb"r as & (-byt" numb"rs

  -p$ publish s"ctor 

  -d$ ocfs+dir+nod" structur" for a giv"n path

  -f$ ocfs+fil"+"ntry structur" for a giv"n fil"

  -F$ ocfs+fil"+"ntry and ocfs+"<t"nt+group structur"s for a giv"n fil"

  -s$ suck fil" out to a giv"n location

  -a$ fil" allocation syst"m fil"

Page 15: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 15/25

  -A$ dir allocation syst"m fil"

  -b$ fil" allocation bitmap syst"m fil"

  -2$ dir allocation bitmap syst"m fil"

  -r$ r"cov"r log fil" syst"m fil"

  -c$ cl"anup log syst"m fil"

  -,$ vol m"tadata log syst"m fil"

  -B$ vol m"tadata syst"m fil"

  -n$ p"rform action as nod" numb"r giv"n

 d"vnam"$ r"adabl" d"vic"

  rang"$ nod" numb"rs to insp"ct D-'%E commas and dash"s ok 

  "<. -')%(-%/ 

5elo!# some examples of the de$uocfs output

Holume -eader.

*root+ca-test2 root,# deugocfs -h /de/sd12

disheader  ersion = 1.2

  signature = racle$'

  mount_point = /u01

  serial_num = 0

  deice_sie = (1!(30%((

  start_off = 0

  itmap_off = %)20

  pul_off = 2)%%2

  ote_off = )!!)

  root_itmap_off = 0

  data_start_off = 1)30(

  root_itmap_sie = 0

  root_off = 2(1(0  root_sie = 0

  cluster_sie = 1)1072

  num_nodes = )2

  num_clusters = )1!3!

  dir_node_sie = 0

  file_node_sie = 0

  internal_off = 1)30(

  prot_its = (!)

  uid = 1011

  gid = 1011

  excl_mount = -1

olumelael  curr_master = 0

  file_loc = $'_&45_6_4$

  oin_node_map = 00000000000000000000000000000000

  se8_num = 0

  lael = /u01

  lael_len = (

*root+ca-test2 root,#

Page 16: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 16/25

Hote Sector.

*root+ca-test2 root,# deugocfs - 0-2 /de/sd12

ote0

  se8_num = 0

  dir_ent = 0  open_handle = 6o

  9ote0 = :0x00000000;

  9ote1 = :0x00000000;

  9ote2 = :0x00000000;

ote1

  se8_num = 0

  dir_ent = 0

  open_handle = 6o

  9ote0 = :0x00000000;

  9ote1 = :0x00000000;

  9ote2 = :0x00000000;

ote2

  se8_num = 0

  dir_ent = 0

  open_handle = 6o

  9ote0 = :0x00000000;

  9ote1 = :0x00000000;

  9ote2 = :0x00000000;

*root+ca-test2 root,#

ocfs2file2entry structure*root+ca-test2 root,# ls /u01/oradata/smd/dfiles/control01.ctl

/u01/oradata/smd/dfiles/control01.ctl

*root+ca-test2 root,# deugocfs -f /oradata/smd/dfiles/control01.ctl /de/sd12

fileinfo

  6ame = /oradata/smd/dfiles/control01.ctl

  curr_master = 0

  file_loc = $'_&45_E6<"4E_$<$E_4$

  oin_node_map = 10000000000000000000000000000000

  se8_num = 0

  local_ext = true

  granularity = -1

  filename = control01.ctl

  filename_len = 1)

  file_sie = 12%0!13(

  alloc_sie = 12%32!12

  attris = $'_<>>?@"_?EA

prot_its = _@?B? _@CB? _@DB? _@?A? _@CA? _@DA? _@?>_@D>

uid = 1011

  gid = 1011

  create_time = 'ri <ug 2! 1(!10 200)

Page 17: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 17/25

  modify_time = 'ri <ug 2! 1(!10 200)

  dir_node_ptr = 2!(0!23

  this_sector = 2!(1((0

  last_ext_ptr = 0

  sync_flags = $'_F6$_'4<A_9<4@&

lin_cnt = 0

  next_del = 0  next_free_ext = 1

  extent*0,.file_off = 0

  extent*0,.num_ytes = 12%32!12

  extent*0,.dis_off = (((3(

  extent*1,.file_off = 0

  extent*1,.num_ytes = 0

  extent*1,.dis_off = 0

  extent*2,.file_off = 0

  extent*2,.num_ytes = 0

  extent*2,.dis_off = 0

*root+ca-test2 root,#

Suort tilities

"n this section# a description of each one of the utilities $elonin to the

ocfs:support packae. These packaes are the minimum necessary to

make the OCFS !ork properly.

 "tcinit.docfs

This script is responsi$le to automatically load the ocfs module# perform

a sanity check on the environment and mount all the ocfs partitions listedin /etc/fstab.

 sbinfsck.ocfs

?erform a filesystem check on the partition. ll nodes of a cluster that

share a specific device need to have them unmounted $efore runnin

fsck.ocfs# if one of the nodes has the partition mounted# the fsck.ocfs !ill

fail. The command syntax is

usag"$ fsck.ocfs 8-G9 8-v9 d"vic"

  -G Go ?rit"

  -; ;"rsion

  -v ;"rbos"

  -: @ui"t 

Page 18: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 18/25

 sbinload+ocfs

The load+ocfs  script !ill call the insmod   command and load the ocfs

module !ith all the correct parameters.

 sbinmkfs.ocfs

This command is used to $uild a the filesystem structure in a partition.

The syntax of the mkfs.ocfs command is

usag"$ mkfs.ocfs -b block-si7" 8-C9 8-F9 8-g gid9 8-h9 -, volum"-lab"l 

  -m mount-path 8-n9 8-p p"rmissions9 8-:9 8-u uid9 8-;9 d"vic"

  -b 2lock si7" in kilo byt"s

  -C Cl"ar all data blocks

  -F Forc" format "<isting OCFS volum"

  -g =53 for th" root dir"ctory 

  -h >"lp

  -, ;olum" lab"l 

  -m 6ath ?h"r" this d"vic" ?ill b" mount"d 

  -n @u"ry only 

  -p 6"rmissions for th" root dir"ctory 

  -: @ui"t "<"cution

  -u U53 for th" root dir"ctory 

  -; 6rint v"rsion and "<it 

 sbinmount"d.ocfs

This command mount"d.ocfs is used $asically to check !hich nodes have a

specific device mounted. The command syntax is

usag"$ mount"d.ocfs Hd"vic"I

 sbinocfs+uid+g"n

The ocfs+uid+g"n command is usually used once durin the confiuration

of the OCFS after it is installed. "ts function is to enerate the uni%ue key#in the /etc/ocfs.conf file# that identify the node in the OCFS node manaer.

The command syntax is

Usag"$ ocfs+uid+g"n -c 

  ocfs+uid+g"n -r 

  -c Cr"at" a n"? =U53 for a n"? nod" b"for" it "nt"rs th"

Page 19: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 19/25

  clust"r.

  -r J"cov"r th" =U53 ins"rting th" n"? BAC addr"ss. Khis

  op"ration is only for "<isting nod"s ?hos" BAC addr"ss

  has chang"d.

0est ractices

For ,ed-at S /.1 o to

httposs.oracle.compro*ectsocfsdistdocumentation,-S2$est2practices.html .

For0nited Linux# o to

httposs.oracle.compro*ectsocfsdistdocumentation0L2$est2practices.

txt.

Fre2uently as(ed 3uestions 4 "nswers

Q. Can I install the Oracle Distribution in anOCFS partition?

 A. No. OCFS version 1 supports only database files(datafiles, logfiles, controlfiles, archivelog files, srvmconfiguration file and Oracle Cluster anager !uorum file".

Q. My partitions don't mount automaticallyduring boot. What's rong?

 A. #he ocfs script on $etc$init.d directory is not enable.%se the ch&config command to verify that and enable it.'nstructions on ho to enable it are listed under item ).1* Automatically mount OCFS during boot.

Q. When running !sc".oc!s# it returns the error

$!()I)*+ non,ero bytes a#ter the dis$ header structure-. !hat does it

mean?

 A. +arlier releases of m&fs.ocfs did not clear up 1st bloc&entirely. e-ve since fied the issue in the formatutility. As far as functioning goes, one can safely ignorethis message.

Q. What are the most appropriate %recommended&tool IO and capacity analysis o! OCFS?

 A. /our usual tools (sar, vmstat, iostat" ill

Page 20: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 20/25

 or&, it handles io 0ust li&e any otherfilesystem.

Q. Can I use oc!s on a (S %etor" (ttachedStorage& de)ice li"e et(pp?

 A. No. NAS or&s through netor& and the physical volumeand filesystem is under the fileserver control. OCFS needsto use a direct attached storage device or SAN (Storage

 Area Netor&" here the local server has total control overthe physical volumes.

Q. Can I use *+M or MD to create my OCFS!ilesystem on top o! it?

 A. 2 and 3 are not cluster aare and it ma&es it verydifficult to manage in a cluster environment. No tests have

 been performed using 2 or 3. 't may or&, but it also

 may not. Corruptions are li&ely to happen since they arenot cluster aare softare.

Q.I ant to per!orm some tests using ,(C-OCFS#but I don't ant to spend too much money onhardare. Do I ha)e any other solution?

 A./es. %sers can run on fireire. Oracle does provide aspecial &ernel and ocfs modules to run on fireire. oreinformation can be found athttp4$$oss.oracle.com$pro0ects$fireire$.

Q.Why do I ha)e to include the option netde) inthe !stab on ,ed/at?

 A.#he 5netdev parameter is used hen thefilesystem resides on a device thatre!uires netor& access, it is used to preventthe system from attempting to mount thesefilesystems until the netor& has beenenabled on the system.

Q.What is the best ay to archi)e the logs to anOCFS directory?

 A.#he ideal is to create a directory for each oneof the nodes that ill be archiving on OCFS. #his ay, the logs ill be &ept organi6ed and there ill be no concurrency hen to or more nodesarchive at the same time. #his doesn-t mean there ill be only archivelogs of the node on itsdirectory, because Oracle does allo a node to

Page 21: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 21/25

 perform an archive operation if a specific nodeis don for long time to reduce recovery time.

Q.Is OCFS supported on 01 bit plat!orm li"eItanium?

 A./es, you can find specific pac&ages for ia)7and ia89.

Q. Can I run oc!s on non enterprise *inu2distributions li"e ,ed/at 3?

 A.OCFS is primarily developed for +nterprisesystems and therefore not officially supported on platforms other than :ed;at Advanced Server 7.1or %. #he binaries can be compiled from sourceat your on ris&.

Q.Do I need any speci!ic )ersion o! 4nited *inu2to run OCFS?

 A. /es. #he latest pac&age of OCFS ill or& ith% S<1, but Oracle strongly recommends to run onS<7 or S<7a.

Q. Can I run the latest OCFS on a plain ,ed/at (S5.6# ithout any errata applied?

 A.No. =efore the errata e.17, there as aspecific module for each one of the erratareleases. After e.17, the module is generic,

 or&ing ith any of the erratas released. Oraclestrongly recommends the usage of the latesterrata available.

Q.What is the ad)antage o! running oc!s againstra de)ices?

 A.#here are many advantages on running OCFS. #he biggest and more important is that it loo&s andfeels li&e a regular filesystem, so users don-thave to orry ith all the ra devicesadministration difficulties. Also, users don-t

have to create a partition for each datafile, afe partitions or even a single partition,depending on the needs and storage configuration, may be able to handle big databases. 't alsoeliminate the restriction of 7>> ra partitionslimit on inu, giving almost endless number ofdatafiles that can be created.

Page 22: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 22/25

Q.What happen i! I ha)e to change the I7 (ddresso! my systems?

 A.Changing '< address on the same interface used by the ocfs ill re!uire you to change the '< Address specified in the $etc$ocfs.conf file

only.

Q.My etor" Inter!ace Card had to be replaced.Do I need to do something?

 A./es. :un the utility ?ocfs5uid5gen *r@ to updatethe $etc$ocfs.conf file ith the ne uid.

Q.I ha)e a partition that is not mounted. /o doI "no i! it is an oc!s partition or not?

 A. :un the command ?debugocfs *h $dev$@ as root. 'f itis an ocfs partition, the signature ill sho ?OracleCFS@.

For all other type of filesystem, it ill 0ust returnsomething else, not necessarily the fstype.

Q.Can I use my OCFS partition to store regular!iles?

 A.i&e Oracle 3istribution, regular files are not supportedon OCFS at the moment. #his is planned for OCFS 7.

Q./o much do I lose in terms o! per!ormancecompared to ra de)ices?

 A.Not too much. ithout async '$O, performance have beenfluctuating from to >B of ra devices. Considering allthe benefits of a filesystem against ra, the loss is notthat big. %sing async '$O, ocfs has shon to be about >Bfaster than ra devices.

Q./o do I enable async I-O on Oracle using OCFS?

 A.First of all, it is necessary to relin& the Oracle :3=Sto enable asynchronous '$O (cd O:AC+5;O+$rdbms$libD ma&e*f ins5rdbms.m& async5on". #hen add to the init.ora file,the parameters 4

filesystemio_options=setall

 _dGr_async_io=>?BE

tape_asynch_io=true

dis_asynch_io=true

Q./o do I bac"up my OCFS !iles? Can I use tar orother OS command?

 A.#he best ay to perform an Oracle bac&up is to use :AN.Since a lot of users have their on scripts that usuallyuses tar or other OS commands, e have made available a setof commands that support direct5io, so that users can ta&ehot bac&up using tar, cp, dd. Eo to

Page 23: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 23/25

http4$$oss.oracle.com$pro0ects$coreutils$files$ to get thefileutils$coreutils appropriate to your environment. Notethat for :;AS 7.1 and S+S, the pac&age is calledfileutils and for :;+), it is called coreutils.

Q.Is it possible to resi8e an e2isting OCFS

partition? A./es, tuneocfs command ill do that. <lease refer to thetuneocfs manpages for additional information on synta.

Q.I'm ha)ing problems ith OCFS. /o can I debugOCFS?

 A.One needs to be careful enabling debug on ocfs because itusually fills the $var$log$messages file very !uic&ly. #oenable OCFS tracing4

"cho -% I procsysk"rn"locfsd"bug+l"v"l 

"cho -% I procsysk"rn"locfsd"bug+cont"<t

#o disable OCFS tracing4

"cho I procsysk"rn"locfsd"bug+l"v"l 

"cho I procsysk"rn"locfsd"bug+cont"<t

Q.Can I run OCFS in a stand9alone system? Whatare the ad)antages o! running it?

 A./es. #here is no problems on running OCFS in a stand*alone system since you use it for database files only(3atafile, logfiles, controlfiles, srvm configuration fileand Oracle Cluster anager !uorum file". #he advantage of

using it on stand*alone is that if one needs to upgrade toa :AC environment, it ill be a smooth transition, basically adding a ne node, recompiling the Oracle :3=S&ernel to enable :AC mode and add a ne online log thread.

Q.I ha)e a database running on OCFS in a stand9alone node. Why it is so slo compared to otherstand9alone systems running on e2t:?

 A.OCFS does direct5io, hich bypass the inu cache. +t)in other hands ma&es full usage of the inu cache.3epending on the memory available, it is possible that one

 ill mostly find the data in cache, not having to fetch

from the dis&. =ut this condition happens only if there areenough free memory for cache. As you use more and more

 memory, performance drops significantly.

Q./o can I obtain more in!ormation about OCFS?

 A.Eo to http4$$oss.oracle.com$ocfs. /ou ill be able tofind documents, sources, binaries and all sort ofinformation.

Page 24: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 24/25

Q.I ha)e a customi8ed ,ed/at (S "ernel on mysystem. Does Oracle support OCFS and the ,D;MS onit?

 A.No. Oracle only supports standard &ernels for OCFS andOracle :3=S. 't ould be impossible to trac& and reproduce

any problem ithout &noing all the customi6ations that ere performed in a specific installation.

Q./o do I "no i! my OCFS )ersion is o!!iciallysupported by Oracle?

 A.Chec& the file $var$log$messages for a message that loo&sli&e ?Oracle Cluster FileSystem 1..G*<:O3 ed Hul )18494 <3# 7) (build 88e>97IG7ebee99eaa1f"”

Q.Is OCFS is mountable on *inu2 and Windos 5<<<simultaneously?

 A.No. #he on*dis& format is not the same. 's similar... butnot the same.

"endix "

Ocfs:support packae "nformation

6ame ocfs-support ?elocations :not relocatale;

9ersion 1.0.! 9endor racle $orporation

?elease % "uild &ate Ced )0 Hul 200) 07(3(0 5 E&>

@nstall date :not installed; "uild ost ca-uild1.us.oracle.com

Aroup ystem Enironment/ernel ource ?5 ocfs-2.(.!-e-1.0.!-%.src.rpmie !30!! 4icense A4

acager noody Inoody+oracle.comJ

B?4 http//ocfs.otncast.otnxchange.oracle.com/serlets/roKectome

ummary upport programs for the racle $luster 'ilesystem

&escription

upport programs for using the racle $luster 'ilesystem.

/etc/init.d/ocfs

/sin/fsc.ocfs

/sin/load_ocfs

/sin/mfs.ocfs

/sin/mounted.ocfs

/sin/ocfs_uid_gen

Ocfs:tools packae information

6ame ocfs-tools ?elocations :not relocatale;

9ersion 1.0.! 9endor racle $orporation

?elease % "uild &ate Ced )0 Hul 200) 07(3(0 5 E&>

@nstall date :not installed; "uild ost ca-uild1.us.oracle.com

Aroup ystem Enironment/ernel ource ?5 ocfs-2.(.!-e-1.0.!-%.src.rpm

ie 1!)31 4icense A4

acager noody Inoody+oracle.comJ

B?4 http//ocfs.otncast.otnxchange.oracle.com/serlets/roKectome

Page 25: ORacle OCFS

8/13/2019 ORacle OCFS

http://slidepdf.com/reader/full/oracle-ocfs 25/25

ummary >ools for managing the racle $luster 'ilesystem

&escription

>ools to manage the racle $luster 'ilesystem

/usr/in

/usr/in/cdslctl

/usr/in/deugocfs

/usr/in/extfinder /usr/in/ocfstool

/usr/share

/usr/share/man

/usr/share/man/man1

/usr/share/man/man1/cdslctl.1.g

/usr/share/man/man1/ocfstool.1.g

Ocfs 9odule ?ackae "nformation

6ame ocfs-2.(.!-e-enterprise ?elocations :not relocateale;

9ersion 1.0.! 9endor racle $orporation

?elease % "uild &ate Ced )0 Hul 200) 07(3(0 5 E&>

@nstall date :not installed; "uild ost ca-uild1.us.oracle.com

Aroup ystem Enironment/ernel ource ?5 ocfs-2.(.!-e-1.0.!-%.src.rpm

ie 110(0! 4icense A4

acager noody Inoody+oracle.comJ

B?4 http//ocfs.otncast.otnxchange.oracle.com/serlets/roKectome

ummary >he racle $luster 'ilesystem for enterprise systems.

&escription

$' is the racle $luster 'ilesystem. >his pacage is compiled for 

symmetric processor ernels on machines Gith more than (A" of ?<5.

/li/modules/2.(.!-e-enterprise-<"@/ocfs

/li/modules/2.(.!-e-enterprise-<"@/ocfs-noaio

/li/modules/2.(.!-e-enterprise-<"@/ocfs-noaio/ocfs.o

/li/modules/2.(.!-e-enterprise-<"@/ocfs/ocfs.o