debian sysprep on fire

gfs2 vs ocfs2

in a nutshellin a nutshell

setup lvm.conf and two thin lvsetup lvm.conf and two thin lv

see lvm2 and proceed

apt install thin-provisioning-tools ocfs2-tools gfs2-utils

pvcreate /dev/mmcblk0p4
vgcreate thin /dev/mmcblk0p4
lvcreate --extents 100%FREE --thin thin/pool
lvcreate --virtualsize 10G --thin -n ocfs2 thin/pool
lvcreate --virtualsize 10G --thin -n gfs2 thin/pool

setup drbdsetup drbd

vi /etc/drbd.conf

global {
    usage-count yes;
    udev-always-use-vnr;
}

common {
    net {
        protocol C;
        # v9
        fencing resource-only;
        #fencing resource-and-stonith;
        allow-two-primaries yes;
    }
    disk {
        read-balancing when-congested-remote;
    }
}

resource ocfs2 {
    device /dev/drbd0;
    meta-disk internal;
    on risc1 {
        node-id   1;
        address   10.3.3.2:7000;
        disk      /dev/mapper/thin-ocfs2;
    }
    on risc2 {
        node-id   2;
        address   10.3.3.3:7000;
        disk      /dev/mapper/thin-ocfs2;
    }
    connection-mesh {
        hosts risc1 risc2;
    }
}

resource gfs2 {
    device /dev/drbd1;
    meta-disk internal;
    on risc1 {
        node-id   1;
        address   10.3.3.2:7001;
        disk      /dev/mapper/thin-gfs2;
    }
    on risc2 {
        node-id   2;
        address   10.3.3.3:7001;
        disk      /dev/mapper/thin-gfs2;
    }
    connection-mesh {
        hosts risc1 risc2;
    }
}
drbdadm create-md ocfs2
drbdadm create-md gfs2
systemctl restart drbd
systemctl enable drbd
systemctl status drbd
drbdadm status

setup ocfs2setup ocfs2

vi /etc/ocfs2/cluster.conf

cluster:
    name = ocfs2bench
    node_count = 2

node:
    cluster = ocfs2bench
    number = 1
    ip_port = 65000
    ip_address = 10.3.3.2
    name = risc1

node:
    cluster = ocfs2bench
    number = 2
    ip_port = 65000
    ip_address = 10.3.3.3
    name = risc2

/etc/init.d/o2cb restart
/etc/init.d/ocfs2 restart

setup dlm/gfs2setup dlm/gfs2

vi /etc/dlm/dlm.conf

enable_quorum = 0
enable_fencing = 0
log_debug = 1
debug_logfile = 1

cat /etc/default/dlm

systemctl status dlm

ready to goready to go

vi /etc/fstab

/dev/drbd0 /data_ocfs2 ocfs2 rw,noatime,nodiratime,_netdev       0 0
/dev/drbd1 /data_gfs2  gfs2  rw,noatime,nodiratime,_netdev,noquota,discard 0 0

systemctl daemon-reload

mkdir /data_ocfs2/
mkdir /data_gfs2/
touch /data_ocfs2/NOT_MOUNTED
touch /data_gfs2/NOT_MOUNTED

mount /data_ocfs2
mount /data_gfs2

resourcesresources

https://lab.nethence.com/nunux/GFS2-AND-OCFS2-AND-DRBD9/

https://www.oracle.com/us/technologies/linux/ocfs2-best-practices-2133130.pdf


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Licensed under MIT