Community

Subscribe
Highlighted

Who has a file locked?

Users have been complaining from time to time about files being locked. They can't edit, delete or rename them. They are accessing them from a windows PC via share. So \\nafs1\departments\marketing\file1.doc for example.

I saw online how you can connect to the system via MMC but I can't see any storage, shares, etc. Perhaps because it's using my AD credentials instead of root?

Anyway, I also saw online how I could run the following command and find out who had a lock on it. But I'm not seeing from the output how to determine that. The user has rebooted their machine and immediately browsed to the share and cannot do anyting to the file. She thinks perhaps our backup software has it locked?

I ran this:

lock status -f "/vol/departments/marketing/file1.doc" -p cifs

And got this back:

========037903a5:015b50bc

CIFS path=\departments\marketing\file1.doc(/vol/departments/marketing/file1.doc) host=xxx.xxx.xxx.xxx(pc-name) owner=smithj state=GRANTED mode=Read-denyW oplock=None

If I run this, I can then break the lock and proceed as planned:

lock break -f "/vol/departments/marketing/file1.doc" -p cifs

So questions:

1. Who has the file locked?
2. How is it possible it's locked when she's the only one using it?

3. How can a user fix this on the fly or we prevent it from continually happening?

4. Why can't I do this via MMC? The exact error I get is "you do not have permissions to see the list of shares for Windows clients"

Re: Who has a file locked?

It is similar to what we are facing...intrested to see the responses....

Re: Who has a file locked?

We're seeing similar issues, but still trying to narrow it down also.  Will keep an eye on this thread.

Regarding the MMC, you need to have an AD account which has admin rights on the storage controller.  Start mmc.exe on your Windows PC/Server logged in as that user (or Shift-Right-Click and open as that user), then add the 'Shared Folders' snap-in and point it at the controller name.  You should them be able to view/edit/manage shares, etc and also view Open Files.  It's not uncommon to have to unlock files (eg when a user has left a file open on their laptop, etc).

Re: Who has a file locked?

still nothing unfortunately. surprised no one from Netapp has chimed in. used to better forum participation by vendors. I don't see how to add my ad username in the configuration. only local user accounts.

Re: Who has a file locked?

On the console: useradmin help domainuser

So, you would do something like this:

useradmin domainuser add <domain>\<user> -g Administrators

...to add your ad account as a local admin.

If you are using vfilers you'll need to do the same on each of them, eg:

vfiler run <vffiler_name> useradmin domainuser add <domain>\<user> -g Administrators

Once you are an administrator, you can manage CIFS shares/locked files/etc via the MMC.

If you need more details they can be found by reading the CIFS sections in the 'File Access and Protocol Management Guide' which can be downloaded from support.netapp.com.

Re: Who has a file locked?

So there’s no other AD partnership settings that need to take place? How do I verify if I’m using vfilers?

Blake

Re: Who has a file locked?

I'm presuming you're filer is connected to an AD domain, right?  Command Line: cifs domaininfo

If so, you add your domain user to the local Administrators group using the above commands (it's no different than doing the same on a Windows box).

I'd encourage you to read the admin guide mentioned above to familiarise yourself with CIFS administration on NetApp systems.

If the issue is just locked user files, you can use the MMC on a Windows box to manage the controller and unlock files, etc.

If the issue is with files incorrectly/intermittently denying access to user requests due to some other issue, I'd be interested.

Re: Who has a file locked?

Thanks Gardinec_Ebrd. That worked perfectly!

Re: Who has a file locked?

I’d be interested too in below issue.

“If the issue is with files incorrectly/intermittently denying access to user requests due to some other issue, I'd be interested”

Regards

Vijay

TPS – Informatica – Admin Team

Informatica sharepoint site: http://sharepoint/sites/TPS/Informatica/Forms/AllItems.aspx

Informatica Sharepoint wiki: http://sharepoint/sites/TPS/Informatica%20wiki/Home.aspx

VOIP: 040-67480303

Mobile: 7893623453