LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-22-2012, 03:00 PM   #1
amit.agrawal21
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Rep: Reputation: Disabled
Want to swap the booting disk showing in Linux VMware


Hi All,

This is my first question here and I am almost new to Linux. The background of my problem is...

I downloaded the Hadoop virtual machine(vmware) from Cloudera and there were some softwares that I wanted to install in that. However it(cloudera-demo-vm.vmdk) had the size of 4 GB only. Then I clicked on the hard disk portion of that virtual machine and it asked to clone a new virtual machine within same. So I did that and then the option to extend the disk was enabled in for the new vm(cloudera-demo-vm2.vmdk). I extended it to 10GB and it created the partition. I formatted and extended new partition(sdB, sdA was still showing 4GB) in Konquer utility.

But when I started my vm it still shows the same thing. when I give command "cat /proc/partitions" it shows me that there are sda, sda1, sda2 and had, hda1,hda2 partitions. Out of these one set is 4GB and another one is the extended on of 10 GB. When I see in "fstab" file it just shows 2 Label of ext3 and ext4 type. In which one of the label is same from which my linux vm starts.

Now if I go to Konquer disk partitioner utility it still shows two partitions sdA(4 GB) and sdB(10 GB).

My "fdisk" command doesn't return anything.

So I think if I can start the vm from extended partition it should work but how can I change that? If my understanding is not right then can anybody explain me what is happening here?

Thanks in advance guys !!
Amit
 
Old 08-23-2012, 08:39 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
When working with VMware clients you should not use external tools like this "Konquer utility" unless you run it from within the virtualization client or when you've booted the client with say a Live CD or rescue disk. The simplest way to add a new disk to a client would be to add one from the VMware client configuration menu, boot the client letting it detect the secondary disk, then partition it using fdisk and create a file system and then add the corresponding partition entries in the clients /etc/fstab.
 
Old 08-23-2012, 11:40 AM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,383

Rep: Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199
I have read this 5 times and I think I get the issue now.

You extended a virtual hard drive using the vm's tools. That allowed you to have more space on the original clients apparent size of drive. You should have some virtual hard drive now that has two partitions.

To change how the virtual machine boots, you'd need to fix the clients boot scheme. Example would be grub or lilo or other boot loader that tells the virtual computer to boot to a partition and load an OS.

What you wanted to do is simply copy and rename the vmdk and then fix the virtual machine construction so that it now has two virtual hard drives. Then you can either use the clients bios to select the drive you wish or change order in virtual machine construction.

I know you may not get all of that so ask away. I may not have understood the question either.
 
Old 08-24-2012, 12:35 PM   #4
amit.agrawal21
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for looking into it. I will try to explain in more detail.

I downloaded the vm (cloudera-demo-vm.vmdk) from cloudera. It was showing disk space of 4.7 GB when I fired "df -h". I will attach the screenshot of the vm settings which captured. When I clicked on the Hard disk section it is showing like this. Now if you see here the disk is showing the size 0 GB and the name is "virtual disk.vmdk" which is different than the one that I downloaded. So I was not sure what to do with it. Then I created another disk called cloudera-demo-vm2.vmdk" within the vm as is shown in 2nd & 3rd screenshot. and then I got the size 4.7 GB showing in the vm and from there I could extend it to 10 GB. It did some operation and it was extended to 10 GB.

Then I started my vm with Konquer Live CD. I saw two disks. One for 4.7 GB and another for 10 GB. I formatted the remaining space in 10 GB one.

Now I booted my vm and saw the "df -h" I still see the old config. Now I think you might be able to relate to what I wrote earlier. Please let me know if you want me to run any command and send the output for you guys to figure out. But I really appreciate your help.

Thanks
Amit
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2012-08-24 at 9.46.39 PM.png
Views:	3
Size:	60.5 KB
ID:	10457   Click image for larger version

Name:	Screen Shot 2012-08-24 at 9.47.05 PM.png
Views:	4
Size:	63.9 KB
ID:	10458   Click image for larger version

Name:	Screen Shot 2012-08-24 at 9.56.53 PM.png
Views:	4
Size:	134.6 KB
ID:	10459  
 
Old 08-24-2012, 04:36 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,383

Rep: Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199
Here is the deal. Let's start all over.

Take the vm and add a new drive the size you wish. So now you would be able to boot to the vm still and have a full 10G drive free. From here you could clone the drive to the free one. One thing you'd have to watchout for is how grub might name the drive. If it is "drive by id" UUID or drive by name then it needs to be changed to a generic like boot hd0 or such. Then just remove the original drive and leave the expanded drive to use as you wish.

I don't get those images so TobySGD may be correct that you are using VM tools and not using linux client to work on. Sorry to sound so vague.

You could have booted to the live cd image and used it to clone drive to drive and just try it that way. Use dd command and since it is a virtual machine you should be pretty safe. I mean dd within the vm, not host OS. Then switch drives/remove the original and boot to the new drive.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VMware RedHat guest - swap on LVM or disk partition prowla Linux - Virtualization and Cloud 6 02-11-2011 07:18 AM
my disk is shown as sda when booting into linux, but as hda inside vmware andreimatei Linux - Hardware 2 02-26-2007 05:30 PM
Linux 2.4 Kernels showing incorrect IDE disk geometry plambrechtsen Linux - Hardware 0 09-14-2003 08:18 PM
linux booting problem with non-initialized swap space the_twister Linux - General 1 09-04-2003 01:11 PM
Linux swap disk MichaelW Linux - General 4 02-16-2003 05:07 PM


All times are GMT -5. The time now is 04:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration