LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problems with SMB shares after suspend/restore (https://www.linuxquestions.org/questions/linux-networking-3/problems-with-smb-shares-after-suspend-restore-383809/)

sjr 11-16-2005 05:49 PM

Problems with SMB shares after suspend/restore
 
I'm having a problem on a laptop running SUSE Linux 10.0: After doing a suspend to disk and then a restore, the SMB shares, which are automounted from /etc/fstab, don't work. I have to unmount and then remount them, which doesn't always work -- for example, if Konqueror was showing a directory in one of the shares, I have to kill Konqueror after the restore, and then I can't unmount the share.

Is there a way around this problem that anyone knows of? Are there some fstab parameters that I need? Here are the entries in fstab:
Code:

//linkstation/Pictures /Pictures        smbfs  auto,password= 0 0
//linkstation/steve /home/steve/mnt/linkst_steve smbfs auto,rw,credentials=/home/steve/linkstcreds,uid=steve,gid=users,nomand 0 0

BTW, these shares are on a NAS drive, which gives practically no options for these -- so it's not like I can change some options in /etc/samba/smb.conf.

nx5000 11-17-2005 10:51 AM

From man hibernate.conf:

UnmountFSTypes <fs type> : Unmounts any filesystems of the given types. This is most useful for network filesystems such as smbfs and nfs.


so try to add this in /etc/hibernate.conf:

Code:

UnmountFSTypes smbfs
Mount //linkstation/steve //linkstation/steve


sjr 11-17-2005 05:02 PM

Thanks for the tip; I'll try it. Strange, though, I don't have /etc/hibernate.conf and "man hibernate.conf" didn't show anything either.

nx5000 11-18-2005 02:26 AM

So it means you are using suspend1 and not suspend2.

I don't if there is an option or a configuration file for suspend1. If there is not, you have to do it yourself (umount them before, remount after)

How do you launch the hibernation?

By pressing a button, by calling a script? like swsusp (man swsusp)

sjr 11-18-2005 05:41 PM

There are several ways to hibernate, e.g. close the lid, select "Suspend Computer" from the KDE log out menu. I'm not sure what script is called to do so. "man swsusp" and "info swsusp" did work, but didn't have much information. I'll look around on the system and online for more.

sjr 11-19-2005 10:40 PM

Fixed. The suspend scripts for my machine are in /usr/lib/powersave/scripts; the key one was sleep_helper_functions, which has a function to unmount FAT and NTFS drives before suspending. I added "smbfs" as a type to unmount. Had to fiddle a little bit with the remounting logic, but got it to work.

I don't know how specific these scripts are to SUSE, but if anyone wants to see what I did, let me know and I can post the revised script.


All times are GMT -5. The time now is 07:00 PM.