LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices



Reply
 
Search this Thread
Old 06-21-2010, 04:45 AM   #1
fedora.linux.64
Member
 
Registered: Sep 2009
Posts: 34

Rep: Reputation: 15
host ran out of disk space, guest virtual disk got corrupt help please


hello I am using fedora 13 36bit with VMware-Workstation-Full-7.1.0-261024.i386.

Fedora 13 is my linux host

Winxp pro is my windows guest I have a virtual disk of 105gig where the problem is.

I ran out of disk space on my fedora host where the 105gig virtual disk was, while winxp guest was running and it gave me the option to retry or abort, I abort.

I Moved the 105gig virtual disk to another partion on fedora so winxp virtual disk would have enough space.

but it wont power on says the disk is corrput.

I then tryed to repair the virtual disk:

vmware-vdiskmanager Win.Xp.Pro-0.vmdk -R
The virtual disk, 'Win.Xp.Pro-0.vmdk', is corrupted but the repair process has failed.

I then tryed to mount it:

vmware-mount Win.Xp.Pro-0.vmdk /mnt/vmware
Failed to open disk: The specified virtual disk needs repair (60129558150)
Failed to mount disk 'Win.Xp.Pro-0.vmdk': Cannot open the virtual disk

I do not have a backup of the 105gig virutal disk ofcourse and I know better.

du -h Win.Xp.Pro-0.vmdk
59G Win.Xp.Pro-0.vmdk

any help or suggestions would be great

thank you
 
Old 06-21-2010, 06:04 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,777
Blog Entries: 54

Rep: Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976
It is not clear to me if you moved the VMDK while the VM was still running. What do 'qemu-img info -f vmdk Win.Xp.Pro-0.vmdk' (requires qemu) and 'vmware-mount.pl -p Win.Xp.Pro-0.vmdk' return? Can you make the disk read-only and attach it to another VM and run that?
 
Old 06-21-2010, 06:30 AM   #3
fedora.linux.64
Member
 
Registered: Sep 2009
Posts: 34

Original Poster
Rep: Reputation: 15
reply

hello unSpawn thanks for your reply

I did not move the VMDK while the VM was still running I had to abort the running VM then move the file.

I had to install qemu but here is what you requested:

qemu-img info -f vmdk Win.Xp.Pro-0.vmdk
image: Win.Xp.Pro-0.vmdk
file format: vmdk
virtual size: 105G (112742891520 bytes)
disk size: 59G

vmware-mount.pl -p Win.Xp.Pro-0.vmdk
Command not found.

I tryed without .pl and got:

vmware-mount -p Win.Xp.Pro-0.vmdk
Failed to open disk: The specified virtual disk needs repair (60129558150)
Failed to get the list of partitions: Cannot open the virtual disk

thank you
 
Old 06-21-2010, 06:47 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,777
Blog Entries: 54

Rep: Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976
You could try copy the VMDK to a raw disk and see if you can loop-mount it and use standard GNU/Linux tools after the conversion: 'qemu-img convert -f vmdk -O raw Win.Xp.Pro-0.vmdk Win.Xp.Pro-0.img'. Please ensure there's enough disk space to make the copy as I'm not sure if it will expand the virtual size of the 59GB VMDK to be actually 105GB.
 
Old 06-21-2010, 07:48 AM   #5
fedora.linux.64
Member
 
Registered: Sep 2009
Posts: 34

Original Poster
Rep: Reputation: 15
UnSpawn

ok making a backup now, then i will try what you said and will post the results here.
thank you
 
Old 06-21-2010, 09:03 AM   #6
fedora.linux.64
Member
 
Registered: Sep 2009
Posts: 34

Original Poster
Rep: Reputation: 15
reply

ok it converted it but i am unsure how to mount it next?

du -h Win.Xp.Pro-0.img
59G Win.Xp.Pro-0.img

# du -h Win.Xp.Pro-0.vmdk
59G Win.Xp.Pro-0.vmdk

mount -o loop Win.Xp.Pro-0.img /mnt/vmware
mount: you must specify the filesystem type
 
Old 06-21-2010, 09:19 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,777
Blog Entries: 54

