Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-stable
Commits
af903888
Commit
af903888
authored
Jul 03, 2017
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For write-cache, if camcontrol fails, try smartctl.
camcontrol cannot change the cache settings on "ada" devices.
parent
ca7027f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
clientside/tmcc/common/checknode/diskcheck
clientside/tmcc/common/checknode/diskcheck
+9
-4
No files found.
clientside/tmcc/common/checknode/diskcheck
View file @
af903888
#! /bin/bash
#
# Copyright (c) 2013 University of Utah and the Flux Group.
# Copyright (c) 2013
-2017
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -558,7 +558,11 @@ getwcache() {
fi
elif
[
"
$os
"
==
"FreeBSD"
]
;
then
# try camcontrol first
cmc
=
$(
which camcontrol
)
if
[
"
$osrel
"
==
"10"
]
;
then
cmc
=
$(
which camcontrol10
)
else
cmc
=
$(
which camcontrol
)
fi
#set -x
if
[
"
${
cmc
/camcontrol
}
"
!=
"
${
cmc
}
"
]
;
then
sd
=
${
1
#/dev/
}
...
...
@@ -570,9 +574,10 @@ getwcache() {
printf
" %s:%d "
"Setting WCE"
${
$sd
}
>>
${
logfile4tb
}
/usr/local/etc/emulab/camwce
-P
on
$sd
>
/dev/null 2>&1
fi
fi
#set +x
else
# don't have don't have camcontrol, maybe we can use smartctl
# don't have don't have camcontrol or it did not work, try smartctl
if
[
"
$res
"
==
"NA"
]
;
then
smtcl
=
$(
findSmartctl_getopt
)
if
[
"
${
smtcl
/smartctl
}
"
!=
"
$smtcl
"
]
;
then
x
=
$(
$smtcl
--get
=
wcache
$1
|
grep
-i
Write |
grep
-i
cache
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment