title: MongoDB Readahead warning
body: <p>I'm receiving this warning when starting my MongoDB shell:</p>
  
  <blockquote>
    <p>Wed Mar 20 22:40:49.850 [initandlisten]</p>
    
    <p>Wed Mar 20 22:40:49.850 [initandlisten] ** WARNING: Readahead for
    /data is set to 2048KB</p>
    
    <p>Wed Mar 20 22:40:49.850 [initandlisten] ** We suggest setting it to
    256KB (512 sectors) or less</p>
    
    <p>Wed Mar 20 22:40:49.850 [initandlisten] **
    <a href="http://dochub.mongodb.org/core/readahead">http://dochub.mongodb.org/core/readahead</a></p>
  </blockquote>
  
  <p>I've used:</p>
  
  <blockquote>
    <p>df /data</p>
  </blockquote>
  
  <p>To find where the drive is that my data is mounted and subsequently used:</p>
  
  <blockquote>
    <p>sudo blockdev --setra 256 /dev/mapper/vg0-data</p>
  </blockquote>
  
  <p>to set the readahead to the 256 that was specified. I've confirmed this has worked with:</p>
  
  <blockquote>
    <p>sudo blockdev --getra /dev/mapper/vg0-data</p>
  </blockquote>
  
  <p>I'm still however getting the same error when starting my shell? </p>
  
  <p><em><strong>UPDATE</em></strong></p>
  
  <p>I've restarted the mongodb server instance and am still receiving this error.</p>
  
  <p><em><strong>UPDATE 2</em></strong></p>
  
  <p>My linux server is hosted on AWS and therefore uses virtual volumes. I have set the readahead value for all those volumes to 256 and still receive this error.</p>
  
  <p><em><strong>UPDATE 3</em></strong></p>
  
  <p>This is a blockdev --report of the Primary instance of MongoDB</p>
  
  <pre><code>RO    RA   SSZ   BSZ   StartSec            Size   Device
  rw   256   512  4096          0      8589934592   /dev/xvda1
  rw   256   512  4096          0     10737418240   /dev/xvdh8
  rw   256   512  4096          0     10737418240   /dev/xvdh7
  rw   256   512  4096          0     10737418240   /dev/xvdh6
  rw   256   512  4096          0     10737418240   /dev/xvdh5
  rw   256   512  4096          0     10737418240   /dev/xvdh4
  rw   256   512  4096          0     10737418240   /dev/xvdh3
  rw   256   512  4096          0     10737418240   /dev/xvdh2
  rw   256   512  4096          0     10737418240   /dev/xvdh1
  rw  4096   512  4096          0     42944430080   /dev/md127
  rw  4096   512  4096          0     38646317056   /dev/dm-0
  rw  4096   512  4096          0      2143289344   /dev/dm-1
  rw  4096   512  4096          0      2143289344   /dev/dm-2
  </code></pre>
  
  <p>This is a blockdev --report of the Secondary instance of MongoDB</p>
  
  <pre><code>RO    RA   SSZ   BSZ   StartSec            Size   Device
  rw   256   512  4096          0      8589934592   /dev/xvda1
  rw   256   512  4096          0     10737418240   /dev/xvdh8
  rw   256   512  4096          0     10737418240   /dev/xvdh7
  rw   256   512  4096          0     10737418240   /dev/xvdh6
  rw   256   512  4096          0     10737418240   /dev/xvdh5
  rw   256   512  4096          0     10737418240   /dev/xvdh4
  rw   256   512  4096          0     10737418240   /dev/xvdh3
  rw   256   512  4096          0     10737418240   /dev/xvdh2
  rw   256   512  4096          0     10737418240   /dev/xvdh1
  rw  4096   512  4096          0     42944430080   /dev/md127
  rw  4096   512  4096          0     38646317056   /dev/dm-0
  rw  4096   512  4096          0      2143289344   /dev/dm-1
  rw  4096   512  4096          0      2143289344   /dev/dm-2
  </code></pre>
  
  <p>This is a blockdev --report of the Arbiter instance of MongoDB</p>
  
  <pre><code>RO    RA   SSZ   BSZ   StartSec            Size   Device
  rw   256   512  4096          0      8589934592   /dev/xvda1
  </code></pre>