[OpenAFS] Volume Create/Delete problems
Tom Cocagne
tom.cocagne@gmail.com
Mon, 7 Jul 2008 12:48:06 -0400
------=_Part_23906_13871395.1215449286596
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I have a rather simple yet baffling problem involving the creation/deletion
of volumes in AFS. I've written scripts to create/delete AFS home
directories for users and ran into a problem where if I create a user home,
delete it, then immediately re-create it, everything works fine. If,
however, the directory is used after creation, the deletion will succeed but
the recreation will fail. The scripts I'm using are:
-------------------------- Creation --------------------------
#!/bin/sh
cellname=$1
server=$2
username=$3
user_id=$4
pts createuser $username -id $user_id
vos create $server /vicepa home.$username -maxquota 0
fs mkmount /afs/.$cellname/home/$username home.$username -rw
vos release home
fs setacl -dir /afs/$cellname/home/$username -acl $username all
-------------------------- Deletion --------------------------
#!/bin/sh
cellname=$1
username=$2
fs rmmount /afs/.$cellname/home/$username
vos remove -id home.$username
pts delete $username
vos release home
A quick execution of the create script, followed by a delete, followed
by a create with the same user name works fine. In fact, several cycles work
fine. However, if I actually use the newly created volume, a subsequent
recreate will fail. For example, the following procedure fails every time:
1. run afs create script for 'test_user'
2. Log in as 'test_user', run command "echo foo > /afs/
tdomain.com/home/test_user/bar", log out
3. run afs delete script for 'test_user'
4. run afs create script for 'test_user'
In step 4, all commands except for the last appear to work normally. The
final command fails with the error message "fs: File '/afs/.
tdomain.com/home/test_user' doesn't exist" and attempting to run 'ls' on the
directory as root on the AFS server machine and with proper tokens yields
"ls: cannot access /afs/tdomain.com/home/test_user: Connection timed out"
It seems like a pretty simple operation that should work every time...
whether home directory has been used or not. Can anyone spot a flaw in the
commands I'm using that might explain this?
Tom
btw, this was done on a Gentoo Linux system. kernel 2.6.24 and OpenAFS
1.4.7
------=_Part_23906_13871395.1215449286596
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I have a rather simple yet baffling problem involving the
creation/deletion of volumes in AFS. I've written scripts to
create/delete AFS home directories for users and ran into a problem
where if I create a user home, delete it, then immediately re-create
it, everything works fine. If, however, the directory is used after
creation, the deletion will succeed but the recreation will fail. The
scripts I'm using are:<br>
<br>-------------------------- Creation --------------------------<br>#!/bin/sh<br>cellname=$1<br>server=$2<br>username=$3<br>user_id=$4<br><br>pts createuser $username -id $user_id<br><br>vos create $server /vicepa home.$username -maxquota 0<br>
fs mkmount /afs/.$cellname/home/$username home.$username -rw<br>vos release home<br><br>fs setacl -dir /afs/$cellname/home/$username -acl $username all<br><br>-------------------------- Deletion --------------------------<br>
#!/bin/sh<br>cellname=$1<br>username=$2<br><br>fs rmmount /afs/.$cellname/home/$username<br>vos remove -id home.$username<br><br>pts delete $username<br><br>vos release home<br><br><br>
A quick execution of the create script, followed by a delete, followed
by a create with the same user name works fine. In fact, several cycles
work fine. However, if I actually use the newly created volume, a
subsequent recreate will fail. For example, the following procedure
fails every time:<br>
<br>1. run afs create script for 'test_user'<br>2. Log in as 'test_user', run command "echo foo > /afs/<a href="http://tdomain.com/home/test_user/bar" target="_blank">tdomain.com/home/test_user/bar</a>", log out<br>
3. run afs delete script for 'test_user'<br>4. run afs create script for 'test_user'<br><br>
In step 4, all commands except for the last appear to work normally.
The final command fails with the error message "fs: File '/afs/.<a href="http://tdomain.com/home/test_user" target="_blank">tdomain.com/home/test_user</a>'
doesn't exist" and attempting to run 'ls' on the directory as root on
the AFS server machine and with proper tokens yields "ls: cannot access
/afs/<a href="http://tdomain.com/home/test_user" target="_blank">tdomain.com/home/test_user</a>: Connection timed out"<br>
<br> It seems like a pretty simple operation that should work every
time... whether home directory has been used or not. Can anyone spot a
flaw in the commands I'm using that might explain this? <br><br> Tom<br><br>
btw, this was done on a Gentoo Linux system. kernel 2.6.24 and OpenAFS 1.4.7
------=_Part_23906_13871395.1215449286596--