• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Running out of drive space - Centos 6.5

bcaza27

New Pleskian
I am running Plesk 12 on Centos 6.5

I must have messed things up when I set it up as the root partition is only 50 gigs and I am at 43 gigs used

I need to expand this.

I am running this as a virtual server on Windows 2012 and have lots of space, and have actually set it for 512 gigs for this VM

Can someone tell me how to expand the root partition on the Centos?
 
Hello

Is it possible that you may have disk space, but need to increase the Size of the Logical Volume?



Step 1

First, log into your server via SSH.

Step 2

Once logged in, type df -h at the command prompt and hit ENTER.

The partition and logical volume sizes will be listed including the used disk space. In the image below, the var logical volume is 4GB. Assume that ~9GB of web content will be uploaded to the /var folder. The disk space needs to be increased before there is enough space to upload the content.

lvGrow1.png


Step 3

Next, type fdisk -l to view the total hard disk(s) size and partitions on the disk. It can also be noticed here that the physical partition /dev/sda3 is using Linux LVM.

lvGrow2.png


Step 4


Type the pvs command and press Enter.

|| Note for Cloud Servers: This works well for my dedicated servers, but the PSize value listed for cloud servers will often be bit smaller than the value listed by the fdisk command output, so not sure about that. ||

lvGrow3.png


Step 5


As stated above, our scenario requires roughly 9GB of data to be uploaded to the /var folder. Since the logical volume assigned to /var is only 4GB, we will increase this to 10GB using the lvextend command. The command below is to be used as reference only as the parameters will be different depending on your scenario.

The format for the lvextend command is as follows:
lvextend -L +6G /dev/mapper/vg00-var

lvGrow4.png


Step 6

Type df -h to display the disk free space once again. The lvextend operation finished successfully in the last step however the /dev/mapper/vg00-var size is still only showing 4.0G. This is because, while the logical volume was increased successfully, the file system needs to be extended to take advantage of the full space of the logical volume.

lvGrow5.png


Step 7

Type lvs to show the logical volume information once again. Here, we can confirm that the logical volume has successfully been extended to 10 gigabytes. In the next steps, we will increase the file system to match the logical volume size.

lvGrow6.png


Step 8

Type mount and press ENTER to display the mounted file systems. From the output, we find that the /dev/mapper/vg00-var logical volume is using xfs (with the introduction of CentOS 6, the default filesystem is ext4).

lvGrow7.png


Step 9

To increase the file system to match that of the logical volume, we will use the xfs_growfs command if the filesystem uses xfs or resize2fs if the filesystem is ext4.

Typing xfs_growfs /var or resize2fs /dev/mapper/vg00-var (depending on which filesystem is used on your system) will extend the file system to the 10 gigabyte limit of the logical volume.

lvGrow8.png



|| NOTE: Some older operating systems will need to use the resize4fs command if the resize2fs command does not work. ||

Step 10

Type df -h to display the disk free space to confirm that the file system has been extended.


lvGrow9.png
 
Last edited:
I should hope you would be more concerned with answering requests for help than investigating the source of the answers others share. But to answer your question, yes, I'm pretty sure it's fine, as lists, titles, instructions and the like are not subject to copyright laws. Of course, the images may be subject to copyright, but as you so astutely discovered, I did not copy them. Besides, aren't they one of your partners?

Frankly, I thought it might be useful to demonstrate what a truly helpful answer looks like.
 
Providing direct link to helpful article is much more correctly that copying content here.
Please consider it as warning from moderator.
Thanks.
 
Just wondering if you might actually state what the warning is. Surely you don't think all the content in this forum is originally written by the poster, do you?

And about the help on the sFTP issue?
 
Back
Top