Permalink
Browse files

Added current versions of xattr testing. unshare testing and GPFS-xat…

…tr scripts were added, while XAPT (xattr-limitations) was added as a submodule
  • Loading branch information...
Matthew Broomfield
Matthew Broomfield committed May 1, 2015
1 parent f3f2766 commit aa9162362d6a1984eb80b2449c2bd3e87d70854d
@@ -0,0 +1,3 @@
[submodule "experimentation/XAPT"]
path = experimentation/XAPT
url = git@git.lanl.gov:/broomfield/ExtendedAttributePerformanceTester.git
@@ -0,0 +1 @@
XAPT/
Submodule XAPT added at cddaf1
@@ -0,0 +1,5 @@
Documentation for this project is located at http://cm-7-w/lore/Unshare%20Tests

We assume both mhddfs and gpfs are installed

Look at both scripts. "unshare_gpfs_mhddfs.bash" calls "mount_script.bash"
@@ -0,0 +1,15 @@
#!/bin/bash

# first argument is the GPFS to mount
# second argument is the directories to use for MHDDFS
# third argument is mount point for MHDDFS

echo Mounting GPFS: $1
echo Directories for MHDDFS: $(echo $2 | tr ',' '\n')
echo Mount point for MHDDFS: $3
mmmount $1
for directory in $(echo $2 | tr ',' '\n'); do
mkdir -p $directory
done
mhddfs $2 $3 -o allow_other

@@ -0,0 +1,21 @@
#!/bin/bash
#
# mounts gpfs on an unshared directory and then puts mhddfs on top of that

# Arguments
# first argument: Script to be unshared

# NOTE: the following needs to be ran once
# mount --make-rshared / # remove the ability for unshared directories to
# exist.
# mount --rbind /gpfs /gpfs # bind /gpfs to /gpfs, recursively. This might seem
# silly.
# mount --make-private /gpfs # allow unshare to work under /gpfs

# Now, create an unshared process that can make its own mount points.
# Then, have that process mount the GPFS and export it using MHDDFS
# NOTE: right now, this script works for our setup. You will need to change the
# following arguments for your setup.

unshare -m $1 g1 /gpfs/g1/dir1,/gpfs/g1/dir2 /tmp/mountpoint

@@ -0,0 +1 @@
See http://wiki.lanl.gov/lore/GPFS-xattr-REGEX%20performance%20testing
@@ -0,0 +1,6 @@
#!/bin/bash

directory="/gpfs/g1/addrtests/testdirectory/"

mmapplypolicy $directory -P $1

@@ -0,0 +1,45 @@
#!/bin/bash

testdirectory="testdirectory"
filecount=10000
addrcount=10
addrlength=64
delimiter=","

echo -n "making directory..."
mkdir -p $testdirectory
echo "done"

pushd $testdirectory

echo -n "create files..."
for i in $(seq 1 $filecount); do

#create file
touch file$i &
done

wait
echo "done"

echo -n "add xattrs..."
for i in $(seq 1 $filecount); do

# Generate attribute
xattr=""
for j in $(seq 1 $addrcount); do
newattr=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $addrlength | head
-n 1)
xattr="$xattr$delimiter$newattr"
done
xattr="$xattr$delimiter"

#set attribute
attr -s testattr -V $xattr file$i &>/dev/null &

done

wait
echo "done"

popd
@@ -0,0 +1,2 @@
RULE 'list_substr1' DELETE WHERE XATTR('user.testattr')

@@ -0,0 +1 @@
RULE 'list_substr1' DELETE WHERE REGEX(XATTR('user.testattr'),',.*,.*,0+,.*,.*,.*,.*,.*,.*,.*,')
@@ -0,0 +1,50 @@
#!/bin/bash

testdirectory="testdirectory"
filecount=10000
addrcount=10
addrstep=10
whichaddr=3
delimiter=","
attrlength=64

pushd $testdirectory

echo -n "setting xattrs..."
for i in $(seq 1 $addrstep $filecount); do

echo "changing file$i"

# Generate attribute
xattr=""
for j in $(seq 1 $((whichaddr - 1))); do
newattr=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $attrlength | head
-n 1)
xattr="$xattr$delimiter$newattr"
done

#add attr of zeros
newattr=$(echo
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
| tr -dc 'a-zA-Z0-9' | fold -w $attrlength | head -n 1)
xattr="$xattr$delimiter$newattr"

testthing=$(seq $((whichaddr + 1)) $addrcount)
for j in $testthing; do
newattr=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $attrlength | head
-n 1)
xattr="$xattr$delimiter$newattr"
done

xattr="$xattr$delimiter"
echo $xattr

#set attribute
attr -s testattr -V $xattr file$i &>/dev/null &

done

wait
echo "done"

popd

0 comments on commit aa91623

Please sign in to comment.