OCFS2: erinevus redaktsioonide vahel

Allikas: Kuutõrvaja
Mine navigeerimisribaleMine otsikasti
Jj (arutelu | kaastöö)
Resümee puudub
Jj (arutelu | kaastöö)
Resümee puudub
1. rida: 1. rida:
WHAT IS OCFS2?
===Sissejuhatus===


OCFS2 is the next generation of the Oracle Cluster File System for Linux. It allows you to mount volumes on different hosts at the same time. It is an extent based, POSIX compliant file system. OCFS2 is a general-purpose file system that can be used for shared Oracle home installations making management of Oracle Real Application Cluster (RAC) installations even easier. Among the new features and benefits are:  
OCFS2 is the next generation of the Oracle Cluster File System for Linux. It allows you to mount volumes on different hosts at the same time. It is an extent based, POSIX compliant file system. OCFS2 is a general-purpose file system that can be used for shared Oracle home installations making management of Oracle Real Application Cluster (RAC) installations even easier. Among the new features and benefits are:  
9. rida: 9. rida:
Improved data caching / locking (for files such as oracle binaries, libraries, etc)  
Improved data caching / locking (for files such as oracle binaries, libraries, etc)  


===Redhat===


Installimine on lihtne, eriti RedHatiga ;)
Installimine on lihtne, eriti RedHatiga ;)
35. rida: 36. rida:
confifailid asuvad /etc/ocfs2/cluster.conf ja /etc/sysconfig/o2cb
confifailid asuvad /etc/ocfs2/cluster.conf ja /etc/sysconfig/o2cb


cat /etc/ocfs2/cluster.conf  
===Gentoo===
 
Kernel
 
<*> GFS2 file system support                                                                               
 
File systems ---> 
    [*] OCFS2 file system support
    [*]  O2CB Kernelspace Clustering
    [*]  OCFS2 statistics
    [*]  OCFS2 logging support
    [ ]  OCFS2 expensive checks
 
Paigaldamine
 
echo "sys-fs/ocfs2-tools ~amd64" >> /etc/portage/package.keywords
emerge -av sys-fs/ocfs2-tools
 
===Konfigureerimine===
 
cat /etc/ocfs2/cluster.conf  


  node:
  node:
        ip_port = 7777
        ip_port = 7777
        ip_address = 10.1.5.196
        ip_address = 192.168.0.31
        number = 0
        number = 0
        name = nfs1
        name = Tweedledum
        cluster = ocfs2
        cluster = ocfs2_xen
   
   
  node:
  node:
        ip_port = 7777
        ip_port = 7777
        ip_address = 10.1.5.197
        ip_address = 192.168.0.32
        number = 1
        number = 1
        name = nfs2
        name = Tweedledee
        cluster = ocfs2
        cluster = ocfs2_xen
   
   
  cluster:
  cluster:
        node_count = 2
        node_count = 2
        name = ocfs2
        name = ocfs2_test
 
Now we must tell the init script which cluster must be started.
File: /etc/conf.d/ocfs2
 
OCFS2_CLUSTER="ocfs2_test"
 
PS: Juhul kui conf.d faili ei muutnud tuleb anda täiendav käsk /etc/init.d/o2cb online cluster


ocfs2 failisüsteemi tegemiseks kettale on käsk mkfs.ocfs2, võib GUI-s


et mountida ketast võib kasutada GUI'd või mount -t ocfs2 /dev/xxx /xxx või kõik ocfs2 kettad mount -at ocfs2


  cat /etc/sysconfig/o2cb
  # mkfs.ocfs2 -N 2 -L ocfs2_test /dev/sda


# This is a configuration file for automatic startup of the O2CB<br>
N 2 võti näitab mitu masinat osaleb clustris
# driver.  It is generated by running /etc/init.d/o2cb configure.<br>
# Please use that method to modify this file<br>
# O2CB_ENABELED: 'true' means to load the driver on boot.<br>
O2CB_ENABLED=true
# O2CB_BOOTCLUSTER: If not empty, the name of a cluster to start.<br>
O2CB_BOOTCLUSTER=ocfs2
# O2CB_HEARTBEAT_THRESHOLD: Iterations before a node is considered dead.<br>
O2CB_HEARTBEAT_THRESHOLD=
# O2CB_IDLE_TIMEOUT_MS: Time in ms before a network connection is considered dead.<br>
O2CB_IDLE_TIMEOUT_MS=
# O2CB_KEEPALIVE_DELAY_MS: Max time in ms before a keepalive packet is sent<br>
O2CB_KEEPALIVE_DELAY_MS=
# O2CB_RECONNECT_DELAY_MS: Min time in ms between connection attempts<br>
O2CB_RECONNECT_DELAY_MS=


# rc-update add ocfs2 default


ocfs2 failisüsteemi tegemiseks kettale on käsk mkfs.ocfs2, võib GUI-s
# mount /dev/sda /srv/


et mountida ketast võib kasutada GUI'd või mount -t ocfs2 /dev/xxx /xxx või kõik ocfs2 kettad mount -at ocfs2
Ja teises nodes ka teenus startida ja mountida


# /etc/init.d/o2cb status cluster


