Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3485157
)
Add a check in new_fs() to try and avoid overwriting an in-use block device.
author
adilger
<adilger>
Fri, 5 Apr 2002 20:13:53 +0000
(20:13 +0000)
committer
adilger
<adilger>
Fri, 5 Apr 2002 20:13:53 +0000
(20:13 +0000)
Not perfect, because it will only check for mounted filesystems, but better
than nothing.
lustre/tests/common.sh
patch
|
blob
|
history
diff --git
a/lustre/tests/common.sh
b/lustre/tests/common.sh
index
edf8e96
..
478a5ef
100644
(file)
--- a/
lustre/tests/common.sh
+++ b/
lustre/tests/common.sh
@@
-51,6
+51,11
@@
new_fs () {
[ $# -lt 2 -o $# -gt 3 ] && \
echo "usage: $0 <fstype> <file> [size]" 1>&2 && exit -1
+ PM="/proc/mounts"
+ [ -f "$PM" ] || PM="/etc/mtab"
+
+ grep "$2 " $PM 1>&2 && echo "$0: $2 is in $PM!" 1>&2 && exit -1
+
$MKFS $MKFSOPT $2 $3 || exit -1
LOOPDEV=$2 # Not really a loop device
else