empty_block_partition with raid

This commit is contained in:
pvincent
2024-04-08 17:04:46 +04:00
parent a12537a81d
commit 0af189930d
+2 -1
View File
@@ -111,7 +111,8 @@ projects: []
cluster: null
EOF
else
empty_block_partition=$(lsblk -o NAME,FSTYPE,GROUP --noheadings -p | grep -E ^.─ | grep disk | awk '{if($3=="") print $1}' | cut -d'/' -f3)
#empty_block_partition=$(lsblk -o NAME,FSTYPE,GROUP --noheadings -p | grep -E ^.─ | grep disk | awk '{if($3=="") print $1}' | cut -d'/' -f3)
empty_block_partition=$(lsblk -o NAME,PTTYPE,FSTYPE -ti -P | grep 'PTTYPE="" FSTYPE=""' | head -n1 | cut -d'"' -f2)
if [[ -n "$empty_block_partition" ]]; then
echo "--------------------------------"
echo "use empty block partition /dev/$empty_block_partition for speed and optimization"