This must be done after you REALLY know this brick is going to be re-used elsewhere not in the same volume it was used before. NOTE: Potential data loss setfattr -x trusted.glusterfs.volume-id $brick_path setfattr -x trusted.gfid $brick_path rm -rf $brick_path/.glusterfs
Author: admin
Playing with Glusterfs
More details in a later post but I finally realized the order of things ? Thought I’d share. Reference sites: http://www.gluster.org/community/documentation/index.php/Getting_started_configure http://www.redhat.com/magazine/009jul05/features/gfs_practices/ mkdir ~/gluster cd ~/gluster wget -l 1 -nd -nc -r -A.rpm http://download.gluster.org/pub/gluster/glusterfs/LATEST/RHEL/epel-6/x86_64/ Â yum install glusterfs-libs-*.el6.x86_64.rpm -y yum install glusterfs-*.el6.x86_64.rpm -y yum install glusterfs-fuse-*.el6.x86_64.rpm -y yum install glusterfs-cli-*.el6.x86_64.rpm -y yum install glusterfs-server-*.el6.x86_64.rpm…
Auto-blacklist iptables
Gather a list of ips which fail logins and drop from firewall for the future lastb | awk '{ FS == "[ \t]+" ; print $3; }' | egrep -o '([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}'| grep -v "192.168." | sort | uniq | xargs -n 1 -I {} iptables -A INPUT -s {} -j DROP if you want to…
Fix node Geoip update fails
After a routine update of a customer’s application resulted in a broken package npm update gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/nod gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789: gyp ERR! System Linux 2.6.32-431.1.2.0.1.el6.i686 gyp ERR! command…
VBS script to gather all IIS 6 Sites , state and folders for storage
This is a script from this site which I found particularly handy. OPTION EXPLICIT DIM CRLF, TAB DIM strServer DIM objWebService TAB = CHR( 9 ) CRLF = CHR( 13 ) & CHR( 10 ) IF WScript.Arguments.Length = 1 THEN strServer = WScript.Arguments( 0 ) ELSE strServer = "localhost" END IF WScript.Echo "Enumerating websites on…
Node.js and Express with HTTPS
Quoting from the doco + some missing stuff: var express = require('express'); var https = require('https'); var http = require('http'); var app = express(); var fs = require('fs'); var options = { key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') }; http.createServer(app).listen(80); https.createServer(options, app).listen(443); nJoy 😉
Svn side-by-side compare a file in two versions
So you want to compare a file across two revisions. svn diff -r 107:106 routes/user.js –diff-cmd /usr/bin/diff -x “–side-by-side” nJoy 😉
Replacing a piece of XML with awk
This script searches for an initial tag and and closing one and replaces the content. # !/bin/bash awk ‘ BEGIN {pr = 1;one = 0} /<Name>OPENING<\/Name>/ {pr = 0;} { if (pr) print } { if (!pr && !one) {print (“\t\t <Name>OPENING</Name> \n \t\t\t <Value>false</Value> \n \t\t<Type>STOPHERE</Type> \n ” ); one =1 ;}} /<Type>STOPHERE<\/Type>/ {pr…
Track ftp password from tcpdump Linux
Very nice and simple: tcpdump port ftp -l -A | egrep -i ‘pass=|pwd=|log=|login=|user=|username=|pw=|passw=|passwd=|password=|pass:|user:|username:|password:|login:|pass |user ‘ –color=auto –line-buffered -B20 nJoy  😉
Force an update on a zone for bind (named)
Just a simple command: rndc retransfer domain.com nJoy 😉