Test if the script should manage partitions
This commit is contained in:
parent
e5dbbe5b14
commit
d04ed9310b
|
@ -10,8 +10,11 @@ else
|
|||
fi
|
||||
## Volume Group name to use for LVM
|
||||
vgname="ovhsys"
|
||||
## If the script should manage the partitions (delete, add,…)
|
||||
manage_part=0
|
||||
|
||||
# Partitionning {{{
|
||||
if [ "${manage_part}" -eq 0 ]; then
|
||||
## Remove all old partitions
|
||||
for part_number in 1 2 3 4 5 6 7 8; do
|
||||
[ -b "${hdd}""${part_number}" ] && parted "${hdd}" rm "${part_number}"
|
||||
|
@ -28,6 +31,7 @@ parted "${hdd}" mkpart primary 4194kB 100%
|
|||
parted "${hdd}" set 2 lvm on
|
||||
sudo pvcreate "${hdd}"2
|
||||
sudo vgcreate "${vgname}" ${hdd}2
|
||||
fi
|
||||
|
||||
## }}}
|
||||
# }}}
|
||||
|
|
Loading…
Reference in New Issue