Description: added n4d vars and format plugin TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . ocfs2-tools (1.6.4-2ubuntu6) precise; urgency=low . * Added n4d vars * Added lliurex-format-ocfs2 plugin Author: David Montalva Furio --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- /dev/null +++ ocfs2-tools-1.6.4/vars/ocfs2 @@ -0,0 +1,19 @@ +{ + + "OCFS2_DISK": { + "function": "lliurex.variables.ocfs2_disk.init", + "packages": [ + "ocfs2tools" + ], + "description": "set the device formated in ocfs2 filesystem", + "value": null + }; + "OCFS2_NET_EXPORT_DIRS": { + "function": "lliurex.variables.ocfs2_net_export_dirs.init", + "packages": [ + "ocfs2tools" + ], + "description": "set the folders mounted in ocfs2 cluster", + "value": null + }; +} --- ocfs2-tools-1.6.4.orig/lliurex-install/usr/sbin/llxcfg-cluster +++ ocfs2-tools-1.6.4/lliurex-install/usr/sbin/llxcfg-cluster @@ -22,8 +22,8 @@ exit 0 [ "$(id -u)" != "0" ] && exit 0 OCFS2_MOUNT_FSTAB="/ocfs2" -OCFS2_NET_EXPORT_DIRS="/net/mirror /net/server-sync" -OCFS2_DISK="/dev/sdb" +eval `n4d-vars getvalues OCFS2_NET_EXPORT_DIRS` +eval `n4d-vars getvalues OCFS2_DISK` #eval $(n4d-vars getvalues OCFS2_EXPORT_DIRS OCFS2_MOUNT_FSTAB OCFS2_DISK) --- /dev/null +++ ocfs2-tools-1.6.4/lliurex-install/usr/sbin/lliurex-format-ocfs2 @@ -0,0 +1,17 @@ +#!/bin/bash +usage() { + +echo "Usage: llxcfg-cluster fix-cluster (no superblock restore) +\tlliurex-format-ocfs2 device [NODES] +\texample: lliurex-format-ocfs2 /dev/vdb 8 +" +exit 0 +} +[ $1 ] || usage + +NODES=8 + +[ $2 ] && NODES=$2 + +mkfs.ocfs2 -N $NODES --fs-feature-level=max-features --fs-features=xattr -L net $1 +n4d-vars setvalue OCFS2_DISK "$1" \ No newline at end of file