T
It depends of type of storage you are using.Hi ,
I need some advise, how to resize harddisk ?
Regards,
Tristan
# df -l
dev/mapper/pve-root ... /
tmpfs ... /lib/ini/rw
udev ... /dev
tmpfs ... /dev/shm
/dev/mapper/pve-data ... /var/lib/vz
/dev/sda1 ... /boot
#fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 * 1 66 524288 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 66 60801 487859712 8e Linux LVM
Disk /dev/dm-0: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-1: 103.0 GB, 103079215104 bytes
255 heads, 63 sectors/track, 12532 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-2: 387.9 GB, 387901816832 bytes
255 heads, 63 sectors/track, 47159 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
# [B]lvdisplay[/B]
--- Logical volume ---
LV Name /dev/pve/swap
VG Name pve
LV UUID fSULxh-H69J-3iu6-6fGv-zyUf-vux4-KUMMp9
LV Write Access read/write
LV Status available
# open 1
LV Size 4.00 GB
Current LE 1024
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:0
--- Logical volume ---
LV Name /dev/pve/root
VG Name pve
LV UUID 64Zfbj-BOdy-Icqm-93wW-Hv6V-eChf-c3ROyL
LV Write Access read/write
LV Status available
# open 1
LV Size 96.00 GB
Current LE 24576
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1
--- Logical volume ---
LV Name /dev/pve/data
VG Name pve
LV UUID jSTxnG-kpLx-eyac-SWwy-hgoY-Wy9N-lPgf0l
LV Write Access read/write
LV Status available
# open 1
LV Size 361.26 GB
Current LE 92483
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:2
# [B]vgdisplay[/B]
--- Volume group ---
VG Name pve
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 465.26 GB
PE Size 4.00 MB
Total PE 119106
Alloc PE / Size 118083 / 461.26 GB
Free PE / Size 1023 / 4.00 GB
VG UUID EPCWMl-xc1n-3xUB-V5TD-YQ1l-6pZY-4NZ464
# [B]pvdisplay -m[/B]
--- Physical volume ---
PV Name /dev/sda2
VG Name pve
PV Size 465.26 GB / not usable 1.50 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 119106
Free PE 1023
Allocated PE 118083
PV UUID JogU1D-cKPA-dQNL-2EwU-YTZT-4kV2-iGkHk6
--- Physical Segments ---
Physical extent 0 to 1023:
Logical volume /dev/pve/swap
Logical extents 0 to 1023
Physical extent 1024 to 25599:
Logical volume /dev/pve/root
Logical extents 0 to 24575
Physical extent 25600 to 118082:
Logical volume /dev/pve/data
Logical extents 0 to 92482
Physical extent 118083 to 119105:
FREE
vgdisplayI never liked easy. So let's do it.
I just want to reduce the LVM to add a Primary/Extended partition that I can use as a 16GB Swap outside of the existing LVM (additional memory for system is on its way).Code:# lvdisplay --- Logical volume --- LV Name /dev/pve/swap VG Name pve LV UUID fSULxh-H69J-3iu6-6fGv-zyUf-vux4-KUMMp9 LV Write Access read/write LV Status available # open 1 LV Size 4.00 GB Current LE 1024 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:0 --- Logical volume --- LV Name /dev/pve/root VG Name pve LV UUID 64Zfbj-BOdy-Icqm-93wW-Hv6V-eChf-c3ROyL LV Write Access read/write LV Status available # open 1 LV Size 96.00 GB Current LE 24576 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:1 --- Logical volume --- LV Name /dev/pve/data VG Name pve LV UUID jSTxnG-kpLx-eyac-SWwy-hgoY-Wy9N-lPgf0l LV Write Access read/write LV Status available # open 1 LV Size 361.26 GB Current LE 92483 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:2
My reason: I have found that system performance is improved when SWAP is in its own Primary/Logical partition outside of an LVM...
vgdisplay
pvdisplay -m