Solved

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

Posted on 2014-02-11
13
358 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
ID: 39849904
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
ID: 39849912
Do i have to reset the machine to change?
0
 
LVL 31

Expert Comment

by:farzanj
ID: 39849926
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
ID: 39849929
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
ID: 39849930
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 118

Accepted Solution

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

or, use Gparted Magic
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 13

Expert Comment

by:Sandy
ID: 39851108
re-scan the LUN/Disk

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

this will work.

TY/SA
0
 

Author Comment

by:Tufin
ID: 39867508
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
ID: 39867518
In ESX server you can do it simple in edit disk and change the number.
0
 

Author Comment

by:Tufin
ID: 39867525
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
ID: 39867534
1. Do a snapshoot in vmware to be safe :)

Then yes simple drag and apply.
0
 

Author Comment

by:Tufin
ID: 39867540
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
ID: 39867564
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 is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an issue that we can get adding / removing permissions in the vCSA 6.0. We can also have issues searching for users / groups in the AD (using your identify sources). This is how one of the ways to handle this issues and fix it.
In this article, I show you step by step with screenshots to assist you - HOW TO: Deploy and Install the VMware vCenter Server Appliance 6.5 (VCSA 6.5), with some helpful tips along the way.
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…

911 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

23 Experts available now in Live!

Get 1:1 Help Now