removing bugs from lvm
This commit is contained in:
parent
405bffefd3
commit
c5c50b8d1d
|
|
@ -84,7 +84,7 @@ do_format() {
|
|||
do_lvm() {
|
||||
i=0
|
||||
while [[ "$i" -le "${#LVM_PART_NUM[@]}" ]]; do
|
||||
if [[ "$i" -eq "${#LVM_PART_NUM[@]}" ]]; then
|
||||
if [[ "${#LVM_PART_NUM[@]}" -eq 1 ]]; then
|
||||
lvcreate --extents 100%FREE "$LVM_VG" --name "${LVM_NAMES[$i]}"
|
||||
else
|
||||
lvcreate --size "${LVM_SIZES[$i]}" "$LVM_VG" --name "${LVM_NAMES[$i]}"
|
||||
|
|
|
|||
10
startup.sh
10
startup.sh
|
|
@ -98,16 +98,20 @@ set_lvm() {
|
|||
echo "And will be mounted at /mnt/ and other partitions will be mounted"
|
||||
echo "at /mnt/partition_name by making a directory /mnt/partition_name"
|
||||
|
||||
i=1
|
||||
i=0
|
||||
_LVM_NAMES=()
|
||||
LVM_SIZES=()
|
||||
if [[ -z "$_PART_NUM" ]]; then
|
||||
if [[ -z "$_PART_NUM" || "$_PART_NUM" -eq 1 ]]; then
|
||||
_PART_NUM=1
|
||||
_LVM_NAMES+=("root")
|
||||
LVM_SIZES+=("100%FREE")
|
||||
# LVM_SIZES+=("100%FREE")
|
||||
i=2
|
||||
fi
|
||||
while [[ $i -le "$_PART_NUM" ]]; do
|
||||
if [[ "$_PART_NUM" -eq 1 ]]; then
|
||||
read -r -p "Enter last partition name [like home]: " _LVM_NAME
|
||||
_LVM_NAMES+=("$_LVM_NAME")
|
||||
fi
|
||||
read -r -p "Enter $i partition name [like root]: " _LVM_NAME
|
||||
_LVM_NAMES+=("$_LVM_NAME")
|
||||
read -r -p "Enter $i partition size [like 25G, 200M]: " _LVM_SIZE
|
||||
|
|
|
|||
Loading…
Reference in New Issue