ZVOL Blocksize Modifier

ZVOL Blocksize Modifier

NickF

Guru
Joined
Jun 12, 2014
Messages
763
NickF submitted a new resource:

ZVOL Blocksize Modifier - Fine-tuning for Optimal Performance

ZVOL Block Size Modifier: Fine-tuning for Optimal Performance

ZFS's ZVOLs, with their robustness and versatility, are a staple in many storage solutions. However, every system has room for enhancement. One such tweakable parameter in ZVOLs is the volblocksize. After its initial setup, traditional methods don't allow for this value to be altered. Yet, changing circumstances, performance metrics, or evolved best practices might shine a light on the need for such modification.

The ZVOL...

Read more about this resource...
 

NickF

Guru
Joined
Jun 12, 2014
Messages
763
NickF updated ZVOL Blocksize Modifier with a new update entry:

Version v.02

Code:
#!/bin/bash


#Add this near the beginning of your script:
  declare - i clean_exit = 0
 
#Define color functions
  color_output ()
{
 
local color = $1
    local text = $2
 case $color in
 red) echo - e "\033[31m$text\033[0m";;
 
green) echo - e "\033[32m$text\033[0m";;
 
yellow) echo - e "\033[33m$text\033[0m";;
 
blue) echo - e "\033[34m$text\033[0m";;
 
purple) echo - e "\033[35m$text\033[0m";;
 
cyan) echo - e "\033[36m$text\033[0m";;
 
*)echo "$text";;


esac
}




 
color_error...

Read the rest of this update entry...
 

NickF

Guru
Joined
Jun 12, 2014
Messages
763
NickF updated ZVOL Blocksize Modifier with a new update entry:

v0.03

Fixed a typo in the logic for confirming the deletion of the original VDEV. This typo caused the script to exit before prompting the user with the question, but data was successfully copied.


Code:
#!/bin/bash

# Add this near the beginning of your script:
declare -i clean_exit=0

# Define color functions
color_output() {
    local color=$1
    local text=$2
    case $color in
        red) echo -e "\033[31m$text\033[0m" ;;
        green) echo -e "\033[32m$text\033[0m" ;;
        yellow)...

Read the rest of this update entry...
 

Popolou

Dabbler
Joined
Nov 8, 2011
Messages
26
Nice job. Had some time and thought to give this a spin. Got the odd error below (but it appears to continue): -

1692019210077.png
 

Popolou

Dabbler
Joined
Nov 8, 2011
Messages
26
The print statement regarding the available space? I'm going to have to work towards reporting in something a bit bigger than byres :)
The error from "line 175: ((: 3.58441e+12: syntax error: invalid arithmetic operator (error token is ".58441e+12")"

I also encountered this. Not sure if the middleware eventually does restart from another subsequent command (am running Core)?
1692022063518.png
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Can I suggest adding a way of aborting the script after displaying the available zvols and blocksizes. Say an extra option for quit?
 

pwest

Cadet
Joined
May 25, 2015
Messages
3
Hi:
I have a 10 year old freeNAS/trueNAS server (now rueNAS-13.0-U5.3). I just 'expanded' my zpool from 4x1TB to 4x4TB and wanted to increase my current 512 byte blocksize. The script doesn't work for me, and I think the initial problem may be from line 63 of the script, which when executed from the command line gives:

Code:
root@freenas:~ # zfs list -t volume -o name
no datasets available
 
Top