Rep: Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976
Please run and post output of 'file Win.Xp.Pro-0.img; fdisk -l Win.Xp.Pro-0.img; disktype Win.Xp.Pro-0.img'. ('disktype' is http://disktype.sourceforge.net/ and the RPM is at the DAG repo).

Quote:
Originally Posted by fedora.linux.64 View Post
mount -o loop Win.Xp.Pro-0.img /mnt/vmware
mount: you must specify the filesystem type
Mounting a whole disk this way isn't useful. Run 'losetup -f' to find an empty slot then run 'losetup /dev/loop0 Win.Xp.Pro-0.img' (substitute "loop0" if necesary) to loop-mount the disk as a whole. If that works OK try 'kpartx -l /dev/loop0; kpartx -a /dev/loop0' to list partitions to be added and add them. If that works OK try 'disktype /dev/mapper/loop0p*' to see where you can access partitions separately.

Last edited by unSpawn; 06-21-2010 at 09:21 AM.
 
Old 06-21-2010, 09:46 AM   #8
fedora.linux.64
Member
 
Registered: Sep 2009
Posts: 34

Original Poster
Rep: Reputation: 15
reply

file Win.Xp.Pro-0.img; fdisk -l Win.Xp.Pro-0.img; disktype Win.Xp.Pro-0.img
Win.Xp.Pro-0.img: x86 boot sector, mbr; partition 1: ID=0xf, starthead 0, startsector 16065, 220170825 sectors, code offset 0xc0
You must set cylinders.
You can do this from the extra functions menu.

Disk Win.Xp.Pro-0.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1c646c02

Device Boot Start End Blocks Id System
Win.Xp.Pro-0.img1 2 13706 110085412+ f W95 Ext'd (LBA)
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(13705, 254, 63)
Win.Xp.Pro-0.img5 2 13706 110085381 7 HPFS/NTFS

--- Win.Xp.Pro-0.img
Regular file, size 105 GiB (112742891520 bytes)
DOS/MBR partition map
Partition 1: 105.0 GiB (112727462400 bytes, 220170825 sectors from 16065)
Type 0x0F (Win95 Ext'd (LBA))
Partition 5: 105.0 GiB (112727430144 bytes, 220170762 sectors from 16065+63)
Type 0x07 (HPFS/NTFS)
Windows NTLDR boot loader
NTFS file system
Volume size 105.0 GiB (112727429632 bytes, 220170761 sectors)

[root@Harley-D-F13 105.gig.ntfs]# losetup -f
/dev/loop1
[root@Harley-D-F13 105.gig.ntfs]# losetup /dev/loop1 Win.Xp.Pro-0.img

[root@Harley-D-F13 105.gig.ntfs]# kpartx -l /dev/loop1; kpartx -a /dev/loop1
loop1p1 : 0 2 /dev/loop1 16065
loop1p5 : 0 220170762 /dev/loop1 16128
[root@Harley-D-F13 105.gig.ntfs]# disktype /dev/mapper/loop1p

--- /dev/mapper/loop1p
disktype: Can't stat /dev/mapper/loop1p: No such file or directory
 
Old 06-21-2010, 10:13 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,777
Blog Entries: 54

Rep: Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976
You forgot to fill in the device name or use an asterisk as in: 'disktype /dev/mapper/loop1p*'. In any case now 'ntfsinfo -vfm /dev/mapper/loop1p5' or 'mkdir /mnt/rescue; ntfs-3g /dev/mapper/loop1p5 /mnt/rescue -o force,ro' should work.
 
Old 06-21-2010, 10:45 AM   #10
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
Why don't you just enlarge the VMWare virtual disk to give yourself some room, then see if you can repair it? I've never had a VMWare virtual disk become completely full because when it gets close I either remove some stuff or enlarge the disk. Just two weeks ago I enlarged a disk using Workstation 7.1 and it was a painless operation.

After enlarging the disk you also have to enlarge the filesystem. I don't know what you'd get into trying to do this with a corrupted disk. Using Windows 7 guest, the process was borderline trivial. Using an XP guest, I think you would have to boot the VM into a Linux Live CD and use GParted. In fact, you could try this anyway and see if GParted (and other tools such as testdisk) could give you insight into what, exactly, is wrong with the disk. You might even find you could access and recover from the disk that way, though I wouldn't put too much hope into that...

Lots of Linux software fails in a most unfriendly fashion when the disk is completely full; could be that VMWare Workstation is one of these.
 
Old 06-21-2010, 12:01 PM   #11
fedora.linux.64
Member
 
Registered: Sep 2009
Posts: 34

Original Poster
Rep: Reputation: 15
reply

unSpawn
that did the trick!

/dev/mapper/loop1p5 105G 66G 40G 63% /mnt/rescue

I am now making a full backup of the ntfs virtual disk now.

Is this disk going to be able to be used in VM or should I just delete it after I get my backup and start with a fresh virtual disk?

thank you!
 
Old 06-21-2010, 12:03 PM   #12
fedora.linux.64
Member
 
Registered: Sep 2009
Posts: 34

Original Poster
Rep: Reputation: 15
reply

jiml8 hi thanks for the reply
I do not know for sure but I dont think I could expand the disk since it was corrupt and needed to be repaired first?
 
Old 06-21-2010, 12:46 PM   #13
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by fedora.linux.64 View Post
jiml8 hi thanks for the reply
I do not know for sure but I dont think I could expand the disk since it was corrupt and needed to be repaired first?
I'm sure that depends on why it was corrupted.

I would say try it and see what happens. It will work, or it won't. Since you have a backup, it won't cost you anything but some time to try.

I'd like to know the answer too.
 
Old 06-23-2010, 07:11 AM   #14
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,777
Blog Entries: 54

Rep: Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976Reputation: 2976
Quote:
Originally Posted by fedora.linux.64 View Post
I am now making a full backup of the ntfs virtual disk now. Is this disk going to be able to be used in VM or should I just delete it after I get my backup and start with a fresh virtual disk?
Depends on how you make the backup. If the file system is backed up cleanly or can be fscked to clear any corruption and the "dirty" flag then you could try to re-convert it back to a VMDK and see if VMware is willing to recognize it. If you backed up only the partition and not the partition table this might require adding the new VMDK to a working VM guest so see if it's readable slash usable.
 
Old 06-24-2010, 12:29 AM   #15
fedora.linux.64
Member
 
Registered: Sep 2009
Posts: 34

Original Poster
Rep: Reputation: 15
reply

unSpawn
ok I will just make a new virtual drive for win xp now that I have a full backup of the one with errors on it thanks to you!

I got lost with the process that we just did if sometime you could explain what we did for each step please?

Also I would like to know how to mount my virtual disks from my fedora host with vmware-mount but I really dont understand how to do that yet if you could help with that would be great?

thank you
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ran out of disk space on / fof3 Linux - Newbie 5 12-17-2007 08:27 PM
where has my disk space gone? corrupt filesystem? matticus Suse/Novell 3 09-19-2006 11:06 PM
Ran out of disk space during upgrade - broke system DyeKid Slackware 7 08-22-2005 09:12 PM
bad compile -ran out of disk space juan18 Linux - Software 2 01-30-2005 12:32 PM
Ran out of disk space at the end of chapter 6!! DarkDrive Linux From Scratch 4 08-22-2003 05:15 AM


All times are GMT -5. The time now is 09:46 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration