Mark
The way we have it structured is that the destination file is locked. This is
where the users have access to the templates. The source file/location is
never locked - this is where the developers update the templates to put to
the destination.
As one of the people suggested, perhaps the best way to approach this is to
rsh to the filer, get the list of username's that have the file opened, then
running through a regexp, and then terminating the user's cifs sessions.
This job can be scheduled on the weekend or in the wee hours of the morning
when we are certain that the file is not needed.
-- Clarence.
In a distant galaxy, far, far, away, Muhlestein, Mark wrote:
> Is the source file locked, or the destination? If it's the source, maybe
> you could create a snapshot first, then copy from the snapshot, since
> that wouldn't have any openers on it. That also has the advantage that
> all the source files will be consistent in time.
>
> Mark
>
> -----Original Message-----
> From: Clarence Ngoh [mailto:cngoh@bigpond.net.au]
> Sent: Friday, March 21, 2003 7:31 PM
> To: Stephane Bentebba; Ngoh, Clarence; toasters(a)mathworks.com
> Subject: Re: Terminating CIFS sessions via CLI.
>
> The use of cifs terminate [user] terminates all the files opened by the
> user.
> What I am looking is something that will go into more detail i.e.
> terminating
> only "certain" files opened by the user not all the files.
>
> The reason for this is I am writing a script that will copy global
> templates
> from the master templates directory to the templates folder. If the
> file is
> in used by the user, the copy job will not proceed.
>
> Thanks for your replies so far.
>
> -- Clarence.
>
>
> On Fri, 21 Mar 2003 10:49 pm, in a distant galaxy, Stephane Bentebba,
>
> wrote:
> > filer cli provide the command :
> > cifs terminate { machine | user }
> > this let you terminate a cifs session for a user or a machine in
> > particular,
> > you can get users with the "cifs session" command :
> > <<
> > genghis:~/tmp# rsh nac cifs sessions
> > Server Registers as 'MYFILER' in group 'MYDOMAIN'
> > Root volume language is not set. Use vol lang.
> > Using the UNIX password database for authentication
> > Comment: Filer FPS
> > ========================================
> > PC (user) #shares #files
> > AMACHINE (user1 - user1) 1 0
> > ANOTHERMACHINE (user2 - user2)
> > 2 1
> >
> > as you can see, I used this command throught rsh, so you could get
>
> users
>
> > throught rsh, make a script wich parse the ouput and launch several
>
> rsh
>
> > cifs terminate user/machine as you need.
> >
> > bye
> >
> > Ngoh, Clarence wrote:
> > >Hi all
> > >
> > >I was wondering if any of you has attempted to kill a single or a set
>
> of
>
> > >CIFS sessions via CLI? After obtaining the files that are opened
>
> via
>
> > > cifs sessions on the filer, I wish to run a regexp through it and
>
> kill a
>
> > > set of opened files.
> > >
> > >Do you if there is a utility for Windows to do this via CLI or if
>
> there is
>
> > >an equivalent way of doing this via UNIX? The only method that I am
> > > limited to so far is using MMC to list the appropriate open files
>
> and
>
> > > terminating it.
> > >
> > >TIA.
> > >
> > >-- Clarence.
> > >
> > >
> > >************** IMPORTANT MESSAGE **************
> > >This e-mail message is intended only for the addressee(s) and
>
> contains
>
> > > information which may be confidential. If you are not the intended
> > > recipient please advise the sender by return email, do not use or
> > > disclose the contents, and delete the message and any attachments
>
> from
>
> > > your system. Unless specifically indicated, this email does not
> > > constitute formal advice or commitment by the sender or the
>
> Commonwealth
>
> > > Bank of Australia (ABN 48 123 123 124) or its subsidiaries.
> > > **************************************************