Adding a new partition to an existing drive
I currently have a vps through OVH. I upgraded the package to double the disk size. However, they are very "hands off" (which I knew going in, part of why the hosting is so inexpensive), so when they increased the disk size it's up to me now to add the new partition. The disk is actually larger now, it's not a separate device, so I am concerned because when researching how to do this I found this warning from the CentOS docs:
Chapter 6. Managing Disk Storage
Do not attempt to create a partition on a device that is in use.
I am guessing the same, or even moreso, warning would apply to increasing the disk size. As I only have whm and ssh access to the server, I am also guessing the device will always be in use when I access it. How can I safely utilize this new disk space? This is what I get with parted -> print free:
Thanks! -Michael
I am guessing the same, or even moreso, warning would apply to increasing the disk size. As I only have whm and ssh access to the server, I am also guessing the device will always be in use when I access it. How can I safely utilize this new disk space? This is what I get with parted -> print free:
root@ns1 [~]# parted
GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print free
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
32.3kB 2097kB 2065kB Free Space
1 2097kB 53.2GB 53.2GB primary ext3 boot
2 53.2GB 53.7GB 499MB primary linux-swap(v1)
53.7GB 107GB 53.7GB Free Space
Thanks! -Michael
-
Hello :) OVH offers the following guide for adjusting the partition: OVH : VPSLinuxPartition Thank you. 0 -
So are you saying it's safe to follow those instruction on a device that is in use? Also, those instructions appear to be for deleting and recreating a partition, which I am pretty sure is not what I need to do here. I just need to partition the free space so I can use it as /home2. -Michael 0 -
So are you saying it's safe to follow those instruction on a device that is in use? Also, those instructions appear to be for deleting and recreating a partition, which I am pretty sure is not what I need to do here. I just need to partition the free space so I can use it as /home2.
I don't believe OVH advises doing this without extra caution: This change should be done with great caution. Any error can cause total data loss. It is therefore advisable to take a snapshot before starting. Or contact support to do this as part of an intervention for a fee.
They offer a service to make this change on your behalf, from what I read on their documentation. Thank you.0 -
I am not asking about mistakes, I am asking if it is safe to do this operation on a drive that is in use? If not, is there a way to remotely perform these operations without the disk being in use? This isn't an OVH specific question, it is in regards to a cpanel vps running on centos. Do you know the answer? -Michael 0 -
This isn't an OVH specific question, it is in regards to a cpanel vps running on centos. Do you know the answer?
It's important to keep in mind that while your question is about CentOS and cPanel, OVH uses a particular software for their VPS machines, so special care is sometimes required. For instance, often times VPS software allows for easier manipulation of partitions or easier methods of increasing free space compared to traditional dedicated servers. I suggest consulting with OVH to see how they suggest handling this. Thank you.0 -
Thank you for that. They finally got back to me to let me know that they don't handle it at all, even for a fee. It really is a completely unmanaged server. The offer to do it for a fee has to do with their European branch. So, that being said, is there an easy way to do a complete off-site backup when you don't have room to back up the server locally? Thanks! -Michael 0 -
It's better to backup the sites on remote ftp locations for the data safety. 0 -
And I am asking if there is an easy way to do this en masse for all of the cpanel accounts on the server, thanks. Is there? -Michael 0 -
So, that being said, is there an easy way to do a complete off-site backup when you don't have room to back up the server locally?
Hello :) Could you confirm how much space is available on the local server? This can help determine if the native backup features included with cPanel will help. Thank you.0 -
It is currently using 37G of 49G. The new partition will double the space. -Michael 0 -
It is currently using 37G of 49G
You can use the "Transfer Tool" option in Web Host Manager on the destination server (assuming you are creating a new server with the additional space). It's documented at: Transfer Tool - Documentation - cPanel Documentation Could you verify if that's the plan, or if you are simply seeking offsite storage solutions for your account backup archives? Thank you.0 -
Ah, neither. I am attempting to enlarge the existing partition, and I would like to back up the server somewhere before I do, in case something goes wrong. -Michael 0 -
and I would like to back up the server somewhere before I do, in case something goes wrong.
You can configure backups to a remote destination: Backup Configuration - Documentation - cPanel Documentation However, note that you may need to exclude the home directory on larger accounts and rsync that data over manually to the remote destination, depending on how large your accounts are. Thank you.0 -
Wouldn't there need to be enough free space on the local server to perform all of the account backups first? I am not sure there is. What about this, if I just rsync the home and mysql directories off site, what else would I need to backup in order to rebuild things if everything goes wrong? -Michael 0 -
New Wouldn't there need to be enough free space on the local server to perform all of the account backups first? I am not sure there is.
It's possible your system will run out of space during the backup generation, yes. How many accounts are on this server? You could manually package each account and then copy the account to the remote server via the command line: /scripts/pkgacct " Package a cPanel Account - Documentation - cPanel Documentation This way, you only need enough space to backup one account at a time. Manually copying the entire server is not supported, as configuration data is stored throughout the server. You could look into a solution from a company such as R1Soft for that type of backup. Thank you.0
Please sign in to leave a comment.
Comments
15 comments