Solved

how to increase the hard disk of a Linux machine (Centos)

Posted on 2014-02-11
13
355 Views
Last Modified: 2014-02-24
Hi ,

i have a linux Machine that running on ESX 4.1
i would like to increase the disk space from 40 GB to 50 GB

from Virtual Machine proprieties of the linux machine i increased it to 50GB
but what are the commands i need to do from the Linux point of view?
0
Comment
Question by:Tufin
  • 5
  • 4
  • 2
  • +2
13 Comments
 
LVL 15

Expert Comment

by:Jaroslav Mraz
Comment Utility
Hi,

if you done it in vmware you must simple do it in OS

you can use LIVE BOOT CD if you like gui

or CMD

http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s2-disk-storage-parted-resize-part.html

both by gpart
0
 

Author Comment

by:Tufin
Comment Utility
Do i have to reset the machine to change?
0
 
LVL 31

Expert Comment

by:farzanj
Comment Utility
You need to decide which partition or partitions does the additional 10GB go to.

Before proceeding make sure to make a backup of all the data, in case anything goes wrong.

Do you have LVMs?  It is easier to increase your LVMs in size.  If it is a regular partition (non-LVM), then you can use some tool like gparted to change your partition size and file system size.

So again, there will be two steps involved:
1.  Increase the size of partition
2.  Increase the size of filesystem on that partition.
0
 
LVL 15

Expert Comment

by:Jaroslav Mraz
Comment Utility
No but you must reset it after.


And of course  DO A SNAPSHOOT BEFORE TRY  :) this will save you even you done something wrong.
0
 
LVL 31

Expert Comment

by:farzanj
Comment Utility
If you work well, you do not need to shut your machine down.


You normally don't need to restart/reset your machine.  You can use some utility like

partprobe


to re-read the partition table.
0
 
LVL 117

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE) earned 500 total points
Comment Utility
I would use Gparted Live CDROM

or, use Gparted Magic
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 13

Expert Comment

by:Sandy
Comment Utility
re-scan the LUN/Disk

#echo "- - -" > /sys/class/scsi_host/host*/scan

this will work.

TY/SA
0
 

Author Comment

by:Tufin
Comment Utility
i decided to test with gparted...

quick question .. on ESX 5.1 and Centos 4.0 can i enlarge the hardisk through Edit settings and just add more to "Provisioned Size" of VMDX or do i need to do it through SSH to esx console and run in there a VMFStools command ?
0
 
LVL 15

Expert Comment

by:Jaroslav Mraz
Comment Utility
In ESX server you can do it simple in edit disk and change the number.
0
 

Author Comment

by:Tufin
Comment Utility
any tips about how to do it in Gparted at the best way or is it just drag and apply ...
0
 
LVL 15

Expert Comment

by:Jaroslav Mraz
Comment Utility
1. Do a snapshoot in vmware to be safe :)

Then yes simple drag and apply.
0
 

Author Comment

by:Tufin
Comment Utility
when you change the hard disk size you are NOT ALLOWED to do snapshot because it can destory you VM..

its written in any document of vmware ..
0
 
LVL 15

Expert Comment

by:Jaroslav Mraz
Comment Utility
You are not alows to have snapshoot when you resizing vhd. In vmware but in os it doesnt metter. Ok but if you dont wanted then clone your system for backup. In 99% there is no problem but sometimes it can crash.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
When we have a dead host and we lose all connections to the ESXi, and we need to find a way to move all VMs from that dead ESXi host.
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now