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.

How to reference current cache disk space within a container?

Featured Replies

I'm looking to add a script in a container that needs to pull the current size of the cache disk. The example I'm working from assumes it's pointing at the space available to the /downloads/ folder. But in this case wouldn't  that return the whole array? Can I instead somehow pass through a mapping to reference that would return the available space of the cache disk instead? Would pointing to the /appdata/ folder or the specific applications /appdata/config/ work, since it is already mapped in the container?

 

Here is the example I'm working from:

#!/bin/sh
set -e

reqSpace=250000000 # 250GB
SPACE=$(df "/torrents" | awk 'END{print $4}')
if [ "$SPACE" -le $reqSpace ]
then
  echo "not enough space"
  echo "free $SPACE"
  exit 1
fi
echo "got space"
echo "free $SPACE"
exit 0

 

If by cache disk you mean cache pool, they are mounted on /mnt/poolname

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.