title: /etc/fstab: parse error: ignore entry at line
body: <p>I have scrip with function:</p>
  
  <pre><code>mount_share () {
  
      mkdir /data
      echo //$STORAGE_NAME.file.core.windows.net/$STORAGE_SHARE /data cifs vers=3.0,username=$STORAGE_NAME,password=$STORAGE_KEY,dir_mode=0755,file_mode=0644,serverino &gt;&gt; /etc/fstab
      mount -a
  
  }
  </code></pre>
  
  <p>After execution - <code>mount</code> returns me an error:</p>
  
  <p><code>root@xx255rs2sptry000001:~# mount -a
  mount: /etc/fstab: parse error: ignore entry at line 9.</code></p>
  
  <p>Same error if I'm trying to <code>sed</code> manually:</p>
  
  <pre><code>root@xx255rs2sptry000001:~# STORAGE_NAME=ggg
  root@xx255rs2sptry000001:~# STORAGE_KEY=sakey
  root@xx255rs2sptry000001:~# STORAGE_SHARE=sashare
  root@xx255rs2sptry000001:~# echo //$STORAGE_NAME.file.core.windows.net/$STORAGE_SHARE /data cifs vers=3.0,username=$STORAGE_NAME,password=$STORAGE_KEY,dir_mode=0755,file_mode=0644,serverino &gt;&gt; /etc/fstab
  root@xx255rs2sptry000001:~# cat /etc/fstab 
  # CLOUD_IMG: This file was created/modified by the Cloud Image build process
  UUID=e990f8b3-1d6b-4615-8280-8ead4ed2fe7c       /        ext4   defaults,discard        0 0
  
  # CLOUD_IMG: This file was created/modified by the Cloud Image build process
  # The following is used to dynamically configured additional
  # NICs. Do not remove unless you know what you are doing.
  none /etc/network/interfaces.dynamic.d tmpfs   nodev,noexec,nosuid,size=64K 0 0
  /dev/disk/cloud/azure_resource-part1    /mnt    auto    defaults,nofail,x-systemd.requires=cloud-init.service,comment=cloudconfig       0       2
  //ggg.file.core.windows.net/sashare /data cifs vers=3.0,username=ggg,password=sakey,dir_mode=0755,file_mode=0644,serverino
  root@xx255rs2sptry000001:~# mount -a
  mount: /etc/fstab: parse error: ignore entry at line 9.
  </code></pre>
  
  <p>I tried to close variables in "" - but no luck:</p>
  
  <p><code>echo "//$STORAGE_NAME.file.core.windows.net/$STORAGE_SHARE /data cifs vers=3.0,username=$STORAGE_NAME,password=$STORAGE_KEY,dir_mode=0755,file_mode=0644,serverino" &gt;&gt; /etc/fstab</code></p>
  
  <p><code>echo //"$STORAGE_NAME".file.core.windows.net/"$STORAGE_SHARE" /data cifs vers=3.0,username="$STORAGE_NAME",password="$STORAGE_KEY",dir_mode=0755,file_mode=0644,serverino &gt;&gt; /etc/fstab</code></p>
  
  <p>And so on.</p>
  
  <p>The entry in <code>/etc/fstab</code> looks absolutely correct, but...</p>
  
  <p>What I'm doing wrong here?</p>
  
  <p>If add mount entry manually, with <code>vim</code> and without variables - everything works fine.</p>
  
  <p>Azure file share documentation - <a href="https://docs.microsoft.com/en-us/azure/storage/storage-how-to-use-files-linux" rel="nofollow noreferrer">here</a>.</p>