Site Tools


linux:general:mount

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
linux:general:mount [2018/12/20 17:44] – Discussion status changed lunetikklinux:general:mount [2019/06/17 16:19] lunetikk
Line 3: Line 3:
 ==== Temp. mount ==== ==== Temp. mount ====
  
 +=== CIFS / SAMBA ===
 <code> <code>
 mount -t cifs //<SRV>/<SHARE>/ /mnt/<POINT>/ mount -t cifs //<SRV>/<SHARE>/ /mnt/<POINT>/
Line 13: Line 14:
 Make sure you can access it and that you can see files. If you already have files at "%%//%%<SRV>/<SHARE>/" you can use <code>ls -al /mnt/<POINT>/</code> Make sure you can access it and that you can see files. If you already have files at "%%//%%<SRV>/<SHARE>/" you can use <code>ls -al /mnt/<POINT>/</code>
 Also create a file with <code>touch /mnt/<POINT>/test</code> and check if it has been created. Also create a file with <code>touch /mnt/<POINT>/test</code> and check if it has been created.
 +
 +=== NFS ===
 +<code>
 +mount -t nfs <server>:/<share>/ /<mountpoint>
 +</code>
 +or with additional parameters
 +<code>
 +mount -t nfs <server>:/<share>/ /<mountpoint> -o rw,bg,hard,intr,rsize=32768,wsize=32768,tcp,vers=3,suid,timeo=600
 +</code>
 +
 +Make sure you can access it and that you can see files. If you already have files at "%%/%%<share>/" you can use <code>ls -al /<mountpoint></code>
 +Also create a file with <code>touch /<mountpoint>/test</code> and check if it has been created.
  
 ==== Perm. mount ==== ==== Perm. mount ====
 +
 +=== CIFS / SAMBA ===
  
 Insert in "/etc/fstab" Insert in "/etc/fstab"
Line 23: Line 38:
 username=<username> username=<username>
 password=<password> password=<password>
 +domain=<domain>
 </code> </code>
  
 Execute Execute
 <code>mount -a</code> <code>mount -a</code>
 +
 +=== NFS ===
 +
 +Insert in "/etc/fstab"
 +<code><server>:/share /<mountpoint> nfs rw,bg,hard,vers=4.0,suid,timeo=600,noatime,rsize=65536,wsize=65536,sec=sys 0</code>
 +
 +Execute
 +<code>mount -a</code>
 +
 +===== Versions =====
 +
 +==== CIFS ====
 +
 +^  Version  ^  Description  ^
 +|  %%vers=3.0%%  |  SMB3 i.e. Windows 8 and up, Windows Server 2012 and up  |
 +|  %%vers=2.1%%  |  SMB2_10 i.e. Windows 7, Windows Server 2008 R2  |
 +|  %%vers=2.0%%  |  SMB2_02 i.e. Vista SP1, Windows Server 2008  |
 +|  %%vers=1.0%%  |  NT1 i.e. Windows 95, NT 4.0  |
 +
 +===== Commands =====
 +
 +^  Command  ^  Function  ^
 +|  %%showmount -e <nfsserver>%%  |  show available nfs shares  |
 +|  %%mount -t nfs <server>:/<share> /<mountpoint>%%  |  mount a nfs share  |
 +|  %%mount -t cifs //<server>/<share>/ /<mountpoint>%%  |  mount a cifs share  |
 +
 +===== Troubleshooting =====
 +
 +==== Cant mount Windowsshares (CIFS) on Linux ====
 +
 +=== Description ===
 +
 +Mounting your share leads to the following error
 +
 +<code>
 +mount error(9): Bad file descriptor
 +</code>
 +
 +=== Reason === 
 +
 +Microsoft released an Update (January 8, 2019 (Monthly Rollup)) which broke smb2.0 and 2.1 connections.\\
 +
 +The issue affect Windows 7 and Windows Server 2008 (R2).
 +
 +[[https://www.theregister.co.uk/2019/01/09/windows_7_network_broken/|https://www.theregister.co.uk/2019/01/09/windows_7_network_broken/]]
 +
 +[[https://serverfault.com/questions/948263/kb-4480970-and-or-kb-4480960-breaks-smb2-connections-to-windows-7-shares|https://serverfault.com/questions/948263/kb-4480970-and-or-kb-4480960-breaks-smb2-connections-to-windows-7-shares]]
 +
 +=== Fix === 
 +
 +Microsoft released a fix to fix their update... m(
 +<code>
 +This update resolves the issue where local users who are part of the local “Administrators“ group may not be able to remotely access shares on Windows 7 SP1 and Windows Server 2008 R2 machines after installing the January 8th, 2019 security updates. 
 +This does not affect domain accounts in the local "Administrators" group.
 +</code>
 +
 +Download KB4487345 and install the fix: [[http://www.catalog.update.microsoft.com/Search.aspx?q=KB4487345|KB4487345]]
 +
 +
 +==== CIFS share is mounted but permission is denied ====
 +
 +=== Description ===
 +
 +Listing the files doesnt work because of missing permission
 +<code>
 +ll /<mount>
 +ls: reading directory /<mount>/: Permission denied
 +total 0
 +</code>
 +
 +=== Reason === 
 +
 +Wrong CIFS version
 +
 +=== Fix === 
 +
 +Add the correct version (vers=1.0/2.0/2.1/3.0) as an option
 +<code>
 +# in /etc/fstab as perm. mount
 +//<server>/<share> /<mountpoint> cifs credentials=</root/.smbcreds>,iocharset=utf8,sec=ntlm,vers=3.0 0 0
 +
 +# temp. mount
 +mount -t cifs //<server>/<share> /<mountpoint> -o vers=3.0 
 +
 +</code>
 +
 +
 \\ \\
 \\ \\
 ~~DISCUSSION:closed~~ ~~DISCUSSION:closed~~
linux/general/mount.txt · Last modified: 2020/01/09 16:36 by lunetikk