Difference between revisions of "Net.mounts"

From WikiDLXTV
Jump to: navigation, search
Line 8: Line 8:
  
  
'''To see NFS/CIFS/XFS/ReiserFS/NDAS devices, you must either:'''
+
'''To see NFS/CIFS/CDROM/XFS/ReiserFS/NDAS devices, you must either:'''
* '''have a supported drive/flashdisk plugged in for xmounts to appear'''  
+
* '''have a supported drive/flashdisk plugged in for xmounts to appear under Local Drives -> folders'''  
 
OR
 
OR
* '''have [[How_to_setup_CIFS_Interceptor|CIFSINTERCEPTOR]] enabled and /conf/cifs-interceptor set up with shares
+
* '''have [[How_to_setup_CIFS_Interceptor|CIFSINTERCEPTOR]] enabled and /conf/cifs-interceptor set up with shares to appear under 'Network Shares'
 
'''
 
'''
  
 
Note:
 
Note:
 
* '''Power cycle = unplug & re-plug power cable, *not* power off&on via remote'''
 
* '''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'''
 
  
  
Line 26: Line 25:
  
 
'''How to know what the "ShareName" of the USB drive is:'''
 
'''How to know what the "ShareName" of the USB drive is:'''
 +
 
Note: the ShareName is not usually the same as the hostname.
 
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:
+
 
 +
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 shell. Login with "root" as username and the default password is blank (blank=empty - It is suggested: change immediately using telnet, as SSH *won't* work!!). You'll see a WDLXTV welcome screen and then a '''#''' upon success. Next type this:
 
  smbclient -L 192.168.x.x
 
  smbclient -L 192.168.x.x
 
where the ip is the address your host device.
 
where the ip is the address your host device.
Line 36: Line 37:
 
  xmount 192.168.0.44:/nfsroot ShareName nfs
 
  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.
 
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.
 +
 +
'''How to know what is available on your NFS server:'''
 +
 +
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 shell. Login with "root" as username and the default password is blank (blank=empty - It is suggested: change immediately using telnet, as SSH *won't* work!!). You'll see a WDLXTV welcome screen and then a '''#''' upon success. Next type this:
 +
showmount -e 192.168.x.x
 +
where the ip is the address your host device.
 +
it should give you a listing of the NFS exports that available on the server and what IP's are allowed to connect to them like this:
 +
/media/MTB            192.168.0.0/24
 +
/media/ext4ster      192.168.0.0/24
 +
/media/biggyfat        192.168.0.0/24
 +
/media/SevenFitty    192.168.0.0/24
 +
/media/fattyOneFive 192.168.0.0/24
 +
The above means that all of the NFS exports are allowed to be mounted by any host in 192.168.0.0 - 192.168.0.255
  
  

Revision as of 06:34, 11 June 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/CDROM/XFS/ReiserFS/NDAS devices, you must either:

  • have a supported drive/flashdisk plugged in for xmounts to appear under Local Drives -> folders

OR

  • have CIFSINTERCEPTOR enabled and /conf/cifs-interceptor set up with shares to appear under 'Network Shares'

Note:

  • Power cycle = unplug & re-plug power cable, *not* power off&on via remote


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 shell. Login with "root" as username and the default password is blank (blank=empty - It is suggested: change immediately using telnet, as SSH *won't* work!!). You'll see a WDLXTV welcome screen and then a # upon success. 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.

How to know what is available on your NFS server:

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 shell. Login with "root" as username and the default password is blank (blank=empty - It is suggested: change immediately using telnet, as SSH *won't* work!!). You'll see a WDLXTV welcome screen and then a # upon success. Next type this:

showmount -e 192.168.x.x

where the ip is the address your host device. it should give you a listing of the NFS exports that available on the server and what IP's are allowed to connect to them like this:

/media/MTB            192.168.0.0/24
/media/ext4ster       192.168.0.0/24
/media/biggyfat         192.168.0.0/24
/media/SevenFitty    192.168.0.0/24
/media/fattyOneFive 192.168.0.0/24

The above means that all of the NFS exports are allowed to be mounted by any host in 192.168.0.0 - 192.168.0.255


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