Home tmade.de

Home Wiki

OCFS2

Create

mkfs.ocfs2 -Ldata /dev/sdb1     #Format "/dev/sdb1" with ocfs2 with label name "data"

Resize a OCFS2-Partition

A OCFS2 formated Partition can be resized as follows:

1. Delete the active partition with “fdisk”.

fdisk /dev/XXX

Note: Remember the “START-” and “ENDBLOCK” number!!

2. Create the partition with new blocksize.

3. Save the partition with new size (“wq”)

4. Restart the system

Another option is to run

sfdisk –R /dev/sdXX

to reload the kernel-partitiontable.

5. Resize the partition with “tunefs.ocfs2”

tunefs.ocfs2 -S /dev/XXX

Check amount of node slots

tunefs.ocfs2 -Q "UUID = %U\nNumSlots = %N\n" /dev/sdxx

Change Node Slot Count

To change the amount of node slots (default = 4) run:

tunefs.ocfs2 -N 12 /dev/sdb1     #Change to 12 node slots

Check and Repair

fsck.ocfs2 /dev/sdb1

Mount

to mount a second OCFS2-Device on SLES10 add:

configfs             /sys/kernel/config   configfs   rw                    0 0

to the fstab.

To mount a second OCFS2-Device on SLES11 create “/etc/init.d/after.local” with following content:

mount -at ocfs2

Test

#!/bin/bash

if ! cat /proc/mounts | grep "/sys/kernel/debug" &>/dev/null; then
   mount -t debugfs none /sys/kernel/debug
   mounted=1
fi

echo "Clusterlocks held by filesystem.."
for vol in /sys/kernel/debug/ocfs2/*
do
   count=$(wc -l ${vol}/locking_state | cut -f1 -d' ');
   echo "$(basename ${vol}): ${count} locks" ;
done;

echo "Clusterresources held by filesystem.."
for vol in /sys/kernel/debug/o2dlm/*
do
   count=$(grep -c "^NAME:" ${vol}/locking_state);
   echo "$(basename ${vol}): ${count} resources" ;
done;

if [ -n "$mounted" ]; then
   umount /sys/kernel/debug
fi
linux/ocfs2.txt · Last modified: 2017/12/09 01:19 by 127.0.0.1
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki