title: Mount multiple s3fs buckets automatically with /etc/fstab
body: <p>In the s3fs instruction wiki, we were told that we could auto mount s3fs buckets by entering the following line to <code>/etc/fstab</code></p>
  
  <pre><code>s3fs#mybucket /mnt/mybucket fuse    allow_other,use_cache=/tmp,url=https://s3.amazonaws.com 0 0
  </code></pre>
  
  <p>This works fine for 1 bucket, but when I try to mount multiple buckets onto 1 EC2 instance by having 2 lines:</p>
  
  <pre><code>s3fs#mybucket /mnt/mybucket fuse    allow_other,use_cache=/tmp 0 0
  s3fs#mybucket2 /mnt/mybucket2 fuse    allow_other,use_cache=/tmp 0 0
  </code></pre>
  
  <p>only the second line works
  I tried duplicating s3fs to s3fs2 and to:</p>
  
  <pre><code>s3fs#mybucket /mnt/mybucket fuse    allow_other,use_cache=/tmp 0 0
  s3fs2#mybucket2 /mnt/mybucket2 fuse    allow_other,use_cache=/tmp 0 0
  </code></pre>
  
  <p>but this still does not work. only the second one gets mounted:</p>
  
  <p>How do I automatically mount multiple s3 bucket via s3fs in <code>/etc/fstab</code>
  without manually using:</p>
  
  <pre><code>s3fs mybucket /mn/mybucket2-ouse_cache=/tmp
  </code></pre>