Trouble deleting files on SMB share on OmniOS?

Discussion in 'Solaris, Nexenta, OpenIndiana, and napp-it' started by altano, Mar 26, 2018.

  1. altano

    altano Active Member

    Joined:
    Sep 3, 2011
    Messages:
    135
    Likes Received:
    28
    I have a ZFS pool shared out over SMB on OmniOS+napp-it. I just hit a weird issue: I created a test folder with a test file in it. When trying to delete this folder or file from a Windows machine over SMB, I got no errors but the folder would not delete. It was as if I did nothing.

    So I ssh'd into the OmniOS host and just rm'd the file and directory: no errors, and now it's actually gone. Has anyone seen anything like this?
     
    #1
  2. Rand__

    Rand__ Well-Known Member

    Joined:
    Mar 6, 2014
    Messages:
    3,587
    Likes Received:
    542
    have you set additional windows acls? Have you checked logs?
     
    #2
  3. altano

    altano Active Member

    Joined:
    Sep 3, 2011
    Messages:
    135
    Likes Received:
    28
    I was getting disk errors in the dmesg logs but that was a red herring. Where can I find logs related to the smb delete operation?

    I have additional Windows ACLs but the user doing the delete was the owner of the whole directory tree and there were no permission errors.
     
    #3
  4. gea

    gea Well-Known Member

    Joined:
    Dec 31, 2010
    Messages:
    2,261
    Likes Received:
    750
    One problem I am aware of is
    Bug #8583: Windows 10 fails to delete read-only files with SMB2 - illumos gate - illumos.org

    Another reason I have seen is when someone has the file open. With OSX I have seen such a problem persistent when the Mac crashed. A SMB service restart was needed (I have not waited to see if there was a timeout)

    about log
    Critical errors are in the system logs. You can also check the local console for messages.
    For internals start the following at console prior delete (maybe for developers only)
    dtrace -s /usr/lib/smbsrv/dtrace/smbsrv.d
     
    #4
  5. altano

    altano Active Member

    Joined:
    Sep 3, 2011
    Messages:
    135
    Likes Received:
    28
    FWIW in case anyone sees this in the future, the bug @gea linked to is exactly what I was hitting. I was able to verify because I hit it again: deleted files were silently remaining on the filesystem. I checked and they were read-only, and removing the read-only flag allowed them to be properly deleted.

    *shrug*
     
    #5
Similar Threads: Trouble deleting
Forum Title Date
Solaris, Nexenta, OpenIndiana, and napp-it Trouble Initializing Disks OmniOS / Napp-it Apr 12, 2019
Solaris, Nexenta, OpenIndiana, and napp-it Trouble installing OmniOS on X11SSH-CTF with NVME M.2 PCIe Drive Aug 27, 2018
Solaris, Nexenta, OpenIndiana, and napp-it Performance troubleshooting. Aug 19, 2018
Solaris, Nexenta, OpenIndiana, and napp-it Trouble installing OmniOS on X11SSL-F Apr 24, 2016
Solaris, Nexenta, OpenIndiana, and napp-it Troubleshooting help needed: Server goes unresponsive. Sep 16, 2015

Share This Page