Contents |
This works on both FreeBSD and DragonFly BSD. It should work on any OS that uses the BSD amd daemon.
See http://docs.freebsd.org/info/amdref/amdref.info.Home_Directories.html
The host is running FreeBSD -current 7.x
[faith] ~> cat /etc/exports /usr -alldirs -maproot=root -network 192.168.45.0 -mask 255.255.255.0
[faith] ~> showmount -e Exports list on localhost: /usr 192.168.45.0
The client is DragonFly BSD -current running as a guest OS under Qemu. Networking is enabled using the tun/tap interface.
[faith-df] ~> grep amd /etc/rc.conf amd_enable="YES" amd_flags="-l syslog /homes /etc/amd.homes -cache:=inc /net /etc/amd.net -cache:=inc"
[faith-df] ~> cat /etc/amd.homes /defaults type:=link # All the entries are of type:=link shanu fs:=/net/faith/shanu
[faith-df] ~> cat /etc/amd.net /defaults opts:=rw,intr,nodev,grpid,suid,nfsv3,tcp faith host!=faith;type:=nfs;rhost:=faith;rfs:=/usr/home
Update $HOME to point to /homes/shanu on hosts where automounting is setup.
[faith-df] ~> sudo pw usermod shanu -d /homes/shanu [faith-df] ~> finger shanu Login: shanu Name: Shanker Balan Directory: /homes/shanu Shell: /bin/tcsh On since Fri Apr 6 16:28 (IST) on ttyp0 from 192.168.45.1 No Mail. Plan: Go Away! [faith-df] ~>
[faith] ~> ssh qemu-df
shanu@qemu-df.shanu.net's password:
Last login: Fri Apr 6 16:28:24 2007 from 192.168.45.1
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.
DragonFly 1.7.0-DEVELOPMENT (GENERIC) #0: Wed Sep 6 01:59:51 IST 2006
Welcome to DragonFly!
[faith-df] ~> pwd
/.amd_mnt/faith/usr/home/shanu
[faith-df] ~> amq / root "root" faith-df:(pid77990) /homes toplvl /etc/amd.homes /homes /net toplvl /etc/amd.net /net /net/faith nfs faith:/usr/home /.amd_mnt/faith/usr/home /homes/shanu link ./net/faith/shanu /net/faith/shanu [faith-df] ~>
[faith] ~> showmount -a All mount points on localhost: 192.168.45.2:/usr/home 192.168.45.2:/usr/home/shanu 192.168.45.2:/usr/pkgsrc
Neat eh?