From e4679054ac7331bdf78fe45b0030b001693103fc Mon Sep 17 00:00:00 2001 From: Rainbow Date: Sun, 17 Dec 2017 21:02:12 -0800 Subject: [PATCH 01/22] Convert -p to pv -n + dialog --- vzvol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vzvol b/vzvol index f2214af..7690f75 100755 --- a/vzvol +++ b/vzvol @@ -358,7 +358,7 @@ vzvol_delete() { zvol_import_img() { errorfunc='zvol_import_img' if [ "${VZVOL_PROGRESS_FLAG}" = "YES" ]; then - VZVOL_IMPORT_CMD="dd if=${IMPORTIMG} | pv -petrb | of=/dev/zvol/${ZROOT}/${VOLNAME}" + VZVOL_IMPORT_CMD="( pv -n ${IMPORTIMG} | of=/dev/zvol/${ZROOT}/${VOLNAME} )2>&1 | dialog --gauge 'Importing...' 10 70 0" else VZVOL_IMPORT_CMD="dd if=${IMPORTIMG} of=/dev/zvol/${ZROOT}/${VOLNAME}" fi From 3db554e6b52433e3caff98ab2250f422b448592d Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 00:39:00 -0800 Subject: [PATCH 02/22] Bugfix: spelling error in zvol_create calls --- vzvol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vzvol b/vzvol index 7690f75..ae69ec6 100755 --- a/vzvol +++ b/vzvol @@ -318,7 +318,7 @@ vmdk_create() { fi } zvol_create() { - errorfunc='vzol_create' + errorfunc='zvol_create' if [ ! -e /dev/zvol/"${ZROOT}/${VOLNAME}" ]; then "${VOLMK}" "${SIZE}" "${ZROOT}/${VOLNAME}" fi @@ -459,13 +459,13 @@ zvol_type_select() { } zvol_type_virtualbox() { errorfunc='zvol_type_virtualbox' - create_vzol || return 1 + zvol_create || return 1 vmdk_create || return 1 echo "Please use /home/${ZUSER}/VBoxdisks/${VOLNAME}.vmdk as your VM Disk" } zvol_type_raw() { errorfunc='zvol_type_raw' - create_vzol || return 1 + zvol_create || return 1 echo "You can find your zvol at: /dev/zvol/${ZROOT}/${VOLNAME}" } From 1fb0276e6c90d0330ac63bd3524aac7c9125053c Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 00:43:50 -0800 Subject: [PATCH 03/22] Bugfix: ZCreate --- vzvol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vzvol b/vzvol index ae69ec6..1d94356 100755 --- a/vzvol +++ b/vzvol @@ -4,7 +4,7 @@ ZROOT=$( zpool list | awk 'NR==3 {print $1}' ) ZUSER=$( whoami ) SIZE=10G VOLNAME=DIE -VOLMK=""$VZVOL_SU_CMD" zfs create -V" +VOLMK="$VZVOL_SU_CMD zfs create -V" FSTYPE=DIE errorfunc=MAIN IMPORTIMG=DIE From 3cf28bf5a2e914a0d912ffa8c7c82da93432e1ed Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 00:45:55 -0800 Subject: [PATCH 04/22] Add debugging code --- vzvol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vzvol b/vzvol index 1d94356..ddd0ab0 100755 --- a/vzvol +++ b/vzvol @@ -1,5 +1,8 @@ #!/bin/sh +set -e +set -x + ZROOT=$( zpool list | awk 'NR==3 {print $1}' ) ZUSER=$( whoami ) SIZE=10G From 2e134c66aafb5d61890a1e474fc6a92339281bd5 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 00:47:18 -0800 Subject: [PATCH 05/22] . --- vzvol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vzvol b/vzvol index ddd0ab0..ae2361e 100755 --- a/vzvol +++ b/vzvol @@ -7,7 +7,7 @@ ZROOT=$( zpool list | awk 'NR==3 {print $1}' ) ZUSER=$( whoami ) SIZE=10G VOLNAME=DIE -VOLMK="$VZVOL_SU_CMD zfs create -V" +VOLMK="$VZVOL_SU_CMD" zfs create -V FSTYPE=DIE errorfunc=MAIN IMPORTIMG=DIE From a3e75e0fec19bc282ee4cc4fa4d3d464861fb12b Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 00:49:52 -0800 Subject: [PATCH 06/22] Alter whitespace --- vzvol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vzvol b/vzvol index ae2361e..11d7eaf 100755 --- a/vzvol +++ b/vzvol @@ -3,7 +3,7 @@ set -e set -x -ZROOT=$( zpool list | awk 'NR==3 {print $1}' ) +ZROOT=$(zpool list | awk 'NR==3 {print $1}') ZUSER=$( whoami ) SIZE=10G VOLNAME=DIE @@ -19,10 +19,10 @@ else VZVOL_SU_CMD="su - root -c" fi -if [ "$( zpool list | awk '{ zPools[NR-1]=$1 } END { print zPools[1] }' )" = bootpool ]; then - ZROOT=$( zpool list | awk '{ zPools[NR-1]=$1 } END { print zPools[2] }' ) +if [ "$(zpool list | awk '{ zPools[NR-1]=$1 } END { print zPools[1] }')" = bootpool ]; then + ZROOT=$(zpool list | awk '{ zPools[NR-1]=$1 } END { print zPools[2] }') else - ZROOT=$( zpool list | awk '{ zPools[NR-1]=$1 } END { print zPools[1] }' ) + ZROOT=$(zpool list | awk '{ zPools[NR-1]=$1 } END { print zPools[1] }') fi show_help() { From c1b1bd7914086cdb12754279b2ad8d295d63d626 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 00:51:57 -0800 Subject: [PATCH 07/22] remove extra ZPOOL setting --- vzvol | 1 - 1 file changed, 1 deletion(-) diff --git a/vzvol b/vzvol index 11d7eaf..9ca60b6 100755 --- a/vzvol +++ b/vzvol @@ -3,7 +3,6 @@ set -e set -x -ZROOT=$(zpool list | awk 'NR==3 {print $1}') ZUSER=$( whoami ) SIZE=10G VOLNAME=DIE From c55a96eba2174cde14bdf99154ae737abd59d546 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 00:55:02 -0800 Subject: [PATCH 08/22] Check for root user --- vzvol | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vzvol b/vzvol index 9ca60b6..9f6a9bf 100755 --- a/vzvol +++ b/vzvol @@ -6,7 +6,7 @@ set -x ZUSER=$( whoami ) SIZE=10G VOLNAME=DIE -VOLMK="$VZVOL_SU_CMD" zfs create -V +VOLMK="zfs create -V" FSTYPE=DIE errorfunc=MAIN IMPORTIMG=DIE @@ -322,7 +322,11 @@ vmdk_create() { zvol_create() { errorfunc='zvol_create' if [ ! -e /dev/zvol/"${ZROOT}/${VOLNAME}" ]; then - "${VOLMK}" "${SIZE}" "${ZROOT}/${VOLNAME}" + if [ "${ZUSER}" = root ]; then + "${VOLMK}" "${SIZE}" "${ZROOT}/${VOLNAME}" + else + "${ZVOL_SU_CMD}" "${VOLMK}" "${SIZE}" "${ZROOT}/${VOLNAME}" + fi fi "$VZVOL_SU_CMD" chown "${ZUSER}" /dev/zvol/"${ZROOT}/${VOLNAME}" echo "own zvol/${ZROOT}/${VOLNAME} ${ZUSER}:operator" | "$VZVOL_SU_CMD" tee -a /etc/devfs.conf From c7268aaeedb8ee2ddf76512bfe635c2a3e518c09 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 00:57:22 -0800 Subject: [PATCH 09/22] Fix VZVOL_SU_CMD --- vzvol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vzvol b/vzvol index 9f6a9bf..b15bee2 100755 --- a/vzvol +++ b/vzvol @@ -325,7 +325,7 @@ zvol_create() { if [ "${ZUSER}" = root ]; then "${VOLMK}" "${SIZE}" "${ZROOT}/${VOLNAME}" else - "${ZVOL_SU_CMD}" "${VOLMK}" "${SIZE}" "${ZROOT}/${VOLNAME}" + "${VZVOL_SU_CMD}" "${VOLMK}" "${SIZE}" "${ZROOT}/${VOLNAME}" fi fi "$VZVOL_SU_CMD" chown "${ZUSER}" /dev/zvol/"${ZROOT}/${VOLNAME}" From 3b5276e3a6874c9053085cd8cd14bb8965fbc376 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 00:58:33 -0800 Subject: [PATCH 10/22] Remove ZVOL_MK quotes --- vzvol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vzvol b/vzvol index b15bee2..895c541 100755 --- a/vzvol +++ b/vzvol @@ -6,7 +6,7 @@ set -x ZUSER=$( whoami ) SIZE=10G VOLNAME=DIE -VOLMK="zfs create -V" +VOLMK=zfs create -V FSTYPE=DIE errorfunc=MAIN IMPORTIMG=DIE From e4a53e95e6e6afe9283c2ce946d9658795c7a12d Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:00:05 -0800 Subject: [PATCH 11/22] Replace variable with raw cmd --- vzvol | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vzvol b/vzvol index 895c541..3991aaf 100755 --- a/vzvol +++ b/vzvol @@ -6,7 +6,6 @@ set -x ZUSER=$( whoami ) SIZE=10G VOLNAME=DIE -VOLMK=zfs create -V FSTYPE=DIE errorfunc=MAIN IMPORTIMG=DIE @@ -323,9 +322,9 @@ zvol_create() { errorfunc='zvol_create' if [ ! -e /dev/zvol/"${ZROOT}/${VOLNAME}" ]; then if [ "${ZUSER}" = root ]; then - "${VOLMK}" "${SIZE}" "${ZROOT}/${VOLNAME}" + zfs create -V "${SIZE}" "${ZROOT}/${VOLNAME}" else - "${VZVOL_SU_CMD}" "${VOLMK}" "${SIZE}" "${ZROOT}/${VOLNAME}" + "${VZVOL_SU_CMD}" zfs create -V "${SIZE}" "${ZROOT}/${VOLNAME}" fi fi "$VZVOL_SU_CMD" chown "${ZUSER}" /dev/zvol/"${ZROOT}/${VOLNAME}" From 89384f599068af8826a7c55533908cb4988af1b4 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:01:43 -0800 Subject: [PATCH 12/22] Add another root check --- vzvol | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vzvol b/vzvol index 3991aaf..9196422 100755 --- a/vzvol +++ b/vzvol @@ -327,8 +327,13 @@ zvol_create() { "${VZVOL_SU_CMD}" zfs create -V "${SIZE}" "${ZROOT}/${VOLNAME}" fi fi - "$VZVOL_SU_CMD" chown "${ZUSER}" /dev/zvol/"${ZROOT}/${VOLNAME}" - echo "own zvol/${ZROOT}/${VOLNAME} ${ZUSER}:operator" | "$VZVOL_SU_CMD" tee -a /etc/devfs.conf + if [ "${ZUSER}" = root ]; then + chown "${ZUSER}" /dev/zvol/"${ZROOT}/${VOLNAME}" + echo "own zvol/${ZROOT}/${VOLNAME} ${ZUSER}:operator" | tee -a /etc/devfs.conf + else + "$VZVOL_SU_CMD" chown "${ZUSER}" /dev/zvol/"${ZROOT}/${VOLNAME}" + echo "own zvol/${ZROOT}/${VOLNAME} ${ZUSER}:operator" | "$VZVOL_SU_CMD" tee -a /etc/devfs.conf + fi zfs set custom:FS=none "${ZROOT}/${VOLNAME}" if [ ! "${FSTYPE}" = DIE ]; then zvol_fs_type || return 1 From fefb89151df2bd89df5b606290e63eba2d5911b2 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:06:11 -0800 Subject: [PATCH 13/22] Convert custom:FS to custom:fs, zfs doesnt like capital custom fields --- vzvol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vzvol b/vzvol index 9196422..9fe6066 100755 --- a/vzvol +++ b/vzvol @@ -123,7 +123,7 @@ show_help() { List all zvols on your system, the type, any associated .VMDK files, how much space on disk is used by the zvol, the maximum size of the zvol capacity, and the Filesystem, if vzvol can determine it. Imported images will list FS as "imported", and any zvol that does not - have custom:FS set will report "unknown". + have custom:fs set will report "unknown". Example output: ZVOL TYPE VMDK USED SIZE FS zroot/smartos RAW none 20G 50G zfs @@ -288,8 +288,8 @@ vzvol_list_type() { purevolname=$( echo $vols | awk -F "/" '{print $2}' ) purevolused=$( zfs get referenced $vols | awk '!/VALUE/ {print $3}' ) purevolsize=$( zfs get used $vols | awk '!/VALUE/ {print $3}' ) - if zfs get custom:FS $vols 2>/dev/null | grep -q FS; then - zvolfstype=$( zfs get custom:FS $vols | awk '!/FS/ {print $3}' ) + if zfs get custom:fs $vols 2>/dev/null | grep -q FS; then + zvolfstype=$( zfs get custom:fs $vols | awk '!/FS/ {print $3}' ) else zvolfstype="unknown" fi @@ -334,7 +334,7 @@ zvol_create() { "$VZVOL_SU_CMD" chown "${ZUSER}" /dev/zvol/"${ZROOT}/${VOLNAME}" echo "own zvol/${ZROOT}/${VOLNAME} ${ZUSER}:operator" | "$VZVOL_SU_CMD" tee -a /etc/devfs.conf fi - zfs set custom:FS=none "${ZROOT}/${VOLNAME}" + zfs set custom:fs=none "${ZROOT}/${VOLNAME}" if [ ! "${FSTYPE}" = DIE ]; then zvol_fs_type || return 1 fi @@ -378,7 +378,7 @@ zvol_import_img() { case "$line" in y) echo "Beginning import..." - zfs set custom:FS=imported "${ZROOT}/${VOLNAME}" + zfs set custom:fs=imported "${ZROOT}/${VOLNAME}" "${VZVOL_IMPORT_CMD}" ;; *) @@ -432,7 +432,7 @@ zvol_fs_type() { return 1 ;; esac - zfs set custom:FS="${FSTYPE}" "${FORMAT_ME}" + zfs set custom:fs="${FSTYPE}" "${FORMAT_ME}" case "${FSTYPE}" in zfs) zvol_create_fs_zfs From ced979288a49f9beb38c31c4493963277ad084dd Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:09:37 -0800 Subject: [PATCH 14/22] Add check for no zvols --- vzvol | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vzvol b/vzvol index 9fe6066..75430cc 100755 --- a/vzvol +++ b/vzvol @@ -279,8 +279,13 @@ getargz() { # Display Data vzvol_list() { - (printf "ZVOL TYPE VMDK USED SIZE FS \n" \ - ; vzvol_list_type) | column -t + if [ $(vzvol_list_type) | grep -q no ]; then + (printf "ZVOL TYPE VMDK USED SIZE FS \n" \ + ; None | column -t + else + (printf "ZVOL TYPE VMDK USED SIZE FS \n" \ + ; vzvol_list_type) | column -t + fi } vzvol_list_type() { list_my_vols=$( zfs list -t volume | awk '!/NAME/ {print $1}' ) From 2119ecb5a4b483e6d2545460fd31420e6c615c44 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:10:42 -0800 Subject: [PATCH 15/22] Fix syntax for last test --- vzvol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vzvol b/vzvol index 75430cc..5d3a0c0 100755 --- a/vzvol +++ b/vzvol @@ -279,9 +279,9 @@ getargz() { # Display Data vzvol_list() { - if [ $(vzvol_list_type) | grep -q no ]; then + if $(vzvol_list_type) | grep -q no; then (printf "ZVOL TYPE VMDK USED SIZE FS \n" \ - ; None | column -t + ; None) | column -t else (printf "ZVOL TYPE VMDK USED SIZE FS \n" \ ; vzvol_list_type) | column -t From 49fd4ca5c0e56f7fb158d357098e600b85ded551 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:11:40 -0800 Subject: [PATCH 16/22] Fix logic check --- vzvol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vzvol b/vzvol index 5d3a0c0..4348edb 100755 --- a/vzvol +++ b/vzvol @@ -293,7 +293,7 @@ vzvol_list_type() { purevolname=$( echo $vols | awk -F "/" '{print $2}' ) purevolused=$( zfs get referenced $vols | awk '!/VALUE/ {print $3}' ) purevolsize=$( zfs get used $vols | awk '!/VALUE/ {print $3}' ) - if zfs get custom:fs $vols 2>/dev/null | grep -q FS; then + if zfs get custom:fs $vols 2>/dev/null | grep -q fs; then zvolfstype=$( zfs get custom:fs $vols | awk '!/FS/ {print $3}' ) else zvolfstype="unknown" From 90b650052a24ffec4c04443d476434993d8cba0e Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:21:46 -0800 Subject: [PATCH 17/22] Add error check for vzvol list --- vzvol | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/vzvol b/vzvol index 4348edb..34174e6 100755 --- a/vzvol +++ b/vzvol @@ -279,16 +279,22 @@ getargz() { # Display Data vzvol_list() { - if $(vzvol_list_type) | grep -q no; then - (printf "ZVOL TYPE VMDK USED SIZE FS \n" \ - ; None) | column -t - else + vzvol_list_type 2>&1 /dev/null + if [ $? = 2 ]; then + echo "Error, No zvols Configured" + elif [ $? = 0 ]; then (printf "ZVOL TYPE VMDK USED SIZE FS \n" \ ; vzvol_list_type) | column -t + else + echo "Error acquiring zvol list" + return 1 fi } vzvol_list_type() { list_my_vols=$( zfs list -t volume | awk '!/NAME/ {print $1}' ) + if [ "$list_my_vols" = "no" ]; then + return 2 + fi for vols in $list_my_vols; do purevolname=$( echo $vols | awk -F "/" '{print $2}' ) purevolused=$( zfs get referenced $vols | awk '!/VALUE/ {print $3}' ) From 714c998d0e601b5720a02be058ed874df6e3d42e Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:23:57 -0800 Subject: [PATCH 18/22] Fix vzvol_list_type returning 1 when no VMDK present --- vzvol | 1 + 1 file changed, 1 insertion(+) diff --git a/vzvol b/vzvol index 34174e6..bb1ef04 100755 --- a/vzvol +++ b/vzvol @@ -310,6 +310,7 @@ vzvol_list_type() { echo "${vols} RAW none $purevolused $purevolsize $zvolfstype" fi done + return 0 } # File Creation and Deletion From f4188e94a1d67f32ff985bd65e08ab82eab15c66 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:25:51 -0800 Subject: [PATCH 19/22] Change FS check --- vzvol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vzvol b/vzvol index bb1ef04..af15a97 100755 --- a/vzvol +++ b/vzvol @@ -300,7 +300,7 @@ vzvol_list_type() { purevolused=$( zfs get referenced $vols | awk '!/VALUE/ {print $3}' ) purevolsize=$( zfs get used $vols | awk '!/VALUE/ {print $3}' ) if zfs get custom:fs $vols 2>/dev/null | grep -q fs; then - zvolfstype=$( zfs get custom:fs $vols | awk '!/FS/ {print $3}' ) + zvolfstype=$( zfs get custom:fs $vols | awk '!/VALUE/ {print $3}' ) else zvolfstype="unknown" fi From a7f3b0b5f37a6f6d0c1961b55bec46207fe030a8 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:28:41 -0800 Subject: [PATCH 20/22] Fix fscheck, where first check for !2 was setting $? to 1. Gotta be a more efficient way of checking return status than runnign it twice... --- vzvol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vzvol b/vzvol index af15a97..d383e88 100755 --- a/vzvol +++ b/vzvol @@ -282,7 +282,10 @@ vzvol_list() { vzvol_list_type 2>&1 /dev/null if [ $? = 2 ]; then echo "Error, No zvols Configured" - elif [ $? = 0 ]; then + exit 1 + fi + vzvol_list_type 2>&1 /dev/null + if [ $? = 0 ]; then (printf "ZVOL TYPE VMDK USED SIZE FS \n" \ ; vzvol_list_type) | column -t else From 61757886252136e3407d71124091e63cad693ec2 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:35:01 -0800 Subject: [PATCH 21/22] Fix pkg check --- vzvol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vzvol b/vzvol index d383e88..265ae30 100755 --- a/vzvol +++ b/vzvol @@ -424,12 +424,12 @@ zvol_fs_type() { echo "Warning. You have selected an FS type supplied by a port. Now checking to see if the port is installed." echo "Please note that unsupported FSes may exhibit unexpected behavior!" if [ "${FSTYPE}" = "ext2" -o "${FSTYPE}" = "ext3" -o "${FSTYPE}" = "ext4" ]; then - if pkg info | grep -vq e2fsprogs; then + if [ $( pkg info | grep -q e2fsprogs ) = 1 ]; then echo "Error! You need to install sysutils/e2fsprogs first!" return 1 fi elif [ "${FSTYPE}" = "xfs" ]; then - if pkg info | grep -vq xfsprogs; then + if [ $( pkg info | grep -q xfsprogs ) = 1 ]; then echo "Error! You need to install sysutils/xfsprogs first!" return 1 fi From 2c54b5701d49eb2246f0a1f8d2a357177d975264 Mon Sep 17 00:00:00 2001 From: Rainbow Date: Tue, 19 Dec 2017 01:38:26 -0800 Subject: [PATCH 22/22] Override volname in --format to fix error out in zvol_check() --- vzvol | 1 + 1 file changed, 1 insertion(+) diff --git a/vzvol b/vzvol index 265ae30..2b07ecc 100755 --- a/vzvol +++ b/vzvol @@ -265,6 +265,7 @@ getargz() { else FSTYPE="${2}" FORMAT_ME="${3}" + VOLNAME="${FORMAT_ME}" vzvol_fscheck zvol_fs_type fi