Sporadically Unable to Read/Write/Eject Shared Network Volume

Discussion in 'macOS' started by ICEBreaker, Jul 24, 2008.

  1. ICEBreaker macrumors 6502

    Joined:
    Aug 12, 2007
    #1
    Hi troubleshooters,

    I wonder if you could help me troubleshoot a problem I have with my shared network volume. I have my iMac and PC connected to each other through the ethernet. The iMac is set to read/write the shared network volumes on my PC. The Finder is used to set up the SMB connection. Everything works fine. Mac applications are able to read and write files to the PC.

    However, after a day or so (during which the PC has been kept on, while the Mac has slept) problems occur. It seems as if it is possible to access the network volumes and even view the root directory. However, clicking on any directory will show a blank directory.

    Attempts to read/write to the directory results in the following error message:
    Code:
    Sorry, the operation could not be completed because unexpected error occurred. 
    (Error code - 1407)
    Attempts to eject the shared volume results in the following error message:
    Code:
    A disk on 'pcxp' is in use and could not be ejected. 
    Try quitting applications and try again.
    In terminal, I attempt to identify the open files:
    Code:
    lsof | egrep 'pcxp'
    and get the following result:
    Code:
    lsof: WARNING: can't stat() smbfs file system /Volumes/Share
          Output information may be incomplete.
          assuming "dev=2f00000a" from mount table
    Dock      96534 user   10r     DIR       14,2       340    896612 /Users/user/Shortcuts/pcxp
    I try to kill the dock's connection to the open file:
    Code:
    kill -9 96534
    The dock is relaunched but the problem remains, this time with a new process number 97642.

    When I try to restart my iMac, the desktop will close, and only my wallpaper remains. There, it will remain hung until I do a cold boot.

    Can anyone figure out what is wrong. It's pretty annoying to have to reboot my Mac daily.

    Thanks a lot for your help!
    JC
     
  2. ICEBreaker thread starter macrumors 6502

    Joined:
    Aug 12, 2007
  3. ICEBreaker thread starter macrumors 6502

    Joined:
    Aug 12, 2007
    #3
    So everybody is doing well on their shared PC folders? No one has problems?
     
  4. Trajectory macrumors 6502a

    Joined:
    Nov 13, 2005
    Location:
    Earth
  5. ICEBreaker thread starter macrumors 6502

    Joined:
    Aug 12, 2007
  6. miguy2k macrumors newbie

    Joined:
    Dec 6, 2007
    #6
    LMAO, I was about to reply having the same issue. Then, while trying to reproduce the steps I took, I figured out the solution :D

    So I *had* exactly the same problem here between my Mac Pro and my XP PC. Same usage pattern (PC stays on, Mac sleeps every night). Fortunately, I only *had* this issue once in about two weeks, but it *was* annoying as hell!!

    Some additional info I can provide on the issue's behavior:

    First off, I had 3 smb filesystems mounted when it happened. Let's call them [smb1], [smb2] and [smb3] here. So I did the following:

    • At first,
      Code:
      ls -al /Volumes
      -> yields only the local mounts, no smb mounts whatsoever.
    • Code:
      sudo umount /Volumes/[smb1]
      -> HANGS, yes it blocks the terminal, tried to kill -9 the umount process without any success!!
    • At this point, a simple
      Code:
      ls -al /Volumes
      -> also HANGS the terminal.
    • lsof yields the following:
      Code:
      lsof: WARNING: can't stat() smbfs file system /Volumes/[smb2]
            Output information may be incomplete.
            assuming "dev=2d000005" from mount table
      lsof: WARNING: can't stat() smbfs file system /Volumes/[smb3]
            Output information may be incomplete.
            assuming "dev=2d000006" from mount table
      

    I was right about to give up and hard reset the machine again when I tried the following:
    Code:
    sudo umount -f /Volumes/[smb2]
    All of a sudden, the finder flashed a window (had no chance to see what it was) and the previously hanging ls and umount processes were gone!! The finder GUI listed the smb shares on the remote server again and everything seems fine again!

    So the steps to solve the issue would be:
    1. Run "lsof" in terminal
    2. See about what smb mounts it complaints
    3. sudo umount -f [any_failing_smb_mount]

    Be aware though, that unmounting a filesystem using the force flag may produce unexpected results, but I guess it's better than hard resetting the Mac and thus hitting the HDDs every day ;-)

    Greetings,
    Mike
     
  7. ICEBreaker thread starter macrumors 6502

    Joined:
    Aug 12, 2007
    #7
    Hi miguy2k!!! It's very kind of you to give such a detailed reply. Thanks a lot. No one else has bothered to help out in all these years. Next time I have this problem, I would surely give your solution a try. Thank you once again.
     
  8. oldio macrumors newbie

    Joined:
    Mar 30, 2008
    Location:
    Montreal, Canada
  9. pdoyley macrumors newbie

    Joined:
    Oct 21, 2009
    #9
    Works good, However

    Awesome, and thank you!!

    Things to note:
    losf hung on me, had to issue a control c to exit.

    When I issued umount, it also hung, and could not control c to exit.

    I probably could have killed the process, however I elected to close the term.

    Now all is good, and no need to reboot! yippee..
     

Share This Page