[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to add 2nd hard drive to Linux for additional storage, CENT OS 4 and it Virtual Server

Posted on 2009-04-28
12
Medium Priority
?
1,473 Views
Last Modified: 2013-12-06
I need help and I need it ASAP as this is actually critical for a mail server running out of space.

This is a Virtual Server on VMWARE. All I want to do it add a 20 GB hard drive to this linux server.

Also if it makes it any easier I do have Webmin installed on this server as well.

Thanks in advance.
0
Comment
Question by:jpquonce
  • 6
  • 4
  • 2
12 Comments
 
LVL 4

Expert Comment

by:hugetoon
ID: 24250262
Your question is not copletely cllear.
Do you need to add an additional virtual disk to a virtual machine or do you want to install a real hard disk in a real server that runs a vmware server?

0
 
LVL 6

Author Comment

by:jpquonce
ID: 24250289
Sorry in my head it sounded right. I am adding a Virtual Disk to the VM.

Right now it has a 20GB virtual disk and I want to add an additional 20GB virtual disk.
0
 
LVL 4

Expert Comment

by:hugetoon
ID: 24250338
If you want to add space to a VM and you have enougth space on the host system,  you may just grow the existing vmdk.
to grow an existing vmdk you can use  vmware-vdiskmanager

for example if your vmdk is 100G and you want it to be 120G and is named disk.vmdk:

vmware-vdiskmanager -x120GB disk.vmdk

/!\ Pay attention to the fact that you specify the NEW size, NOT the amount to be added /!\

Then inside the VM you have to grow the partition and the filesystem inside

The particular sequence is dependent on your partition layout and if you use LVM.

Of course all this is DANGEROUS and you should have a working backup before starting
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 19

Expert Comment

by:vmwarun - Arun
ID: 24250348
On which VMware Product is the Cent OS Server hosted ? VMware Workstation, VMware Server or VMware ESX
0
 
LVL 4

Expert Comment

by:hugetoon
ID: 24250358
Creating an additional virtual disk in a VM is rather simple using the GUI: just edit the VM settings and add a hard disk. To do so (aswell as growing an existing one) you'll have to shutdown the VM
0
 
LVL 6

Author Comment

by:jpquonce
ID: 24250432
It is ESX 3x.

I have added a virutal disk via Virtual Center but I am having trouble getting linux to see it properly.

I don't care if I expand it or get linux to see another Hard Drive. I need more space and I am having trouble with the linux part of it.

Also I just tried to run vmware-vdiskmanager -x30GB dis.vmdk and it can not find vmware-vdiskmanager
0
 
LVL 4

Expert Comment

by:hugetoon
ID: 24250495
Did you add an SCSI or an IDE disk ?
what you get when you do

cat /proc/partitions

in the VM ?
0
 
LVL 6

Author Comment

by:jpquonce
ID: 24250583
SCSI and this is the output


[root@clone ~]# cat /proc/partitions
major minor  #blocks  name

   8     0   20971520 sda
   8     1     104391 sda1
   8     2   20860402 sda2
   8    16   20971520 sdb
 253     0   19759104 dm-0
 253     1    1048576 dm-1

So I am guessing sdb is the new one but what do I need to do now.

Thanks again I really appriciate your help.
0
 
LVL 19

Expert Comment

by:vmwarun - Arun
ID: 24250760
fdisk -l commands lists the currently connected hdds to your VM.

Go through this doc to create your partitions - http://tldp.org/HOWTO/html_single/Partition/
0
 
LVL 4

Accepted Solution

by:
hugetoon earned 2000 total points
ID: 24250892
/dev/sdb seems to be your drive, it is blank i.e. no partitions.

Now you need to create a partition: run cfdisk, navigate in menus to create an ext2 partition

Then you need to create a filesystem on it: mke2fs -j /dev/sdb1

And then mount it: mount /dev/sdb1 /path/

Additionnaly you'll need to edit /etc/fstab to make the mount persistent.



0
 
LVL 4

Expert Comment

by:hugetoon
ID: 24250950
Alternatively you seem to have an LVM setup
 so may be it would be better to add /dev/sdb1 as a phisical volume instead of an independent filesystem
0
 
LVL 6

Author Closing Comment

by:jpquonce
ID: 31575429
Thanks for the quick responses and the help.
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

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

In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
Ransomware is a malware that is again in the list of security  concerns. Not only for companies, but also for Government security and  even at personal use. IT departments should be aware and have the right  knowledge to how to fight it.
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 join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:

830 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