This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -x | |
function destroy_vol { | |
vol=$1 | |
brick_del_cmd=$(gluster vol info $vol | awk -F':' '/Brick[0-9]+/ { print "ssh " $2 " rm -rf " $3 ";" }') | |
yes | gluster vol stop $vol | |
yes | gluster vol delete $vol | |
eval $brick_del_cmd | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -x | |
yum groupinstall -y "Desktop" \ | |
"General Purpose Desktop" \ | |
"X Window System" \ | |
"Desktop Platform" | |
yum install tigervnc-server firefox | |
chkconfig NetworkManager off | |
service NetworkManager stop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
curl -s http://192.168.101.9:5000/dck/api/v1.0/libdck > /tmp/libdck.sh | |
. /tmp/libdck.sh | |
function child { | |
echo "I'm child" > /etc/motd | |
date >> /etc/motd | |
dck-poke $pid "child_setup" "true" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
LANG=C | |
basepass="XXXXXXXX" | |
reposerver="xxx.xxx.xxx.xxx" | |
function prep_network { | |
set -x | |
yum -y update | |
yum -y groupinstall "Gnome Desktop" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
setenforce 0 | |
curl http://download.gluster.org/pub/gluster/glusterfs/LATEST/Fedora/glusterfs-fedora.repo > /etc/yum.repos.d/gluster.repo | |
yum -y install glusterfs-server glusterfs-geo-replication | |
chkconfig glusterd on | |
service glusterd start | |
chkconfig iptables off | |
service iptables stop | |
mkdir -p /bricks/tmpfs | |
umount /bricks/tmpfs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- mm/shmem.c.orig 2013-09-14 17:53:22.000000000 +0900 | |
+++ mm/shmem.c 2013-11-21 11:17:00.301033262 +0900 | |
@@ -1100,6 +1100,7 @@ | |
spin_lock_init(&info->lock); | |
info->flags = flags & VM_NORESERVE; | |
INIT_LIST_HEAD(&info->swaplist); | |
+ simple_xattrs_init(&info->xattrs); | |
cache_no_acl(inode); | |
switch (mode & S_IFMT) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- include/linux/shmem_fs.h.orig 2013-11-20 13:46:54.609963899 +0900 | |
+++ include/linux/shmem_fs.h 2013-11-20 14:24:31.313954190 +0900 | |
@@ -10,6 +10,24 @@ | |
#define SHMEM_NR_DIRECT 16 | |
+struct simple_xattrs { | |
+ struct list_head head; | |
+ spinlock_t lock; | |
+}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- kernel.spec.orig 2013-11-21 11:33:16.194683545 +0900 | |
+++ kernel.spec 2013-11-21 11:32:40.377181703 +0900 | |
@@ -16,6 +16,7 @@ | |
# by setting the define to ".local" or ".bz123456" | |
# | |
# % define buildid .local | |
+%define buildid .tmpfshacked | |
%define rhel 1 | |
%if %{rhel} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RHEL6でtmpfsでxattrが使えるようにするやっつけの手順。当然ながら、RH non-supportです。 | |
1. カーネルソース「kernel-2.6.32-358.23.2.el6.src.rpm」を入手する。 | |
2. SPECファイルのパッチをダウンロードする。 | |
# rm -f /tmp/kernel.spec.patch | |
# wget https://gist.github.com/enakai00/7558519/raw/79c52871e08816ab262beea4e715a6f580011c23/kernel.spec.patch -O /tmp/kernel.spec.patch | |
3. Kernelパッケージをビルドする |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <glusterfs/api/glfs.h> | |
int main (int argc, char** argv) { | |
glfs_t *fs = NULL; | |
glfs_fd_t *fd = NULL; | |
int ret; | |
char *filename = "filename"; | |
fs = glfs_new ("volume_name"); | |
ret = glfs_set_volfile_server (fs, "tcp", "server_address", 24007); |
OlderNewer