Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

orange pi sdcard write-cache delay

Featured Replies

Hi all,

I have a strange problem, when I make any file system changes, I can count to 10, pull out the power, and my changes are lost.

My application sometimes requires changing of a settings file, and then quickish disconnection of power by the user (I know its not good, but it's a fact of the product)

My current solution is to flush the write cache when I save the settings, I forget the command name, but that isn't ideal as other changes such as logging is lost.

I'm using the armbian debian release at the moment.

How can I change this write-cache timing to something like 2 seconds?

Also, is this an SD-card technology issue or will the issue disappear for eMMC?

 

Thanks

 

 

19 minutes ago, ChrisAdmin said:

My current solution is to flush the write cache when I save the settings, I forget the command name, but that isn't ideal as other changes such as logging is lost.

 

Leave everything as is and simply use this command:

/usr/sbin/log2ram write ; sync &

This will write changes to SD card while still lowering write amplification a lot (high 'write amplification' is the reason why SD cards and other flash media die too early)

38 minutes ago, ChrisAdmin said:

My application sometimes requires changing of a settings file, and then quickish disconnection of power by the user (I know its not good, but it's a fact of the product)

 

Just for the record: your above procedure is a great recipe to get a corrupted rootfs so you shouldn't be too surprised if the filesystem gets corrupted and the board fails to boot the next time. There are solutions for this problem (do a search for 'read-only rootfs' for example).

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.