Automount with async option

8,558
  1. async means that when data is written to the drive it is not committed immediately. This causes writes to "bunch up" so you can write them all one at a time. It also means your commands won't have to wait for the write to complete.

  2. Yes, you can add an entry for the drive to /etc/fstab. The line would look something like this:

    /dev/sdb1 /media/a/ auto auto,async 0 0
    

    For an explanation of what each field means, please see man fstab.

  3. It's fine as long as you never plug out the disc without unmounting. I know people say you shouldn't do this on Windows either, but with async you really shouldn't do this. You might think that the drive is done writing, but writes can sit in the write queue for a surprisingly long time.

Share:
8,558
blvdeer
Author by

blvdeer

Updated on September 18, 2022

Comments

  • blvdeer
    blvdeer over 1 year

    I have a 1 TB Western Digital External Harddisk. The read/write speed was very low, I read on askubuntu that using the async mount option helps. Then I started using it as follows:

    mount -o async,rw /dev/sdb1 /media/a/
    

    Every time I plugin the HDD, I first unmount it then go to command line to mount it using the above command. I also have a 16GB pendrive and that is slower on Ubuntu than Windows 7, I suspect using async could help me there as well.

    1. What does async do?
    2. Is there a way to make async as the default option during automounts?
    3. Is it advisable to do so?
  • Rael Gugelmin Cunha
    Rael Gugelmin Cunha almost 6 years
    "Surprisingly long time" is the time it takes to copy files in the sync mode: 3 hours for a 2GB file. In async, copy is few seconds and wait 1 minute after ask to unplug.
  • CMCDragonkai
    CMCDragonkai over 5 years
    Is there any documentation on how the write buffer is configured? How big is it, is the buffer buffering in memory? Does it spill onto local disk of some sort? Is there a sort of backpressures?