Skip to content
View in the app

A better way to browse. Learn more.

Unraid

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.

[SOLVED] Intentionally forcing array into read-only mode?

Featured Replies

Is there a way to force the array into a read-only mode (persistent across reboots)?  I've noticed, for instance, that each disk in my array tends to do ~5 writes after starting on boot even if I don't intentionally do any reads/writes (per the stats on the main admin page).

 

I've searched a bit, but everything that comes up is related to arrays/disks being put into read-only mode because of a disk error.

 

As just one of many potential use cases... this would be useful for instance during a parity drive upgrade -- what if another disk fails when the parity drive upgrade is only half-done on the new drive, and there have been writes to the array in the meantime? 

 

If there were a way to force into read-only mode before starting the upgrade, you could use the 'trust my parity drive' procedure to swap the (old, unmodified) parity drive back into the array and recover the failed drive.

When a file system is mounted, the mount date/time is written to the superblock.  Those are the writes you are seeing.  In the same way, when un-mounted, the date-timestamp is updated.

 

You could possibly force read mode on each of the file systems by typing for each:

 

mount -o remount,ro  /dev/md1

mount -o remount,ro  /dev/md2

mount -o remount,ro  /dev/md3

 

etc...

  • Author

Putting something like that in the 'go' script would satisfy the 'read only' functionality some people have requested whereby drives are set read-only after filling them with media, but wouldn't truly be sufficient for the use case I outlined.

 

Poked in the emhttpd binary, and it looks like (in 4.7) the mount command string is "mount -t reiserfs -o noacl,nouser_xattr,noatime,nodiratime %s %s" -- doesn't look like it's parametrized to be able to specify ',ro' when mounting the device to prevent all writes.  Perhaps I should post this (or have a mod move it?) into Feature Requests.

Putting something like that in the 'go' script would satisfy the 'read only' functionality some people have requested whereby drives are set read-only after filling them with media, but wouldn't truly be sufficient for the use case I outlined.

 

Poked in the emhttpd binary, and it looks like (in 4.7) the mount command string is "mount -t reiserfs -o noacl,nouser_xattr,noatime,nodiratime %s %s" -- doesn't look like it's parametrized to be able to specify ',ro' when mounting the device to prevent all writes.  Perhaps I should post this (or have a mod move it?) into Feature Requests.

There is already a feature in the 5.0series to bring the array up in "safe" mode (not mounting any disks) but you can certainly add this as a feature request.

 

Joe L.

Archived

This topic is now archived and is 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.