Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a production server that is running on CentOS. I'd like to create a partition on the server without having to reinstall everything. I have CLI and VNC access to the remote server. Is there anyway that I can create a partition safely?

Here's my output from fdisk -l

Disk /dev/sda: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00033d5e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       10444    83885056   83  Linux


share|improve this question

closed as not a real question by Michael Hampton, Scott Pack, mdpc, Ward, Magellan Nov 22 '12 at 0:14

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Is there free space on the disk? – Shane Madden Nov 21 '12 at 2:59
Hi @ShaneMadden. Yes there is. I'd like to partition 50GB from my existing drive. Thanks. – Kimmel Nov 21 '12 at 3:25
@Kimmel (1) WHY? (What's the endgame? Why do you want/need to do what you're asking?) ; (2) Do you want to create a new partition, or extend an existing one? :-) – voretaq7 Nov 21 '12 at 3:26
Hi @voretaq7 I'm to install MySQL and one of the requirement is that the database itself should reside on another partition. – Kimmel Nov 21 '12 at 3:32
@Kimmel So this space is completely free right now, not assigned to an existing partition, correct? – Shane Madden Nov 21 '12 at 3:34

You currently have one big 85G partition that is occupying all the space on your disk. So, assuming you want to create a partition on the same /dev/sda disk, you'll have to shrink your current /dev/sda1 partition first. Unfortunately, this cannot be done online. You will have to reboot with a live rescue disk and shrink it from there. The tools to use are resize2fs (you are running CentOS so you are most likely using a flavor of the ext file system), then fdisk to delete and re-create the partition with a smaller size, and then... fdisk again to create the new partition.

As usual, be careful. These are potentially destructive tools, so maybe you should practice in a virtual machine first.

share|improve this answer
Practice and have a backup ready which is tested and known to be restorable. – Sven Nov 21 '12 at 5:26

Based on your requirements and your lack of experience it is much safer to leave the server as it is.

Adding another partition will not improve the performance. MySQL will run fine on the same partition as the rest of the OS. Do not try to optimize something when you do not know where is the bottleneck.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.