Kui mõlemas masinas ettevalmistused tehtud, siis polegi midagi muud jäänud kui:
Kui mõlemas masinas ettevalmistused tehtud, siis polegi midagi muud jäänud kui:
92. rida: 110. rida:


Täpsem õpetus http://oss.oracle.com/projects/ocfs2/dist/documentation/02-mount_umount.pdf
Täpsem õpetus http://oss.oracle.com/projects/ocfs2/dist/documentation/02-mount_umount.pdf
Imre Manuali järgi klustri mõõduka kasutamise korras toimub üle 7777/tcp pordi märkimisväärne andmevahetus, ca 500 kBait/s.

Redaktsioon: 13. märts 2013, kell 09:12

Sissejuhatus

OCFS2 is the next generation of the Oracle Cluster File System for Linux. It allows you to mount volumes on different hosts at the same time. It is an extent based, POSIX compliant file system. OCFS2 is a general-purpose file system that can be used for shared Oracle home installations making management of Oracle Real Application Cluster (RAC) installations even easier. Among the new features and benefits are:

Node and architecture local files using Context Dependent Symbolic Links (CDSL) Network based pluggable DLM Improved journaling / node recovery using the Linux Kernel "JBD" subsystem Improved performance of meta-data operations (space allocation, locking, etc). Improved data caching / locking (for files such as oracle binaries, libraries, etc)

Redhat

Installimine on lihtne, eriti RedHatiga ;)

Vaadake, millise kerneli jaoks ka tõmbate ;)

wget http://oss.oracle.com/projects/ocfs2/dist/files/RedHat/RHEL4/x86_64/1.2.5-1/2.6.9-42.EL/ocfs2-2.6.9-42.ELsmp-1.2.5-1.x86_64.rpm
wget http://oss.oracle.com/projects/ocfs2-tools/dist/files/RedHat/RHEL4/x86_64/1.2.4-1/ocfs2-tools-1.2.4-1.x86_64.rpm
wget http://oss.oracle.com/projects/ocfs2-tools/dist/files/RedHat/RHEL4/x86_64/1.2.4-1/ocfs2console-1.2.4-1.x86_64.rpm
rpm -i ocfs2*

Kes tahab sortsust kokku lasta, siis selleks ka võimalus
http://oss.oracle.com/projects/ocfs2/files/source/

Et kõik moodulid masina buutimisel üles laetakse, tuleb käivitada

/etc/init.d/o2cb configure
/etc/init.d/o2cb load
chkconfig ocfs2 on
chkconfig o2cb on

Oracle on valmis teinud ka kena GUI "ocfs2console", võimalusel kasutage seda

Kõigepealt teeme klastri, lisame masinad

confifailid asuvad /etc/ocfs2/cluster.conf ja /etc/sysconfig/o2cb

Gentoo

Kernel

<*> GFS2 file system support

File systems --->

   [*] OCFS2 file system support
   [*]   O2CB Kernelspace Clustering
   [*]   OCFS2 statistics
   [*]   OCFS2 logging support
   [ ]   OCFS2 expensive checks

Paigaldamine

echo "sys-fs/ocfs2-tools ~amd64" >> /etc/portage/package.keywords
emerge -av sys-fs/ocfs2-tools

Konfigureerimine

cat /etc/ocfs2/cluster.conf 
node:
        ip_port = 7777
        ip_address = 192.168.0.31
        number = 0
        name = Tweedledum
        cluster = ocfs2_xen

node:
        ip_port = 7777
        ip_address = 192.168.0.32
        number = 1
        name = Tweedledee
        cluster = ocfs2_xen

cluster:
        node_count = 2
        name = ocfs2_test

Now we must tell the init script which cluster must be started. File: /etc/conf.d/ocfs2

OCFS2_CLUSTER="ocfs2_test"

PS: Juhul kui conf.d faili ei muutnud tuleb anda täiendav käsk /etc/init.d/o2cb online cluster

ocfs2 failisüsteemi tegemiseks kettale on käsk mkfs.ocfs2, võib GUI-s

et mountida ketast võib kasutada GUI'd või mount -t ocfs2 /dev/xxx /xxx või kõik ocfs2 kettad mount -at ocfs2

# mkfs.ocfs2 -N 2 -L ocfs2_test /dev/sda

N 2 võti näitab mitu masinat osaleb clustris

# rc-update add ocfs2 default
# mount /dev/sda /srv/

Ja teises nodes ka teenus startida ja mountida

# /etc/init.d/o2cb status cluster

Kui mõlemas masinas ettevalmistused tehtud, siis polegi midagi muud jäänud kui:

/etc/init.d/o2cb online ocfs2

alati saab ka staatust vaadata

/etc/init.d/o2cb status

Kui klaster on confitud buutimisel laadima, saab klastrit startida/peatada /etc/init.d/o2cb start/stop

Täpsem õpetus http://oss.oracle.com/projects/ocfs2/dist/documentation/02-mount_umount.pdf


Imre Manuali järgi klustri mõõduka kasutamise korras toimub üle 7777/tcp pordi märkimisväärne andmevahetus, ca 500 kBait/s.