Increasing the Amount of Disk Space Available in Debian 8

After increasing the disk in the control panel, you need to make available to the operating system:

Open a terminal (see connection instructions ) as root and enter the following commands:
root@Debian8x64:~# echo 1 > /sys/block/sda/device/rescanRun the parted utility:
root@Debian8x64:~# partedNext, execute the commands in the parted utility interface: Remember the disk size ZZ.ZGB
(parted) p
Model: Virtual disk (scsi)
Disk //sda: ZZ.ZGB
...

(parted) resizepart 2

If you do not have the “resizepart” command, then you are using a previous version of the “parted” utility, then you need to use the following instruction .

The value “End” – enter the new disk size in gigabytes – the value from the output of (parted) p, which we remembered earlier.

End? [YY.YGB]? ZZ.ZGBExit parted: The
(parted) quitfollowing information will be displayed:

Information: You may need to update /etc/fstab.

Run fdisk:
root@Debian8x64:~# fdisk /dev/sdaNext, execute commands in the interface of the fdisk utility:
Create a partition:
Command ( for help): nSelect the partition type – logical (L)
Select (default p): l

Adding logical partition X

Remember the partition number created during the execution of the command (in the example it is indicated as X)
Accept the default values ​​​​- press Enter twice: Change the partition type, while specifying the partition number that we remembered earlier (in the example it is indicated as X ) changes: In the displayed response, we see the line
First sector (XXX-YYY, default ZZZ):
Last sector, +sectors or +size{K,M,G} (XXX-YYY, default ZZZ):

Command (m for help): t
Partition number (1-X): X
Hex (type L to list codes): 8e
...
Command (m for help): w

root@Debian8x64:~# partx -v -a /dev/sda

...
/dev/sda: partition #X added
...

We initialize the section, instead of X we again use the section number that we remembered earlierroot@Debian8x64:~# pvcreate /dev/sdaX

Physical volume "/dev/sdaX" successfully created

Add a physical partition to an existing volume group:root@Debian8x64:~# vgextend  /dev/sdaX

Volume group "debian" successfully extended

Expanding a logical volumeroot@Debian8x64:~# lvextend -l +100%FREE /dev/debian/root

Extending logical volume root to YY.ZZ GiB
Logical volume root successfully resized

Expanding the file systemroot@Debian8x64:~# resize2fs /dev/debian/root

Done.

 

Welcome to the world of DomainRooster, where roosters (and hens) rule the roost! We're a one-stop shop for all your entrepreneurial needs, bringing together domain names and website hosting, and all the tools you need to bring your ideas to life. With our help, you'll soar to new heights and hatch great success. Think of us as your trusty sidekick, always there to lend a wing and help you navigate the sometimes-complex world of domain names and web hosting. Our team of roosters are experts in their fields and are always on hand to answer any questions and provide guidance. So why wait? Sign up today and join the ranks of the world's greatest entrepreneurs. With DomainRooster, the sky's the limit! And remember, as the saying goes, "Successful people do what unsuccessful people are not willing to do." So don't be afraid to take that leap of faith - DomainRooster is here to help you reach for the stars. Caw on!