I have SLES 12SP1 running as a virtual machine in an ESXi 5.5 with this current partitions and volumes setup:
$> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 500G 0 disk
├─sda1 8:1 0 45G 0 part [SWAP]
├─sda2 8:2 0 2G 0 part /boot
├─sda3 8:3 0 405G 0 part
│ ├─1W16-dev 254:0 0 14G 0 lvm /udev
│ ├─1W16-home_lv 254:1 0 5G 0 lvm /home
│ ├─1W16-kdump_lv 254:2 0 16G 0 lvm /var/kump
│ ├─1W16-opt 254:3 0 30G 0 lvm /opt
│ ├─1W16-pasilog 254:4 0 55G 0 lvm /pasi/logs
│ ├─1W16-pasireport 254:5 0 12G 0 lvm /pasi/report
│ ├─1W16-tmp 254:6 0 10G 0 lvm /tmp
│ ├─1W16-usr 254:7 0 10G 0 lvm /usr/local
│ └─1W16-var 254:8 0 5.2G 0 lvm /var
└─sda4 8:4 0 48G 0 part /
sr0 11:0 1 1024M 0 rom
$> vgs
VG #PV #LV #SN Attr VSize VFree
1W16 1 9 0 wz--n- 405.00g 247.80g
[CODE]$> lvdisplay
— Logical volume —
LV Path /dev/1W16/dev
LV Name dev
VG Name 1W16
LV UUID ysJPsk-UAIg-Fo2V-R5NH-7BXN-1Kj1-AeKbmo
LV Write Access read/write
LV Creation host, time (none), 2016-02-19 20:04:12 -0500
LV Status available
open 1
LV Size 14.00 GiB
Current LE 3584
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 1024
Block device 254:0
— Logical volume —
LV Path /dev/1W16/home_lv
LV Name home_lv
VG Name 1W16
LV UUID Al6xt2-1fFO-NvpS-barF-rDzD-fN4T-ZdERIw
LV Write Access read/write
LV Creation host, time (none), 2016-02-19 20:04:12 -0500
LV Status available
open 1
LV Size 5.00 GiB
Current LE 1280
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 1024
Block device 254:1
— Logical volume —
LV Path /dev/1W16/kdump_lv
LV Name kdump_lv
VG Name 1W16
LV UUID 83DsjP-qVwE-0DUa-kYW3-JCOI-7LOq-tdXI90
LV Write Access read/write
LV Creation host, time (none), 2016-02-19 20:04:12 -0500
LV Status available
open 1
LV Size 16.00 GiB
Current LE 4096
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 1024
Block device 254:2
— Logical volume —
LV Path /dev/1W16/opt
LV Name opt
VG Name 1W16
LV UUID kCrXrM-nmFi-cQUe-1lME-6Dtm-ryeL-KKwloI
LV Write Access read/write
LV Creation host, time (none), 2016-02-19 20:04:12 -0500
LV Status available
open 1
LV Size 30.00 GiB
Current LE 7680
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 1024
Block device 254:3
— Logical volume —
LV Path /dev/1W16/pasilog
LV Name pasilog
VG Name 1W16
LV UUID oYR40M-cSuP-ZZTM-7ds6-Jbjn-cbcc-gEQrj8
LV Write Access read/write
LV Creation host, time (none), 2016-02-19 20:04:12 -0500
LV Status available
open 1
LV Size 55.00 GiB
Current LE 14080
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 1024
Block device 254:4
— Logical volume —
LV Path /dev/1W16/pasireport
LV Name pasireport
VG Name 1W16
LV UUID XX57wi-YjgE-kW5B-SBwF-tTYX-Odjy-FbZzeV
LV Write Access read/write
LV Creation host, time (none), 2016-02-19 20:04:12 -0500
LV Status available
open 1
LV Size 12.00 GiB
Current LE 3072
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 1024
Block device 254:5
— Logical volume —
LV Path /dev/1W16/tmp
LV Name tmp
VG Name 1W16
LV UUID C1Dg4K-oi7x-ofw1-L7gD-0OZ0-DjlK-X2TAnB
LV Write Access read/write
LV Creation host, time (none), 2016-02-19 20:04:12 -0500
LV Status available
open 1
LV Size 10.00 GiB
Current LE 2560
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 1024
Block device 254:6
— Logical volume —
LV Path /dev/1W16/usr
LV Name usr
VG Name 1W16
LV UUID vP79sC-vHAa-FHxa-BGLp-5QqX-8FsB-BEpKHd
LV Write Access read/write
LV Creation host, time (none), 2016-02-19 20:04:12 -0500
LV Status available
open 1
LV Size 10.00 GiB
Current LE 2560
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 1024
Block device 254:7
— Logical volume —
LV Path /dev/1W16/var
LV Name var
VG Name 1W16
LV UUID JBtd3V-wQuW-mhem-PPZD-XFYT-hTpb-xTS1mu
LV Write Access read/write
LV Creation host, time (none), 2016-02-19 20:04:12 -0500
LV Status available
open 1
LV Size 5.20 GiB
Current LE 1330
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 1024
Block device 254:8
[/CODE]
The sda3 is having 247.80g of unused space and I would like to return this space to the datastore of the ESXi host.
Base on my understanding, I would have to:
- Reduce the size of the sda3
- Then somehow reduce the size of the sda
- Then resize the provisioned space to this VM
I don’y know how to do 1 and 2.
Could someone please help?
Thank you,