• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 379
  • Last Modified:

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

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
Tufin
Asked:
Tufin
  • 5
  • 4
  • 2
  • +2
1 Solution
 
Jaroslav MrazCTOCommented:
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
 
TufinAuthor Commented:
Do i have to reset the machine to change?
0
 
farzanjCommented:
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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
Jaroslav MrazCTOCommented:
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
 
farzanjCommented:
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
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I would use Gparted Live CDROM

or, use Gparted Magic
0
 
SandyCommented:
re-scan the LUN/Disk

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

this will work.

TY/SA
0
 
TufinAuthor Commented:
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
 
Jaroslav MrazCTOCommented:
In ESX server you can do it simple in edit disk and change the number.
0
 
TufinAuthor Commented:
any tips about how to do it in Gparted at the best way or is it just drag and apply ...
0
 
Jaroslav MrazCTOCommented:
1. Do a snapshoot in vmware to be safe :)

Then yes simple drag and apply.
0
 
TufinAuthor Commented:
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
 
Jaroslav MrazCTOCommented:
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 5
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now