1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

[User Script] USB Disk Check at Boot or Hot Plug (improved version)

Discussion in 'Asuswrt-Merlin' started by ColinTaylor, Apr 19, 2019.

  1. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    8,327
    Location:
    UK
    Merlin's firmware version 384.11 and John's V39E1 introduced an enhancement to the pre-mount user script that makes identifying the filesystems present on a USB disk more reliable. This can be used to create improved versions of the current scripts that automatically check or repair disks (i.e. fsck).

    For more information and example scripts see the wiki here.
    For people that don't want to write their own script @thelonelycoder has updated amtm to include this enhanced method. He has also retained the previous method for compatibility with older firmware releases.
     
    Zastoff, faria, JemTheWire and 5 others like this.
  2. octopus

    octopus Very Senior Member

    Joined:
    Jul 17, 2012
    Messages:
    1,135
    Thank you.
    I have incorporated it in my "pre-mount" script and set maximum mount count: to 20 times.
    tune2fs -c 20 /dev/sda1
     
    ColinTaylor likes this.