[OpenAFS] Status of global drives in windows version

Rodney M Dyer rmdyer@uncc.edu
Wed, 11 Dec 2002 19:15:25 -0500


At 12:46 PM 12/11/2002 -0500, Steve Ostrove wrote:
>Does anyone know the status regarding global drives with the Windows 
>version of openafs?  Last time I tested things, Transarc's afs client 
>supports global drives, but, while openafs has the appropriate settings, 
>the global drive functionality seems to be broken (my testing was with 
>1.2.2b openafs)
>
>Thanks in advance.
>--
>Steve Ostrove

Global drives are nothing special or complicated.  The Transarc and OpenAFS 
gui interfaces for global drives are just fancy facades for what the afsd 
service does internally, ie, it mounts your drive as user SYSTEM.  You can 
create your own global drives by creating a command shell script that will 
mount afs as user SYSTEM.  This, in my view, is the more proper method.

There are reasons for wanting to perform your own global drive mounting and 
unmounting.  Most notably...you are in control.  Also, afs is unstable on 
the Windows platform.  For this reason, our group has setup watchdog checks 
that make sure the afs service is running, makes sure the global drive is 
mounted, etc.  Another reason is that, even if the drive is mounted, afsd 
may not yet be available because it takes a bit to load it's starting 
cache.  This was more of a problem on slower machines, but still may be an 
issue on slower networks.  And, in the event of a network failure, you can 
handle things gracefully as opposed to the afs service just bailing.

In any case what we did at our site was just ignore the global drives gui 
setup.  You can use group policy to setup a system startup script that runs 
as user SYSTEM.  You would probably want to do this anyway.  Many Windows 
admins need to perform some operations right after the machines reboot, but 
before the user's logon.  When your client starts up from a reboot, the 
system script will mount the global afs drive as system.  Here are a few 
lines from our startup script...

:begin

         :: try to link n: drive to AFS
         :: (if failure then retry every 3 seconds for 100 times)
         for /l %%i in (1,1,100) do (
                 net use n: \\%COMPUTERNAME%-afs\all >> nul 2>>&1
                 if exist "n:\" goto ok
                 sleep 3
         )

         :: total failure...mail administration about problem
         goto end

:ok

         :: n: drive mounted at this point, ok to do other stuff

:end


The nice thing about global drives mounted as SYSTEM is that ordinary users 
can't unmount them.

I have just one issue with afs mounted drives that I can't figure out.  Why 
does the AFS client label them as "Disconnected Network Drive" under the 
explorer interface?  That bugs me and my users.  I think it is a hold-over 
from the migration of code from NT4.0 to Win2000.  In fact, Transarc never 
officially supported Windows XP.  I don't remember the "Disconnected 
Network Drive" problem under NT4.0.

Getting a command shell prompt as user SYSTEM isn't hard.  If you are 
logged on the client as administrator all you need to do is schedule a task 
to run the "c:\winnt\system32\cmd.exe" process.  We do it like...

...go to a command prompt and type...

at xx:xx /interactive cmd.exe

Where xx:xx is some future time, say one minute ahead of the current 
time.  You may have to wait a few seconds for it to show up, but it 
works.  We created a service that runs as SYSTEM that allows us to pipe 
commands to for execution so we can call up a SYSTEM shell anytime we want.

Obviously, you can do things the way you want, but the more you know about 
your software and the way it works the better.  Modularity is GOOD!

Rodney

Rodney M. Dyer
x86 Systems Programmer
College of Engineering Computing Services
University of North Carolina at Charlotte
Email rmdyer@uncc.edu
Phone (704)687-3518
Help Desk Line (704)687-3150
FAX (704)687-2352
Office  267 Smith Building




>_______________________________________________
>OpenAFS-info mailing list
>OpenAFS-info@openafs.org
>https://lists.openafs.org/mailman/listinfo/openafs-info