Erweitern eines PV on VMware + Swap LV

1. expand on vmware the HDD Size

2. maybe restart the virtual machine
or run following command
echo „- – -“ > /sys/class/scsi_host/host0/scan

3. fdisk -l
fdisk /dev/sda

-l

Device          Boot      Start         End      Blocks             Id   System
/dev/sda1   *                1                 65      522081          83  Linux
/dev/sda2                   66           1958      15205522+  83  Linux

delete last partition(2) with d

create new partition with n, p, 2

use default option/counter of blocks

check ist with l

Device          Boot      Start         End      Blocks             Id   System
/dev/sda1   *                1                 65      522081          83  Linux
/dev/sda2                   66           1958      15205522+  83  Linux

if all is OK then write the partition-table now with w

restart the virtual machine

or run following command:

partx -a /dev/sda2

after restart make a pvresize /dev/sda2

pvs

then a lvresize -L 4GB /dev/sys_vg/swap_lv

(xfs_growfs /) is as replacement for resize2fs
swapoff -a

mkswap /dev/sys_vg/swap_lv

swapon -a

free -m

total       used          free            shared    buffers     cached
Mem:                               3775      239           3536          0               13              154
-/+ buffers/cache:     71            3704
Swap:                               4095      0                4095

Speichere in deinen Favoriten diesen permalink.

Eine Antwort zu Erweitern eines PV on VMware + Swap LV

  1. VersuS sagt:

    ls /sys/class/scsi_host

    echo “- – -” > /sys/class/scsi_host/host0/scan

Schreibe einen Kommentar