cifs mount & fstab entries
I've used the following mount
mount -t cifs -o credentials=/scripts/smbmount.credentials,gid=500,rw,file_mode=0770,dir_mode=0770 //server/shares/ /file/shares/ My questions are this 1) What FSTAB entry should I create? 2) Are there any options that would help keep this connection "alive and stable"? its being shared via SAMBA. |
Im having trouble unmounting the share using umount //share/name/ and umount.cifs. neither work. kick back a device in use error. I also tried -f
|
Are any session/processes accessing files on that share?
|
No. I even shut down samba. Seems strange but maybe i'm just not doing it right.
|
If you have mounted that share from the server to your client (ie where you are logged in) then you can't umount it if any process at all is using that mount, including if your current working dir (pwd) ie where you are, is on that mount. You have to cd elsewhere.
Otherwise check lsof, fuser. |
What is the proper syntax to unmount?
|
[root@~]# umount.cifs -f //server/shares
This utility only unmounts cifs filesystems. umount -f //server/shares WORKED! I had to be out of the dir and samba shutdown. If someone can look into the other two questions that would be great. |
Well for fstab something like
Code:
//server/shares/ /file/shares/ cifs user=smbmount,gid=500,rw,soft 0 0 As for 'stable', there's no option for that, you just have to keep your systems/network stable, like any other service. |
Im mounted the file system a different way using
mount -t cifs -o credentials=/scripts/smbmount.credentials,gid=500,rw,file_mode=0770,dir_mode=0770 //server/shares/ /file/shares/ How would this affect the fstab entry? Why is the syntax so different between fstab and mounting? |
ps: thank you
|
Actually, the easiest way is to
cat /etc/mtab after you've done the manual mount. You can pretty much cut 'n paste the relevant line into /etc/fstab. The system knows how to mount stuff, that's why the manual cmd is different, the system only needs to be told what to mount, where and any options. PS do NOT edit /etc/mtab(!) |
Ah thank you very much.
|
Chris:
I copied and pasted the info The options in mtab are cifs rw,mand 0 0 Should I manually add gid=500,rw,file_mode=0770,dir_mode=0770,soft ? |
If you want to... depends on what works for you.
|
Chris,
How can i tell if these options were applied to the original mount? gid=500,rw,file_mode=0770,dir_mode=0770,soft ? |
All times are GMT -5. The time now is 12:08 AM. |