You are not logged in.

#1 2014-08-27 02:42:04

maseone
Member
Registered: 2014-08-27
Posts: 11

CIFS Mount Help

Intro:

Hi, I'm new to Arch Linux and pretty new to Linux in general.  I'll start by stating my system setup, then overall goals, then will explain what method I used to attempt these goals and then explain where I'm running into issues.  Maybe someone else had the same CIFS mounting goals and achieved them in Arch.

Relevant System Setup

- Current Arch
- Current Gnome3 (minimal install) w/ GDM
- ThinkPad x230

Overall Goals:

- Upon user login mount a CIFS share if it's available
- After a user login mount a CIFS share if it becomes available
- On logout properly unmount the CIFS share if it's mounted
- No errors in the log!  smile

Method attempted:

- fstab using the "x-systemd-automount" option

//server/data /media/data cifs credentials=/home/someuser/.smbcredentials,user,users,uid=someuser,x-systemd.automount,iocharset=utf8,sec=ntlm 0 0

- NetworkManager dispatcher script

#!/bin/sh
case "$2" in
    up)     
        if [ "$CONNECTION_UUID" = "<my_lan_UUID>" ] || [ "$CONNECTION_UUID" = "<my_wifi_UUID>" ]; then
                mount /media/data &
        fi
        ;;
    down)
        umount -a -l -t cifs
        ;;
esac
What's working:

- Upon user login mount a CIFS share if it's available

What's not working:

- After a user login mount a CIFS share if it becomes available
- On logout properly unmount the CIFS share if it's mounted
- Errors in the log during boot (before login)
- Errors in the log during shutdown (plug a minute and 30 second wait for the CIFS mount that never unmounts as it should)


While I really like the concepts behind this method I'm open to suggestions if my goals are simply not possible using this method.  If I'm leaving out any usful info let me know and I'll add it.  What I have so far is a result of hours of research on the archlinux wiki and forums (and duckduckgo/google).  If you know of any good articles that I may have missed I'd love to check them out.  If they're articles I've already read I'll post with why it didn't work for me along with any errors I was unable to figure out.


thanks!
maseone

Offline

Board footer

Powered by FluxBB