title: EC2 error: cannot create temp file for here-document: Read-only file system
body: <p>Looks like my Ubuntu 14.04 EC2 made the fs read-only. </p>
  
  <pre><code>cd /var/  (pressing tab for autocomplete)
  </code></pre>
  
  <p>cannot create temp file for here-document: Read-only file system</p>
  
  <p>But I have plenty of free space and memory is not full either:</p>
  
  <pre><code>Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-48-generic x86_64)
  
   * Documentation:  https://help.ubuntu.com/
  
    System information as of Wed Feb  3 14:40:58 UTC 2016
  
    System load:  0.0                Processes:           126
    Usage of /:   14.9% of 11.67GB   Users logged in:     0
    Memory usage: 19%                IP address for eth0: 172.31.15.38
    Swap usage:   0%
  </code></pre>
  
  <p>df -hi:</p>
  
  <pre><code>/dev/xvda1       768K   85K  684K   12% /
  none             251K     2  251K    1% /sys/fs/cgroup
  udev             249K   387  249K    1% /dev
  tmpfs            251K   309  250K    1% /run
  none             251K     1  251K    1% /run/lock
  none             251K     1  251K    1% /run/shm
  none             251K     2  251K    1% /run/user
  </code></pre>
  
  <p>free:</p>
  
  <pre><code>             total       used       free     shared    buffers     cached
  Mem:       2048484    1199420     849064       6248     180300     635596
  -/+ buffers/cache:     383524    1664960
  </code></pre>
  
  <p>du -sch /tmp*</p>
  
  <pre><code>9.9M    /tmp
  9.9M    total
  </code></pre>
  
  <p>What's the solution here? How can I fix the fs without losing my data?</p>
  
  <p>Should I run:</p>
  
  <pre><code>mount -o remount,rw /
  </code></pre>
  
  <p>or should I reboot?</p>
  
  <p>Thanks in advance!</p>