+ Post New Thread
Results 1 to 15 of 15
*nix Thread, mounted Samba shares hang when laptop suspended in Technical; Hi I normally have some shares mounted on my laptop (mint) to a file server (windows) if i close the ...
  1. #1

    Join Date
    Mar 2013
    Location
    west sussex
    Posts
    519
    Thank Post
    74
    Thanked 26 Times in 26 Posts
    Rep Power
    14

    mounted Samba shares hang when laptop suspended

    Hi

    I normally have some shares mounted on my laptop (mint) to a file server (windows) if i close the lead and the laptop sits in the suspended/hibernated state the samba mounted shares hang the machine when i re open the lid and try to use them.

    any ideas?

    EDIT:

    seems if a program has something open it locks it. not always easy to find the program with file open
    Last edited by ConradJones; 23rd June 2013 at 11:26 PM.

  2. #2

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    You can use 'lsof' to find out what files a process has open. In this specific case, the +D option is probably what you want.

    Code:
    lsof +D /path/to/samba/mount/point
    Last edited by Geoff; 24th June 2013 at 09:48 AM.

  3. Thanks to Geoff from:

    ConradJones (24th June 2013)

  4. #3

    Join Date
    Mar 2013
    Location
    west sussex
    Posts
    519
    Thank Post
    74
    Thanked 26 Times in 26 Posts
    Rep Power
    14
    Quote Originally Posted by Geoff View Post
    You can use 'lsof' to find out what files a process has open.
    you could if it didn't hang like every thing else in sight.!


    i found it quicker to manually work out what had the open file, turned out to be vmware workstation and an ISO on the software share.

  5. #4
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    887
    Thank Post
    84
    Thanked 234 Times in 193 Posts
    Rep Power
    82
    Lazy unmount on sleep / remount? See script at https://bugs.launchpad.net/ubuntu/+s...864/comments/3

  6. Thanks to Marci from:

    ConradJones (24th June 2013)

  7. #5

    Join Date
    Mar 2013
    Location
    west sussex
    Posts
    519
    Thank Post
    74
    Thanked 26 Times in 26 Posts
    Rep Power
    14
    "If there are open files on the share we have problems again... but otherwise it works fine."

    Last line!

  8. #6
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    887
    Thank Post
    84
    Thanked 234 Times in 193 Posts
    Rep Power
    82
    Sorry, started googling for the script before your edit / other replies... the following could probably be popped into the stop function to check for locked files and kill the parent process causing the lock (altho you'd lose anything unsaved)
    Code:
    if [ '/usr/bin/smbstatus | grep DENY | wc -l' != "0" ]
    then
    fuser -m -k /{mount path}
    fi
    Last edited by Marci; 24th June 2013 at 10:25 AM.

  9. #7

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Googling around yields a few suggestions. Are you using wireless to access the samba server? Doesn't doing suspend vs hibernate make a difference?

  10. #8

    Join Date
    Mar 2013
    Location
    west sussex
    Posts
    519
    Thank Post
    74
    Thanked 26 Times in 26 Posts
    Rep Power
    14
    Quote Originally Posted by Geoff View Post
    Googling around yields a few suggestions. Are you using wireless to access the samba server? Doesn't doing suspend vs hibernate make a difference?
    yes
    wireless

    and @Marci i think killing the parent process maybe a little extreme,

  11. #9

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Ok, what wireless driver are you using?

  12. #10

    Join Date
    Mar 2013
    Location
    west sussex
    Posts
    519
    Thank Post
    74
    Thanked 26 Times in 26 Posts
    Rep Power
    14
    its an

    "Intel Corporation Centrino Advanced-N 6200 (rev 3e)"

    lsmod - i'm not a 100% which one is the wireless card.

    Code:
    conrad@conrad-laptop ~ $ lsmod
    Module                  Size  Used by
    pci_stub               12622  1 
    vboxpci                23194  0 
    vboxnetadp             25670  0 
    vboxnetflt             23479  0 
    vboxdrv               320372  3 vboxnetadp,vboxnetflt,vboxpci
    ip6table_filter        12815  0 
    ip6_tables             27025  1 ip6table_filter
    ebtable_nat            12807  0 
    ebtables               30642  1 ebtable_nat
    ipt_MASQUERADE         12759  3 
    iptable_nat            12810  1 
    nf_nat_ipv4            13263  1 iptable_nat
    nf_nat                 25866  3 ipt_MASQUERADE,nf_nat_ipv4,iptable_nat
    nf_conntrack_ipv4      14487  2 
    nf_defrag_ipv4         12729  1 nf_conntrack_ipv4
    xt_state               12578  1 
    nf_conntrack           83275  6 ipt_MASQUERADE,nf_nat,xt_state,nf_nat_ipv4,iptable_nat,nf_conntrack_ipv4
    ipt_REJECT             12541  2 
    xt_CHECKSUM            12549  1 
    iptable_mangle         12695  1 
    xt_tcpudp              12603  5 
    iptable_filter         12810  1 
    ip_tables              26995  3 iptable_filter,iptable_mangle,iptable_nat
    x_tables               29803  11 ip6table_filter,xt_CHECKSUM,ip_tables,xt_tcpudp,ipt_MASQUERADE,xt_state,iptable_filter,ebtables,ipt_REJECT,iptable_mangle,ip6_tables
    vmnet                  55771  13 
    bridge                 99533  0 
    stp                    12976  1 bridge
    llc                    14552  2 stp,bridge
    btusb                  22474  0 
    vsock                  52886  0 
    vmci                   93386  1 vsock
    vmmon                  76108  0 
    joydev                 17377  0 
    dm_crypt               22820  1 
    tpm_infineon           17410  0 
    arc4                   12615  2 
    coretemp               13355  0 
    iwldvm                241834  0 
    kvm_intel             132891  0 
    mac80211              606457  1 iwldvm
    kvm                   443165  1 kvm_intel
    snd_hda_codec_hdmi     36913  1 
    snd_hda_codec_realtek    78399  1 
    snd_hda_intel          39619  3 
    snd_hda_codec         136453  3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
    snd_hwdep              13602  1 snd_hda_codec
    uvcvideo               80847  0 
    videobuf2_vmalloc      13056  1 uvcvideo
    videobuf2_memops       13202  1 videobuf2_vmalloc
    videobuf2_core         40513  1 uvcvideo
    snd_pcm                97451  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
    videodev              129260  2 uvcvideo,videobuf2_core
    snd_page_alloc         18710  2 snd_pcm,snd_hda_intel
    snd_seq_midi           13324  0 
    snd_seq_midi_event     14899  1 snd_seq_midi
    snd_rawmidi            30180  1 snd_seq_midi
    snd_seq                61554  2 snd_seq_midi_event,snd_seq_midi
    microcode              22881  0 
    snd_seq_device         14497  3 snd_seq,snd_rawmidi,snd_seq_midi
    psmouse                95870  0 
    snd_timer              29425  2 snd_pcm,snd_seq
    intel_ips              17978  0 
    toshiba_acpi           18718  0 
    tpm_tis                18675  0 
    serio_raw              13215  0 
    lpc_ich                17061  0 
    iwlwifi               173477  1 iwldvm
    cfg80211              510937  3 iwlwifi,mac80211,iwldvm
    sparse_keymap          13890  1 toshiba_acpi
    wmi                    19070  1 toshiba_acpi
    toshiba_bluetooth      12852  0 
    snd                    68876  16 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device
    mei                    41158  0 
    soundcore              12680  1 snd
    mac_hid                13205  0 
    bnep                   18036  2 
    parport_pc             28152  0 
    ppdev                  17073  0 
    rfcomm                 42641  12 
    bluetooth             228619  22 bnep,btusb,rfcomm
    lp                     17759  0 
    parport                46345  3 lp,ppdev,parport_pc
    binfmt_misc            17500  1 
    i915                  600351  9 
    ahci                   25731  2 
    libahci                31364  1 ahci
    video                  19390  1 i915
    i2c_algo_bit           13413  1 i915
    drm_kms_helper         49394  1 i915
    sdhci_pci              18590  0 
    drm                   286313  5 i915,drm_kms_helper
    sdhci                  32522  1 sdhci_pci
    e1000e                198787  0

  13. #11


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    iwlwifi

  14. Thanks to CyberNerd from:

    ConradJones (26th June 2013)

  15. #12

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    The linux driver for your Intel wifi card uses a binary firmware blob to operate. The bug causing the issue is within this binary firmware. Only intel can fix this properly. You can mitigate the situation by disabling the power saving features.

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594511

    I would also strongly suggest you avoid hardware that doesn't have open specs where ever possible in future.
    Last edited by Geoff; 26th June 2013 at 09:01 AM.

  16. #13

    Join Date
    Mar 2013
    Location
    west sussex
    Posts
    519
    Thank Post
    74
    Thanked 26 Times in 26 Posts
    Rep Power
    14
    Quote Originally Posted by Geoff View Post
    I would also strongly suggest you avoid hardware that doesn't have open specs where ever possible in future.
    Unfortunately my primary concern when buying this laptop was that it had a real serial port which are as rare as rocking horse something these days.

  17. #14


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    oops posted to wrong thread.
    I find USB to serial quite good on linux as the drivers are generally built in

  18. #15

    Join Date
    Mar 2013
    Location
    west sussex
    Posts
    519
    Thank Post
    74
    Thanked 26 Times in 26 Posts
    Rep Power
    14
    i was using windows at the time, but its also something to forget to put in the laptop bag, where as if your setting up a new switch you almost always get a normal serial lead with it.

    i just find the usb to serial just one more thing which is unecessary as far as i am concerned, they've only removed the serial ports as a cost saving exercise.

SHARE:
+ Post New Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •