Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 257231 Details for
Bug 359341
Mirror corruption after one of three legs fail simultaneously on more than 1 mirror
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
updated test allows specification of devices.
diff_test.sh (text/plain), 4.60 KB, created by
Jonathan Earl Brassow
on 2007-11-13 18:36:19 UTC
(
hide
)
Description:
updated test allows specification of devices.
Filename:
MIME Type:
Creator:
Jonathan Earl Brassow
Created:
2007-11-13 18:36:19 UTC
Size:
4.60 KB
patch
obsolete
>#!/bin/bash >################################################################ ># Global Variables >################################################################ > >file_systems=1 >iterations=1 >mirrors=1 >mirror_size="4G" >nosync="" >sync_before_io=0 >linux_path="/root/linux-2.6.22.tar.gz" >available_devices="" > >################################################################ ># Sub Functions >################################################################ >function usage >{ > echo "Usage: $PROG [options] [devices]" > echo "Options:" > echo " -d <string> Comma separated list of devices" > echo " -h Print this message." > echo " -i <number> Number of I/O iterations. ($iterations)" > echo " -f <number> Number of LVs/file systems. ($file_systems)" > echo " -L <string> Size of mirrors. ($mirror_size)" > echo " -m <number> Mirror argument. ($mirrors)" > echo " -s Create mirrors with --nosync" > echo " -S Wait for sync before doing I/O." > echo " -t <string> Path to linux tarball. ($linux_path)" >} > ># compute_time <start> <end> >function compute_time >{ > t_diff=$(($2 - $1)) > > s=$(($t_diff % 60)) > t_diff=$(($t_diff / 60)); > m=$(($t_diff % 60)) > t_diff=$(($t_diff / 60)); > h=$(($t_diff % 60)) > echo "$h:$m:$s" >} > ># Wait for a mirror to become in-sync >function wait_for_sync >{ > echo "Waiting for $1 to become in-sync." > a=(`lvs $1 --noheadings`) > if [ -z ${a[5]} ]; then > echo "Unable to determine sync info for $1" > exit 1 > fi > > b=`echo ${a[5]} | cut -d. -f1` > while [ $b -lt 100 ]; do > echo " $1 sync percentage: ${a[5]}" > sleep $((100 - $b)) > a=(`lvs $1 --noheadings`) > b=`echo ${a[5]} | cut -d. -f1` > done >} > ># Called like this: ls | add_prefix "foo" >function add_prefix >{ > while read line; do > echo "$1: $line" > done >} > >################################################################ ># MAIN >################################################################ > >while getopts :d:hi:f:L:m:sSt: opt; do > case $opt in > d) available_devices=`echo $OPTARG | sed s/,/" "/g`;; > h) usage; exit 0;; > i) iterations=$OPTARG;; > f) file_systems=$OPTARG;; > L) mirror_size=$OPTARG;; > m) mirrors=$OPTARG;; > s) nosync="--nosync";; > S) sync_before_io=1;; > t) linux_path=$OPTARG;; > :) echo "$PROG: $OPTARG requires a value:"; usage ; exit 2;; > \?) echo "$PROG: unknown option $OPTARG"; usage ; exit 2;; > *) usage; exit 0;; > esac >done > >echo "Removing old stuff" >vgchange -an vg; lvremove -ff vg > >t1=`date +%s` > >echo "Creating new lvs" >for i in $(seq $file_systems); do > if ! lvcreate -m $mirrors -L $mirror_size $nosync -n lv$i vg $available_devices; then > echo "FAILED" > exit 1 > fi >done > >if [ $sync_before_io -ne 0 ]; then > echo "Waiting for mirrors to finish syncing: " > for i in $(seq $file_systems); do > wait_for_sync vg/lv$i > done >fi > >if [ $iterations != 0 ]; then > echo -n "Making file systems: " > for i in $(seq $file_systems) ; do > mkfs.gfs -p lock_dlm -t brassow-neo:foo$i -j 3 -O /dev/vg/lv$i >& /dev/null & > done > if ! wait; then > echo "FAILED" > exit 1 > fi > echo "Done." > > echo "Mounting file systems" > for i in 4 5 6; do > for j in $(seq $file_systems) ; do > echo " Mounting neo-0$i:/dev/vg/lv$j" > ssh neo-0$i mount -t gfs /dev/vg/lv$j /mnt/gfs$j & > done > done > if ! wait; then > echo "FAILED" > exit 1 > fi > echo "Done." > > echo "Starting I/O" > for i in 4 5 6; do > for j in $(seq $file_systems) ; do > ssh neo-0$i ./many_tars.sh -d /mnt/gfs$j -i $iterations -t $linux_path | add_prefix " neo-0$i:gfs$j"& > done > done > wait > echo "I/O complete" > > echo "Unmounting file systems" > for i in 4 5 6; do > for j in $(seq $file_systems) ; do > echo " Unmounting neo-0$i:/dev/vg/lv$j" > ssh neo-0$i umount /mnt/gfs$j & > done > done > > time_waiting=0 > machine_list=(`ps -C ssh -o cmd= | grep umount | cut -d ' ' -f 2 | cut -d '.' -f 1`) > ml_check="" > while [ ! -z ${machine_list[0]} ]; do > if [ "${machine_list[*]}" != "$ml_check" ]; then > echo -n "Waiting for " > echo -n ${machine_list[@]} | sed s/' '/,/g > echo " to finish umount" > ml_check=${machine_list[*]} > fi > sleep 1 > time_waiting=$(($time_waiting + 1)) > machine_list=(`ps -C ssh -o cmd= | grep umount | cut -d ' ' -f 2 | cut -d '.' -f 1`) > done > echo "Done." >fi > >echo "Waiting for mirrors to finish syncing: " >for i in $(seq $file_systems); do > wait_for_sync vg/lv$i >done > >t2=`date +%s` >echo -n "Time to run: " >compute_time $t1 $t2 > >echo "Comparing Mirror Legs" >for i in $(seq $file_systems); do > if ! ./find_dm_diffs.pl vg/lv$i; then > echo "Differences found." > exit 1 > fi >done > >echo "Mirrors are consistent" >exit 0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 359341
:
245571
|
245581
|
257231
|
300084