tunefs.lustre --ost --writeconf <device> (e.g., /dev/sda1)
tunefs.lustre --mdt --writeconf --erase-params --mountfsoptions=errors=remount-ro,user_xattr <device> (e.g., /dev/md127)
# /etc/rc.local from naaschpc MDT (asimov) #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local #pools lctl pool_new naaschpc.all lctl pool_add naaschpc.all OST[1e-5f] # round-robin defaults (on 2.5 and 2.8) lctl set_param lod.naaschpc-MDT0000-mdtlov.qos_threshold_rr=17 lctl set_param lod.naaschpc-MDT0000-mdtlov.qos_prio_free=91 #needed or df will hang on clients lctl conf_param naaschpc.llite.lazystatfs=1
client# lfs find -type d /path/to/lustre/filesystem | while read thing; do lfs setstripe --pool all "$thing"; done
alias scls="screen -ls"
reconnect (){
screen -x $(screen -ls | grep '[0-9].[0-9]' | awk 'NR=="'$1'"{print $1}')
}
naaschpc and cvlustre
# naasc osses
for i in $(ls -l /dev/disk/by-label | grep naaschpc | awk '{sub(/^..\/..\//, "", $11)} {print $11}'); do screen -d -m -S $(echo $(hostname)-$i) bash -c "echo this is a screen for $i; bash"; done
# cv osses
for i in $(ls -l /dev/disk/by-label | grep cvlustre | awk '{sub(/^..\/..\//, "", $11)} {print $11}'); do screen -d -m -S $(echo $(hostname)-$i) bash -c "echo this is a screen for $i; bash"; done
scls
reconnect # where # is the position in the screen -ls list to reconnect to a given screen
#!/bin/bash
# fsck.sh
# fsck a specified (unmounted) partition
# jotey
# 22 Feb 2017
# # # USAGE FROM TEMPLATE # # #
USAGE_MESSAGE="device letter (e.g., sdb1, sdc)"
ARGMIN=1
ARGMAX=1
usage () {
printf "usage: %s $USAGE_MESSAGE \n" $0 >&2
exit
}
#usage test for $ARGMIN
if [ $# -lt $ARGMIN ]; then
usage
fi
#usage test for $ARGMIN
if [ $# -gt $ARGMAX ]; then
usage
fi
# # # FUNCTIONS # # #
die (){
echo "$*" 1>&2
exit 1
}
# # # MAIN PROGRAM # # #
#accept filesystem letter from command line
spec=$1
# check to see if this device is mounted; fail if so
mount | grep $spec && die "This device is mounted! Unmount first!"
#make a new mountpoint; mount the device there; unmount it
mkdir -p /mnt/device${spec} && mount /dev/${spec} /mnt/device${spec} && umount /mnt/device${spec}
#check the system, but only clean if it isn't clean.
e2fsck -fn /dev/${spec} || e2fsck -fp /dev/${spec}
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.