Ensure to enable all LVM devices
This commit is contained in:
parent
c9473c6cdf
commit
459c9fb8aa
|
@ -22,7 +22,7 @@ fi
|
|||
|
||||
## Dependencies {{{
|
||||
apt update
|
||||
apt install aptitude btrfs-progs bzip2 cryptsetup debconf-i18n dialog dmsetup htop ipcalc isc-dhcp-client isc-dhcp-common locales lvm2 openssh-server pciutils tmux vim-nox wget zsh
|
||||
apt install -y aptitude btrfs-progs bzip2 cryptsetup debconf-i18n dialog dmsetup htop ipcalc isc-dhcp-client isc-dhcp-common locales lvm2 openssh-server pciutils tmux vim-nox wget zsh
|
||||
## }}}
|
||||
|
||||
debug_message() { # {{{
|
||||
|
@ -36,8 +36,6 @@ debug_message() { # {{{
|
|||
}
|
||||
# }}}
|
||||
|
||||
## Try to guess the VG name by using the last VG detected
|
||||
vgname=$(vgdisplay --short | tail -n 1 | sed 's/.*"\(.*\)" .*/\1/')
|
||||
## If the script should create extra volume (eg. backup, virt, Proxmox,…)
|
||||
manage_extra_lv=0
|
||||
## Is LUKS {{{
|
||||
|
@ -69,6 +67,15 @@ Try to open Luks on ${luks_pv_name} − ${hdd}2"
|
|||
fi
|
||||
fi
|
||||
## }}}
|
||||
## Enable LVM {{{
|
||||
### Ensure to enable LVM devices
|
||||
pvscan --quiet > /dev/null
|
||||
vgscan --quiet > /dev/null
|
||||
vgchange --activate y --quiet > /dev/null
|
||||
|
||||
## Try to guess the VG name by using the last VG detected
|
||||
vgname=$(vgdisplay --short | tail -n 1 | sed 's/.*"\(.*\)" .*/\1/')
|
||||
## }}}
|
||||
## Is BTRFS {{{
|
||||
root_fs_type=$(lsblk -f /dev/mapper/"${vgname}"-root | awk '/root/ { print $2 }')
|
||||
if [ "${root_fs_type}" = "btrfs" ]; then
|
||||
|
|
Loading…
Reference in New Issue