ocfs2
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| ocfs2 [2016-01-22 09:10:04] – [Konfigurationsbeispiel OCFS-Cluster] manfred | ocfs2 [2024-01-22 16:02:01] (aktuell) – [Stand: 2024-01-22 / Ubuntu 22.04.3 LTS] manfred | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====== OCFS2 (Oracle Cluster File System 2) ====== | ||
| + | |||
| + | OCFS2 ist seit Kernel 2.6.19 stabil (eingeführt 2005) | ||
| + | |||
| + | Bei OCFS2 handelt es sich um ein Open-Source Cluster-Dateisystem von der Firma Oracle für Linux, | ||
| + | welches in einem Computercluster konkurrierenden Zugriff auf eine Shared Storage ermöglicht. | ||
| + | |||
| + | OCFS2 unterstützt keine ACLs, die Unterstützung erweiterter Attribute und SELINUX ist geplant.\\ | ||
| + | OCFS2 beherrscht gleichzeitig den gepufferten und ungepufferten (" | ||
| + | WAN-Tauglich ist es nicht => **//lower latency is highly recommended// | ||
| + | |||
| + | OCFS2 is a general purpose extent based shared disk cluster file | ||
| + | system with many similarities to ext3. It supports 64 bit inode | ||
| + | numbers, and has automatically extending metadata groups which may | ||
| + | also make it attractive for non-clustered use. | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * **[[https:// | ||
| + | |||
| + | |||
| + | ===== Stand: 2024-01-22 / Ubuntu 22.04.3 LTS ===== | ||
| + | |||
| + | * [[https:// | ||
| + | |||
| + | o2cb add-heartbeat share_ocfs2 /dev/sdc1 | ||
| + | o2cb heartbeat-mode share_ocfs2 local | ||
| + | |||
| + | dpkg-reconfigure ocfs2-tools | ||
| + | service o2cb stop | ||
| + | service o2cb start | ||
| + | ss -lntp | ||
| + | mount / | ||
| + | |||
| + | echo " | ||
| + | |||
| + | < | ||
| + | node: | ||
| + | ip_port = 7777 | ||
| + | ip_address = 192.168.2.101 | ||
| + | number = 0 | ||
| + | name = hostname01 | ||
| + | cluster = share_ocfs2 | ||
| + | |||
| + | node: | ||
| + | ip_port = 7777 | ||
| + | ip_address = 192.168.2.102 | ||
| + | number = 1 | ||
| + | name = hostname02 | ||
| + | cluster = share_ocfs2 | ||
| + | |||
| + | node: | ||
| + | ip_port = 7777 | ||
| + | ip_address = 192.168.2.103 | ||
| + | number = 2 | ||
| + | name = hostname03 | ||
| + | cluster = share_ocfs2 | ||
| + | |||
| + | cluster: | ||
| + | name = share_ocfs2 | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Stand: 2016-01-22 / Ubuntu 14.04 ===== | ||
| + | |||
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | |||
| + | |||
| + | ==== Konfigurationsbeispiel OCFS" | ||
| + | |||
| + | > fdisk /dev/vdb | ||
| + | > fdisk -l /dev/vdb | ||
| + | | ||
| + | Disk /dev/vdb: 21.5 GB, 21474836480 bytes | ||
| + | 3 Köpfe, 34 Sektoren/ | ||
| + | Einheiten = Sektoren von 1 × 512 = 512 Bytes | ||
| + | Sector size (logical/ | ||
| + | I/O size (minimum/ | ||
| + | Festplattenidentifikation: | ||
| + | | ||
| + | | ||
| + | / | ||
| + | | ||
| + | > aptitude -y install ocfs2-tools | ||
| + | > mkfs -t ocfs2 -L " | ||
| + | > echo " | ||
| + | > cp / | ||
| + | > vi / | ||
| + | < | ||
| + | node: | ||
| + | ip_port = 7777 | ||
| + | ip_address = 192.168.2.101 | ||
| + | number = 0 | ||
| + | name = hostname01 | ||
| + | cluster = share_ocfs2 | ||
| + | |||
| + | node: | ||
| + | ip_port = 7777 | ||
| + | ip_address = 192.168.2.102 | ||
| + | number = 1 | ||
| + | name = hostname02 | ||
| + | cluster = share_ocfs2 | ||
| + | |||
| + | node: | ||
| + | ip_port = 7777 | ||
| + | ip_address = 192.168.2.103 | ||
| + | number = 2 | ||
| + | name = hostname03 | ||
| + | cluster = share_ocfs2 | ||
| + | |||
| + | cluster: | ||
| + | node_count = 3 | ||
| + | name = share_ocfs2 | ||
| + | </ | ||
| + | |||
| + | __Bei **''" | ||
| + | |||
| + | # service o2cb configure | ||
| + | > dpkg-reconfigure ocfs2-tools | ||
| + | Loading filesystem " | ||
| + | Mounting configfs filesystem at / | ||
| + | Loading stack plugin " | ||
| + | Loading filesystem " | ||
| + | Creating directory '/ | ||
| + | Mounting ocfs2_dlmfs filesystem at /dlm: OK | ||
| + | Setting cluster stack " | ||
| + | Starting O2CB cluster share_ocfs2: | ||
| + | | ||
| + | > service o2cb online | ||
| + | Cluster share_ocfs2 already online | ||
| + | | ||
| + | > / | ||
| + | Starting Oracle Cluster File System (OCFS2) OK | ||
| + | | ||
| + | > service o2cb status | ||
| + | Driver for " | ||
| + | Filesystem " | ||
| + | Stack glue driver: Loaded | ||
| + | Stack plugin " | ||
| + | Driver for " | ||
| + | Filesystem " | ||
| + | Checking O2CB cluster share_ocfs2: | ||
| + | Heartbeat dead threshold = 31 | ||
| + | Network idle timeout: 30000 | ||
| + | Network keepalive delay: 2000 | ||
| + | Network reconnect delay: 2000 | ||
| + | Checking O2CB heartbeat: Active | ||
| + | | ||
| + | > cat / | ||
| + | # | ||
| + | # This is a configuration file for automatic startup of the O2CB | ||
| + | # driver. | ||
| + | # Please use that method to modify this file. | ||
| + | # | ||
| + | | ||
| + | # O2CB_ENABLED: | ||
| + | O2CB_ENABLED=true | ||
| + | | ||
| + | # O2CB_BOOTCLUSTER: | ||
| + | O2CB_BOOTCLUSTER=share_ocfs2 | ||
| + | | ||
| + | # O2CB_HEARTBEAT_THRESHOLD: | ||
| + | O2CB_HEARTBEAT_THRESHOLD=31 | ||
| + | | ||
| + | # O2CB_IDLE_TIMEOUT_MS: | ||
| + | O2CB_IDLE_TIMEOUT_MS=30000 | ||
| + | | ||
| + | # O2CB_KEEPALIVE_DELAY_MS: | ||
| + | O2CB_KEEPALIVE_DELAY_MS=2000 | ||
| + | | ||
| + | # O2CB_RECONNECT_DELAY_MS: | ||
| + | O2CB_RECONNECT_DELAY_MS=2000 | ||
| + | |||
| + | > tunefs.ocfs2 -Q "Label = %V\nUUID = %U\nNumSlots =%N\n" /dev/sdc1 | ||
| + | Label = share_ocfs2 | ||
| + | UUID = 74FD5D9EC36F4B5897A47D2F98F8D40D | ||
| + | NumSlots =2 | ||
| + | |||
| + | > o2info -h | ||
| + | > o2info --volinfo /dev/sdc1 | ||
| + | |||
| + | > ss -lntp | ||
| + | State Recv-Q | ||
| + | LISTEN | ||
| + | |||
| + | |||
| + | ===== Stand: 2010-11-10 / Ubuntu 10.04 ===== | ||
| + | |||
| + | aptitude install ocfs2-tools ocfs2console | ||
| + | | ||
| + | Hole:1 http:// | ||
| + | Hole:2 http:// | ||
| + | Hole:3 http:// | ||
| + | Hole:4 http:// | ||
| + | | ||
| + | http:// | ||
| + | http:// | ||
| + | | ||
| + | ################################################################################ | ||
| + | # O2CB - Default cluster stack for the OCFS2 file system. | ||
| + | | ||
| + | Damit O2CB problemlos funktioniert, | ||
| + | oder wenigstens modifizieren. | ||
| + | Vielleicht wird SELINUX in Zukunft auch unterstützt, | ||
| + | erweiterten Attributen umgehen können wird. | ||
| + | | ||
| + | | ||
| + | | ||
| + | #aptitude install ocfs2-tools ocfs2console | ||
| + | aptitude install ocfs2-tools | ||
| + | | ||
| + | Die " | ||
| + | cp / | ||
| + | | ||
| + | vi / | ||
| + | node: | ||
| + | ip_port = 7777 | ||
| + | ip_address = 10.10.10.1 | ||
| + | number = 0 | ||
| + | name = hostname1.domain.de | ||
| + | cluster = ocfs2cluster | ||
| + | | ||
| + | node: | ||
| + | ip_port = 7777 | ||
| + | ip_address = 10.10.10.2 | ||
| + | number = 1 | ||
| + | name = hostname2 | ||
| + | cluster = ocfs2cluster | ||
| + | | ||
| + | cluster: | ||
| + | node_count = 2 | ||
| + | name = ocfs2cluster | ||
| + | | ||
| + | | ||
| + | | ||
| + | mkfs.ocfs2 -L " | ||
| + | fsck.ocfs2 -f -r 2 /dev/sda1 | ||
| + | | ||
| + | vi /etc/fstab | ||
| + | / | ||
| + | | ||
| + | | ||
| + | | ||
| + | ### O2CB Cluster Timeout Configuration | ||
| + | # | ||
| + | ### RedHat | ||
| + | # service o2cb configure | ||
| + | # | ||
| + | ### Debian | ||
| + | dpkg-reconfigure ocfs2-tools | ||
| + | | ||
| + | | ||
| + | / | ||
| + | / | ||
| + | | ||
| + | / | ||
| + | / | ||
| + | | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | # | ||
| + | # ODER | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # ODER | ||
| + | # | ||
| + | #aptitude install chkconfig lsb-base | ||
| + | #chkconfig -a o2cb | ||
| + | #chkconfig -s o2cb on | ||
| + | #chkconfig -a ocfs2 | ||
| + | #chkconfig -s ocfs2 on | ||
| + | | ||
| + | ################################################################################ | ||
| + | | ||
| + | To manually enable panic on oops and set a 30 sec timeout for reboot on panic, do: | ||
| + | $ echo 1 > / | ||
| + | $ echo 30 > / | ||
| + | | ||
| + | To enable the above on every reboot, add the following to / | ||
| + | kernel.panic_on_oops = 1 | ||
| + | kernel.panic = 30 | ||
| + | |||
