I am running a debian server on Windows in Hyper-V, I have expanded the Hyper-V partition to 2T, now I would like to expand the Debian partition to use that new space. The new space will be for videos, so I am thinking the easiest thing to do is simply create a new partition and mount that and save the video in the partition. I am running from the cmd line, so I need some assistence in creating the partition. I have both fdisk and parted install. Here is the current state of things:
Disk /dev/sda: 2 TiB, 2199023255552 bytes, 4294967296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x8427e4f2
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 499711 497664 243M 83 Linux
/dev/sda2 501758 266336255 265834498 126.8G 5 Extended
/dev/sda5 501760 266336255 265834496 126.8G 8e Linux LVM
Partition 2 does not start on physical sector boundary.
Disk /dev/mapper/UniFiServer--vg-root: 124.8 GiB, 133957681152 bytes, 261636096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/UniFiServer--vg-swap_1: 2 GiB, 2147483648 bytes, 4194304 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
I have made some progress, it appears that I succeeded in using parted to actually extend /dev/sda2 & /dev/sda5 and with the help of Romeo, used pvresize to extend them to show 2T, now I just need some help on actually creating something I can use, the lvcreate command isn't working:
Disk /dev/sda: 2 TiB, 2199023255552 bytes, 4294967296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x8427e4f2
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 499711 497664 243M 83 Linux
/dev/sda2 501758 4294921875 4294420118 2T 5 Extended
/dev/sda5 501760 4294921875 4294420116 2T 8e Linux LVM
Partition 2 does not start on physical sector boundary.
Disk /dev/mapper/UniFiServer--vg-root: 124.8 GiB, 133957681152 bytes, 261636096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/UniFiServer--vg-swap_1: 2 GiB, 2147483648 bytes, 4194304 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
$ sudo vgs
VG #PV #LV #SN Attr VSize VFree
UniFiServer-vg 1 2 0 wz--n- 2.00t 1.88t
$ sudo lvcreate -L 1.88t --name videodata UniFiServer--vg
Volume group "UniFiServer--vg" not found
Cannot process volume group UniFiServer--vg