OCFS2
Toores. Ehk seda pala võib täiendada.
Sisukord
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)
inotify ja dnotify sünkroniseerimine masinate kernelite vahel?
dlm distributed lock manager - lukustamine üle võrgu.
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
Fstabi vaja lisada read
none /sys/kernel/config configfs defaults 0 0 none /sys/kernel/dlm ocfs2_dlmfs defaults 0 0
Konfigureerimine
cat /etc/ocfs2/cluster.conf
node: ip_port = 7777 ip_address = 192.168.0.31 number = 0 name = test1 cluster = server node: ip_port = 7777 ip_address = 192.168.0.32 number = 1 name = test2 cluster = server cluster: node_count = 2 name = server
Gentoo puhul tuleb kirjutada faili /etc/conf.d/ocfs2 clustri nimi mida starditakse
OCFS2_CLUSTER="server"
PS: Juhul kui conf.d faili ei muutnud tuleb anda täiendav käsk /etc/init.d/o2cb online cluster. Vaikimisi on clustri nimi OCFS2_CLUSTER="home"
ocfs2 failisüsteemi tegemiseks kettale on käsk mkfs.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
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
# mount /dev/sda /srv/
Ja teises nodes ka teenus startida ja mountida
/etc/init.d/ocfs2 start
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.