[OpenAFS] DAFS dasalvager: cannot be running from cron
Brunckhorst, Ralf
ralf.brunckhorst@hp.com
Mon, 8 Jul 2013 08:14:29 +0000
--_000_E3A882F104F6304D89C62FB119B729800FCC7136G5W2743americas_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
I have noticed the following behavior of dasalvager:
(Tested on RHEL5 + RHEL6 with openafs-1.6.2 + openafs-1.6.4)
Salvaging a RW-volume on a DAFS server like the following works fine:
/usr/afs/bin/dasalvager -partition PARTITION -volumeid RW-VOLID -showlog -f=
orceDAFS -debug
Putting this into a script and execute the script from CMD-line works also =
fine.
# /tmp/salvage.sh
@(#) OpenAFS 1.6.4 built 2013-06-28
07/08/2013 16:12:59 STARTING AFS SALVAGER 2.4 (/usr/afs/bin/dasalvager -par=
tition /vicephf -volumeid 536912830 -showlog -forceDAFS -debug)
07/08/2013 16:12:59 2 nVolumesInInodeFile 56
07/08/2013 16:12:59 CHECKING CLONED VOLUME 536912831.
07/08/2013 16:12:59 A.e.seka.readonly (536912831) updated 07/06/2013 18:29
07/08/2013 16:12:59 SALVAGING VOLUME 536912830.
07/08/2013 16:12:59 A.e.seka (536912830) updated 07/06/2013 18:29
07/08/2013 16:12:59 totalInodes 345
07/08/2013 16:12:59 Salvaged A.e.seka (536912830): 338 files, 481 blocks
But executing the script from cron doesn't work.
Here the output from the scripts:
(RHEL5 openafs-1.6.4)
@(#) OpenAFS 1.6.4 built 2013-06-28
07/08/2013 15:58:01 STARTING AFS SALVAGER 2.4 (/usr/afs/bin/dasalvager -par=
tition /vicephf -volumeid 536912830 -showlog -forceDAFS -debug)
07/08/2013 15:58:01 _VLockFd: fcntl failed with error 9 when trying to lock=
fd 0 (locktype=3D2, offset=3D536912830)
Error 5 trying to lock volume 536912830; Aborted
/tmp/salvage.sh: line 1: 743 Aborted /usr/afs/bin/dasalva=
ger -partition /vicephf -volumeid 536912830 -showlog -forceDAFS -debug
Same behavior (RHEL6 openafs-1.6.2)
@(#) OpenAFS 1.6.2 built 2013-02-22
07/08/2013 10:02:01 STARTING AFS SALVAGER 2.4 (/usr/afs/bin/dasalvager -par=
tition /vicepf -volumeid 536884732 -showlog -forceDAFS -debug)
07/08/2013 10:02:01 _VLockFd: fcntl failed with error 9 when trying to lock=
fd 0 (locktype=3D2, offset=3D536884732)
Error 5 trying to lock volume 536884732; Aborted
/tmp/salvage.sh: line 1: 8690 Aborted (core dumped) /usr/a=
fs/bin/dasalvager -partition /vicepf -volumeid 536884732 -showlog -forceDAF=
S -debug
Is there any chance to get this also running via cron?
-- Kind regards
Ralf
--_000_E3A882F104F6304D89C62FB119B729800FCC7136G5W2743americas_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Hi,<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">I have noticed the following behavior of dasalvager:=
<o:p></o:p></p>
<p class=3D"MsoNormal">(Tested on RHEL5 + RHEL6 with openafs-1.6.2 +=
; openafs-1.6.4)<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">Salvaging a RW-volume on a DAFS server like the foll=
owing works fine:<o:p></o:p></p>
<p class=3D"MsoNormal">/usr/afs/bin/dasalvager -partition PARTITION -volume=
id RW-VOLID -showlog -forceDAFS –debug<o:p></o:p></p>
<p class=3D"MsoNormal">Putting this into a script and execute the script fr=
om CMD-line works also fine.<o:p></o:p></p>
<p class=3D"MsoNormal"># /tmp/salvage.sh <o:p></o:p></p>
<p class=3D"MsoNormal">@(#) OpenAFS 1.6.4 built 2013-06-28 <o:p></o:p=
></p>
<p class=3D"MsoNormal">07/08/2013 16:12:59 STARTING AFS SALVAGER 2.4 (/usr/=
afs/bin/dasalvager -partition /vicephf -volumeid 536912830 -showlog -forceD=
AFS -debug)<o:p></o:p></p>
<p class=3D"MsoNormal">07/08/2013 16:12:59 2 nVolumesInInodeFile 56 <o:p></=
o:p></p>
<p class=3D"MsoNormal">07/08/2013 16:12:59 CHECKING CLONED VOLUME 536912831=
.<o:p></o:p></p>
<p class=3D"MsoNormal">07/08/2013 16:12:59 A.e.seka.readonly (536912831) up=
dated 07/06/2013 18:29<o:p></o:p></p>
<p class=3D"MsoNormal">07/08/2013 16:12:59 SALVAGING VOLUME 536912830.<o:p>=
</o:p></p>
<p class=3D"MsoNormal">07/08/2013 16:12:59 A.e.seka (536912830) updated 07/=
06/2013 18:29<o:p></o:p></p>
<p class=3D"MsoNormal">07/08/2013 16:12:59 totalInodes 345<o:p></o:p></p>
<p class=3D"MsoNormal">07/08/2013 16:12:59 Salvaged A.e.seka (536912830): 3=
38 files, 481 blocks<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">But executing the script from cron doesn’t wor=
k.<o:p></o:p></p>
<p class=3D"MsoNormal">Here the output from the scripts:<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">(RHEL5 openafs-1.6.4)<o:p></o:p></p>
<p class=3D"MsoNormal">@(#) OpenAFS 1.6.4 built 2013-06-28 <o:p></o:p=
></p>
<p class=3D"MsoNormal">07/08/2013 15:58:01 STARTING AFS SALVAGER 2.4 (/usr/=
afs/bin/dasalvager -partition /vicephf -volumeid 536912830 -showlog -forceD=
AFS -debug)<o:p></o:p></p>
<p class=3D"MsoNormal">07/08/2013 15:58:01 _VLockFd: fcntl failed with erro=
r 9 when trying to lock fd 0 (locktype=3D2, offset=3D536912830)<o:p></o:p><=
/p>
<p class=3D"MsoNormal">Error 5 trying to lock volume 536912830; Aborted<o:p=
></o:p></p>
<p class=3D"MsoNormal">/tmp/salvage.sh: line 1: 743 Aborted&nbs=
p; &=
nbsp; /usr/afs/bin/dasalvager -partition /vicephf -volumeid 536=
912830 -showlog -forceDAFS –debug<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">Same behavior (RHEL6 openafs-1.6.2)<o:p></o:p></p>
<p class=3D"MsoNormal">@(#) OpenAFS 1.6.2 built 2013-02-22 <o:p></o:p=
></p>
<p class=3D"MsoNormal">07/08/2013 10:02:01 STARTING AFS SALVAGER 2.4 (/usr/=
afs/bin/dasalvager -partition /vicepf -volumeid 536884732 -showlog -forceDA=
FS -debug)<o:p></o:p></p>
<p class=3D"MsoNormal">07/08/2013 10:02:01 _VLockFd: fcntl failed with erro=
r 9 when trying to lock fd 0 (locktype=3D2, offset=3D536884732)<o:p></o:p><=
/p>
<p class=3D"MsoNormal">Error 5 trying to lock volume 536884732; Aborted<o:p=
></o:p></p>
<p class=3D"MsoNormal">/tmp/salvage.sh: line 1: 8690 Aborted &nb=
sp; =
(core dumped) /usr/afs/bin/dasalvager -partition /vicepf -volu=
meid 536884732 -showlog -forceDAFS -debug<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">Is there any chance to get this also running via cro=
n?<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">-- Kind regards<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal"> &nbs=
p; &=
nbsp; Ralf <o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>
--_000_E3A882F104F6304D89C62FB119B729800FCC7136G5W2743americas_--