[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is sshfs usable and sensible as home directory file system?



On Thu, Jun 27, 2013 at 09:28:39AM +0200, Petter Reinholdtsen wrote:
> [Petter Reinholdtsen]
> > We can disable autofs on diskless workstations and use sshfs
> > instead.  The question is, do we want to?
> 
> I ran the file system test from <URL:https://github.com/gebi/fs-test>,
> and got this result:
> 
>   Testing POSIX/Unix sematics on file system
>   info: testing symlink creation
>   info: testing hard link creation
>    error: link() succeeded but link count was not incremented
>   info: testing subdirectory creation
>   info: testing umask effect on file creation
>     error: Wrong file mode 664 when creating using mode 666 and umask 000
>   info: sqlite worked
>   info: testing fcntl locking
>     Read-locking 1 byte from 1073741824
>     Read-locking 510 byte from 1073741826
>     Unlocking 1 byte from 1073741824
>     Write-locking 1 byte from 1073741824
>     Write-locking 510 byte from 1073741826
>     Unlocking 2 byte from 1073741824
> 
> So umask and hardlink handling is broken.  The umask problem will
> affect file sharing using NFS on shared directories, while the
> hardlink issue probably will not affect many programs.
> 
> Disabling autofs will make it harder to make sure shared directories
> are mounted on all clients too, so if we drop autofs on diskless
> workstations, I guess the umask problem matter less than the lack of
> easy sharing of files. :)
 
I believe to have choice for diskless workstations would be good.

(1) Run without any configuration: access home dirs via sshfs, use ldm 
to login.

(2) Run like before in Squeeze: add them to LDAP, use NFS. This needs 
further configuration: kdm, gdm3 or lightdm must be used to log in, so 
DEFAULT_DISPLAY_MANAGER must be set (full path) in lts.conf, LDAP or 
kernel commandline (pxeboot).

I modified /usr/share/ltsp/init-ltsp.d/60-edu-diskless-ws to have (1) 
available again. (Some other change too, due to new version of 
nsswitch.conf.)

---------------------------------------------------------------
#!/bin/sh
# For Debian Edu diskless workstations (i.e. ltsp fat clients).
# As dns service is available, modify priority to make KERBEROS work.#
if boolean_is_true "$LTSP_FATCLIENT"; then
    if [ -z "$DEFAULT_DISPLAY_MANAGER" ]; then
        # Disable autofs to let sshfs mount home dir.
        update-rc.d autofs disable 2 >/dev/null  2>&1
	else
	    sed -i '/automount/ s/files\ ldap/ldap/' /etc/nsswitch.conf
	    sed -i s/files\ dns\ dns/dns\ files/ /etc/nsswitch.conf
	    # Enable services, just to be sure.
	    for service in autofs nfs-common nslcd nscd ; do
    		update-rc.d $service enable 2 >/dev/null  2>&1
	    done
    fi
    # Fix proxy setting
    dhclient -nw
fi
---------------------------------------------------------------

LTSP configuration in LDAP would have to be changed too, cause lightdm 
is blacklisted by default in LTSP.

Tested everything: The simple way to get the missing Kerberos TGT when 
running (1) does't work, cause the REALM isn't set right. The hard way 
(x-termial, kinit) works.

I wonder, if I should commit this.
 
Wolfgang

Attachment: signature.asc
Description: Digital signature


Reply to: