我有两个VM,一个在Ubuntu17.04上,一个在Windows 10上,在它们之间我有一个挂载的文件夹来共享文件。这个文件夹是用CIFS安装在Ubuntu上的。我的安装在2-3天前一直运行良好,但是现在当我启动Ubuntu时,文件夹被正确地挂载,并且我可以通过Ubuntu访问Windows上的文件,但是几分钟后--大约半个我们--当我尝试访问这个文件夹或者做一个LS或者任何指向这个文件夹的操作时,我的终端就会挂起,我不能做任何其他的事情。
syslog的输出:
Apr 26 15:45:55 frontierland kernel: [ 6360.152349] INFO: task mount.cifs:9755 blocked for more than 120 seconds.
Apr 26 15:45:55 frontierland kernel: [ 6360.152352] Not tainted 4.4.0-75-generic #96-Ubuntu
Apr 26 15:45:55 frontierland kernel: [ 6360.152353] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Apr 26 15:45:55 frontierland kernel: [ 6360.152355] mount.cifs D ffff880135c3fbe8 0 9755 1 0x00000004
Apr 26 15:45:55 frontierland kernel: [ 6360.152358] ffff880135c3fbe8 ffff8801368fecb8 ffff880138688e00 ffff8800b65faa00
Apr 26 15:45:55 frontierland kernel: [ 6360.152360] ffff880135c40000 ffff8800ba19c624 ffff8800b65faa00 00000000ffffffff
Apr 26 15:45:55 frontierland kernel: [ 6360.152361] ffff8800ba19c628 ffff880135c3fc00 ffffffff81837845 ffff8800ba19c620
Apr 26 15:45:55 frontierland kernel: [ 6360.152363] Call Trace:
Apr 26 15:45:55 frontierland kernel: [ 6360.152368] [<ffffffff81837845>] schedule+0x35/0x80
Apr 26 15:45:55 frontierland kernel: [ 6360.152370] [<ffffffff81837aee>] schedule_preempt_disabled+0xe/0x10
Apr 26 15:45:55 frontierland kernel: [ 6360.152372] [<ffffffff81839729>] __mutex_lock_slowpath+0xb9/0x130
Apr 26 15:45:55 frontierland kernel: [ 6360.152373] [<ffffffff818397bf>] mutex_lock+0x1f/0x30
Apr 26 15:45:55 frontierland kernel: [ 6360.152387] [<ffffffffc02e9a8e>] cifs_get_smb_ses+0x22e/0x690 [cifs]
Apr 26 15:45:55 frontierland kernel: [ 6360.152396] [<ffffffffc02ea54b>] cifs_mount+0x65b/0xdc0 [cifs]
Apr 26 15:45:55 frontierland kernel: [ 6360.152399] [<ffffffff811f0ef4>] ? __kmalloc_track_caller+0x1b4/0x250
Apr 26 15:45:55 frontierland kernel: [ 6360.152405] [<ffffffffc02d58c8>] cifs_do_mount+0x118/0x5c0 [cifs]
Apr 26 15:45:55 frontierland kernel: [ 6360.152408] [<ffffffff811e2b1c>] ? alloc_pages_current+0x8c/0x110
Apr 26 15:45:55 frontierland kernel: [ 6360.152410] [<ffffffff81212e98>] mount_fs+0x38/0x160
Apr 26 15:45:55 frontierland kernel: [ 6360.152412] [<ffffffff8122f527>] vfs_kern_mount+0x67/0x110
Apr 26 15:45:55 frontierland kernel: [ 6360.152414] [<ffffffff81231bdf>] do_mount+0x25f/0xda0
Apr 26 15:45:55 frontierland kernel: [ 6360.152416] [<ffffffff81232a5f>] SyS_mount+0x9f/0x100
Apr 26 15:45:55 frontierland kernel: [ 6360.152418] [<ffffffff8183b972>] entry_SYSCALL_64_fastpath+0x16/0x71我正在通过FSTAB挂载这样的文件夹
//fantasyland/Media /home/mickey/WindowsShare cifs _netdev,credentials=/home/mickey/.smbcredentials,iocharset=utf8,sec=ntlm,nosetuids,noperm 0 0我用Ubuntu的新安装做了测试,但问题仍然是一样的.我想知道是不是一个包裹造成了这个问题,但是我不知道是哪一个。
我不知道为什么会突然发生这种事。知道我能去哪找吗?
谢谢大卫
发布于 2017-05-04 06:45:18
因此,我找到了解决方案,方法是在fstab挂载中添加vers=3.0,如下所示
//servershare /ShareMount cifs vers=3.0,凭据=/home/user/.smb凭据、iocharset=utf8、sec=ntlm、nosetuid、noperm 0 0
我已经测试了这个修改从22小时现在,我不会再经历任何中断。
https://askubuntu.com/questions/909930
复制相似问题