VelcroBP Posted April 26, 2023 Share Posted April 26, 2023 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 Quote Link to comment
apandey Posted May 3, 2023 Share Posted May 3, 2023 If by cache disk you mean cache pool, they are mounted on /mnt/poolname Quote Link to comment
Recommended Posts
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.