Saltstack : state for SDCard / flash storage optimization (Arm SBC)

All my servers are small Arm SBCs that use SDCards or eMMC for storage. For all of them, I use the same optimization state that basically do 2 things :

  • Change commit and barrier settings of ext4 (with a proper backup-ed power system)
  • Set the scheduler to deadline, which is the more efficient one for my usage

The state:

As you can see, I use a custom grains to determine the root partition, because I have several servers with different configurations.

Here is my “rootfs” grains, stored in <salt home>/states/base/_grains/

The “60-schedulers.rules” files is a simple udev order to force the deadline scheduler on all SDCards :

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.