From WikiDLXTV
Revision as of 22:36, 27 January 2011 by (Talk | contribs) (added proto=tcp tip for nfs)

Jump to: navigation, search

Example net.mounts to demonstrate options of xmount to be used in auto-mounting of network shares.

note: that if you store a net.mounts file in /conf/ then it will ALSO execute on startup.

Mount a windows file share (must be done by IP address)

xmount "//" "ShareName" cifs

if your "guest" account is disabled, you must supply username and password

xmount "//" "ShareName" cifs "user=username,pass=password"

Mount an NFS share

xmount ShareName nfs

note: some NFS's have problems with the default mount option of UDP. If you have issues playing or listing content, then add proto=tcp as the fourth parameter.

Mount a remote FTP

to find advanced options execute: curlftpfs --help

xmount "" "FTP Name" ftpfs "-o user=UserName:Password -o Option2"

Mount a remote SSH server

sshfs *requires* keyless login
you can view your public key by executing: ssh-public-key
add your key to a remote machine by executing: ssh-copy-id user@server
to find options execute: sshfs --help

xmount "User@ServerName:Directory" "Server Name"sshfs "-o follow_symlinks"

combine previous xmounts using unionfs

unionfs takes a colon delimited list of 'ShareNames' and aggregates their content to the target directory structure is preserved. The following is an example, it mounts 4 remote shares 'hidden' so they are not visible in the OSD and then aggregates them. you hide an xmount by preceeding its 'ShareName' with a . (dot)

xmount ""   ".movies1"  nfs
xmount ""   ".movies2"  nfs
xmount "" ".movies3"  nfs
xmount ""  ".movies4"  nfs  
xmount ".movies1:.movies2:.movies3:.movies4"  "ShareUnion"  unionfs