Difference between revisions of "Net.mounts"

From WikiDLXTV
Jump to: navigation, search
Line 24: Line 24:
 
if your "guest" account is disabled, you must supply username and password
 
if your "guest" account is disabled, you must supply username and password
 
  xmount "//192.168.0.34/ShareName" "ShareName" cifs "user=username,pass=password"
 
  xmount "//192.168.0.34/ShareName" "ShareName" cifs "user=username,pass=password"
 +
 +
'''How to know what the "ShareName" of the USB drive is:'''
 +
Note: the ShareName is not usually the same as the hostname.
 +
With your web browser, type in the ip address of the WDTV device to access the Web Frontend. Login with "wdlxtv" for both username and password as default. Click on telnet client to access ssh. Login with "root" as username and the default password is blank (blank=empty - It is suggested: change immediately using telnet, SSH *won't* work!!) Next type this:
 +
smbclient -L 192.168.x.x
 +
where the ip is the address your host device.
 +
it should give you a listing of the USB drive Sharename's that are on the host device.
  
  

Revision as of 03:26, 11 April 2011

net.mounts is a file that can be put on either a usb drive connected to WDTV or in /conf directory on the WDTV itself. It will mount network shares on boot which can then be accessed as local drive on the WDTV.


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.


To see NFS/CIFS/XFS/ReiserFS/NDAS devices, you must either:

  • have a supported drive/flashdisk plugged in for xmounts to appear

OR

  • have CIFSINTERCEPTOR enabled and /conf/cifs-interceptor set up with shares

Note:

  • Power cycle = unplug & re-plug power cable, *not* power off&on via remote
  • You MUST have Media Library Turned on for this to work correctly


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

xmount "//192.168.0.33/ShareName" "ShareName" cifs

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

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

How to know what the "ShareName" of the USB drive is: Note: the ShareName is not usually the same as the hostname. With your web browser, type in the ip address of the WDTV device to access the Web Frontend. Login with "wdlxtv" for both username and password as default. Click on telnet client to access ssh. Login with "root" as username and the default password is blank (blank=empty - It is suggested: change immediately using telnet, SSH *won't* work!!) Next type this:

smbclient -L 192.168.x.x

where the ip is the address your host device. it should give you a listing of the USB drive Sharename's that are on the host device.


Mount an NFS share

xmount 192.168.0.44:/nfsroot 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://192.168.0.234:21" "FTP Name" ftpfs "-o user=UserName:Password"


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 "192.168.0.44:/movies"   ".movies1"  nfs
xmount "192.168.0.233:/stuff"   ".movies2"  nfs
xmount "192.168.0.101:/movies3" ".movies3"  nfs
xmount "192.168.0.151:/videos"  ".movies4"  nfs  
xmount ".movies1:.movies2:.movies3:.movies4"  "ShareUnion"  unionfs