Commit cfacc108 authored by Thom Cherryhomes's avatar Thom Cherryhomes

Merge branch 'Issue_2773' into 'master'

Issue 2773

See merge request !56
parents b2579960 2affe724
Pipeline #668 passed with stage
in 3 minutes and 6 seconds
......@@ -10,6 +10,11 @@ TPL_GENERIC_INTERNAL_DRIVE=1790
TPL_RAID_0=1854
TPL_RAID_1=1851
TPL_RAID_5=1849
TPL_ZFS_POOL=2351
TPL_ZFS_MIRROR=2352
TPL_ZFS_RAIDZ1=2353
TPL_ZFS_RAIDZ2=2354
TPL_ZFS_RAIDZ3=2355
## Set some variables needed for exporting nfs
if [[ -f /etc/diskless.conf ]] ;then
......@@ -48,7 +53,7 @@ done
unset IFS
## Lookup our internal storage devices in the db
Q="SELECT PK_Device FROM Device WHERE FK_DeviceTemplate IN ($TPL_GENERIC_INTERNAL_DRIVE,$TPL_RAID_0,$TPL_RAID_1,$TPL_RAID_5) AND FK_Device_ControlledVia=$PK_Device"
Q="SELECT PK_Device FROM Device WHERE FK_DeviceTemplate IN ($TPL_GENERIC_INTERNAL_DRIVE,$TPL_RAID_0,$TPL_RAID_1,$TPL_RAID_5,$TPL_ZFS_POOL,$TPL_ZFS_MIRROR,$TPL_ZFS_RAIDZ1,$TPL_ZFS_RAIDZ2,$TPL_ZFS_RAIDZ3) AND FK_Device_ControlledVia=$PK_Device"
InternalOwnStorageDevices=$(RunSQL "$Q")
for Device in $InternalOwnStorageDevices; do
......
......@@ -10,9 +10,14 @@ TPL_GENERIC_INTERNAL_DRIVE=1790
TPL_RAID_0=1854
TPL_RAID_1=1851
TPL_RAID_5=1849
TPL_ZFS_POOL=2351
TPL_ZFS_MIRROR=2352
TPL_ZFS_RAIDZ1=2353
TPL_ZFS_RAIDZ2=2354
TPL_ZFS_RAIDZ3=2355
## Lookup our internal storage devices in the db
Q="SELECT PK_Device FROM Device WHERE FK_DeviceTemplate IN ($TPL_GENERIC_INTERNAL_DRIVE,$TPL_RAID_0,$TPL_RAID_1,$TPL_RAID_5) AND FK_Device_ControlledVia=$PK_Device"
Q="SELECT PK_Device FROM Device WHERE FK_DeviceTemplate IN ($TPL_GENERIC_INTERNAL_DRIVE,$TPL_RAID_0,$TPL_RAID_1,$TPL_RAID_5,$TPL_ZFS_POOL,$TPL_ZFS_MIRROR,$TPL_ZFS_RAIDZ1,$TPL_ZFS_RAIDZ2,$TPL_ZFS_RAIDZ3) AND FK_Device_ControlledVia=$PK_Device"
InternalOwnStorageDevices=$(RunSQL "$Q")
for Device in $InternalOwnStorageDevices; do
......
......@@ -5,7 +5,7 @@
TPL_STORAGE_DEVICES="1790, 1794, 1768, 1769, 1854, 1851, 1849"
TPL_STORAGE_DEVICES="1790, 1794, 1768, 1769, 1854, 1851, 1849, 2351, 2352, 2353, 2354, 2355"
DD_USERS=3
Params=("$@")
......
......@@ -12,6 +12,11 @@ TPL_GENERIC_NFS_SHARE=1769
TPL_RAID_0=1854
TPL_RAID_1=1851
TPL_RAID_5=1849
TPL_ZFS_POOL=2351
TPL_ZFS_MIRROR=2352
TPL_ZFS_RAIDZ1=2353
TPL_ZFS_RAIDZ2=2354
TPL_ZFS_RAIDZ3=2355
DD_DIRECTORIES=153
DD_USERS=3
......@@ -38,7 +43,7 @@ done
#done
## Lookup our internal storage devices in the db
Q="SELECT PK_Device, Description FROM Device WHERE FK_DeviceTemplate IN ($TPL_GENERIC_INTERNAL_DRIVE, $TPL_GENERIC_SAMBA_SHARE, $TPL_GENERIC_NFS_SHARE, $TPL_RAID_0, $TPL_RAID_1, $TPL_RAID_5)"
Q="SELECT PK_Device, Description FROM Device WHERE FK_DeviceTemplate IN ($TPL_GENERIC_INTERNAL_DRIVE, $TPL_GENERIC_SAMBA_SHARE, $TPL_GENERIC_NFS_SHARE, $TPL_RAID_0, $TPL_RAID_1, $TPL_RAID_5, $TPL_ZFS_POOL, $TPL_ZFS_MIRROR, $TPL_ZFS_RAIDZ1, $TPL_ZFS_RAIDZ2, $TPL_ZFS_RAIDZ3)"
InternalOwnStorageDevices=$(RunSQL "$Q")
set -o noglob
......
......@@ -55,13 +55,10 @@ if [[ "$3" != "demonized" ]] ;then
for d in $ActiveDrives; do parted -a optimal -s $d mklabel gpt; done
Log "Using zpool to actually create the pool"
zpool create $name mirror $ActiveDrives
zpool create -m legacy "$name" mirror $ActiveDrives
zpool_err="$?"
Log "Process 'zpool create $name $ActiveDrives' exited with error $zpool_err"
Log "Setting mount point to legacy for PlutoStorageDevices"
zfs set mountpoint=legacy $name
sleep 3
# Update Raid Information
......
......@@ -56,13 +56,10 @@ if [[ "$3" != "demonized" ]] ;then
for d in $ActiveDrives; do parted -a optimal -s $d mklabel gpt; done
Log "Using zpool to actually create the pool"
zpool create $name $ActiveDrives
zpool create -m legacy "$name" $ActiveDrives
zpool_err="$?"
Log "Process 'zpool create $name $ActiveDrives' exited with error $zpool_err"
Log "Setting mount point to legacy for PlutoStorageDevices"
zfs set mountpoint=legacy $name
sleep 3
# Update Raid Information
......
......@@ -55,13 +55,10 @@ if [[ "$3" != "demonized" ]] ;then
for d in $ActiveDrives; do parted -a optimal -s $d mklabel gpt; done
Log "Using zpool to actually create the pool"
zpool create $name raidz1 $ActiveDrives
zpool create -m legacy "$name" raidz1 $ActiveDrives
zpool_err="$?"
Log "Process 'zpool create $name $ActiveDrives' exited with error $zpool_err"
Log "Setting mount point to legacy for PlutoStorageDevices"
zfs set mountpoint=legacy $name
sleep 3
# Update Raid Information
......
......@@ -55,13 +55,10 @@ if [[ "$3" != "demonized" ]] ;then
for d in $ActiveDrives; do parted -a optimal -s $d mklabel gpt; done
Log "Using zpool to actually create the pool"
zpool create $name raidz2 $ActiveDrives
zpool create -m legacy "$name" raidz2 $ActiveDrives
zpool_err="$?"
Log "Process 'zpool create $name $ActiveDrives' exited with error $zpool_err"
Log "Setting mount point to legacy for PlutoStorageDevices"
zfs set mountpoint=legacy $name
sleep 3
# Update Raid Information
......
......@@ -55,13 +55,10 @@ if [[ "$3" != "demonized" ]] ;then
for d in $ActiveDrives; do parted -a optimal -s $d mklabel gpt; done
Log "Using zpool to actually create the pool"
zpool create $name raidz3 $ActiveDrives
zpool create -m legacy $name raidz3 $ActiveDrives
zpool_err="$?"
Log "Process 'zpool create $name $ActiveDrives' exited with error $zpool_err"
Log "Process 'zpool create "$name" $ActiveDrives' exited with error $zpool_err"
Log "Setting mount point to legacy for PlutoStorageDevices"
zfs set mountpoint=legacy $name
sleep 3
# Update Raid Information
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment