Lost VMWare GUEST MACHINE after disk resize

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite
2












I tried to expand a VMWARE ESXI GUEST LINUX DISK without success.



After changing the size of the disk on the vSphere client, I rebooted the server and then lost the disk.



VMWARE GUEST says at the BOOT:




NO OPERATING SYSTEM FOUND




The weirdest thing is that I can't see any disk at the BIOS, but after rebooting with a Ubuntu live CD, I'm able to see SDB1 and SDA.



enter image description here



After the live boot:



enter image description here



Note that the SDA1 has a sub partition called SDA1P1 and SDA1P2. Another strange thing is that the first sector starts at 0 (ZERO).



So whenever I try to mount this unit it throws some errors out:




mount: mounting /dev/sda1 on /mnt/disk iled: invalid argument




And then I'm unable to mount the disk.



I tried some other stuff, like exporting the .VMDK file to another linux box.



So I had to mount a loopback block-device on my linux machine in order to see the content of the .VMDK.



To do that, I tried:



# kpartx -av "MYBOX.vmdk";
add map loop0p1 (252:2): 0 62814150 linear /dev/loop0 0
add map loop0p2 (252:3): 0 96390 linear /dev/loop0 62814150


Then I was capable to see the VMDK inside my linux box.



# fdisk -l /dev/loop0

Disk /dev/loop0 (Sun disk label): 255 heads, 63 sectors, 3916 cylinders
Units = sectors of 1 * 512 bytes

Device Flag Start End Blocks Id System
/dev/loop0p1 0 62814150 31407075 83 Linux native
/dev/loop0p2 u 62814150 62910540 48195 82 Linux swap


Now I got really excited! I can almost touch the disk, its juts a matter of mounting it, right?



Nope! :/



# mount /dev/mapper/loop0p1 /mnt/
mount: you must specify the filesystem type


Ok, it doesn't sound pretty good.



So I tried to check the superblocks on /dev/mapper/loop0p1:



# mke2fs -n /dev/mapper/loop0p1
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1966080 inodes, 7851768 blocks
392588 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
240 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000


Then I tried to run a FSCK on those blocks:



# e2fsck -b 32768 /dev/mapper/loop0p1 
e2fsck 1.42.9 (4-Feb-2014)
e2fsck: Bad magic number in super-block while trying to open /dev/mapper/loop0p1

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>


I actually got pretty far, but still no success.



Any help would be much appreciated.



UPDATES ON 03-27-18



I've been doing a lot of research lately.



Between a lot of things that didn't take me further, here's what I've done and got positive results.




mkfs.ext4 -S /dev/sdb1 -y




By doing this, I re-made the disk's filesystem. Nice, but very risky (do not do this if you don't have a copy of this disk -- when I did it, it was on a copied image). Please, read MKFS man page regarding the usage of "-S" option.



So OK, I got pretty far guys. I can almost see the light at the end of the tunnel. But before that, we need to do a full scan on the disk.



Let's do it!




fsck.ext4 /dev/sdb1 -y




Then I got a lot of output, basically the disk was entirely corrupted.



At this point, I've tried a lot of technics to recover just 10 files from the disk. Over a week working very hard on this.



Well, let's keep walking!



After all the output, I tried to mount the disk and then.. tchaaaannaaan!




mount /dev/sdb1 /mnt/




The disk was mounted.



Looking at its content, I can see lots of weird files and folders inside "lost+found" folder. Some of them starts with "#". I need more time to study this but basically, all human visible content was gone.



When I say BASICALLY, I really mean it.



I could find about 8GB of data on this VMDK image.



Now I've gotta figure out a way to find my miserable 10 files and re-install everything on another server.



Cheers!



-- If its not done yet, its 'cause it's not finished.










share|improve this question























  • any living soul on the mood to help?
    – Rafael Azevedo
    Mar 23 at 2:16














up vote
0
down vote

favorite
2












I tried to expand a VMWARE ESXI GUEST LINUX DISK without success.



After changing the size of the disk on the vSphere client, I rebooted the server and then lost the disk.



VMWARE GUEST says at the BOOT:




NO OPERATING SYSTEM FOUND




The weirdest thing is that I can't see any disk at the BIOS, but after rebooting with a Ubuntu live CD, I'm able to see SDB1 and SDA.



enter image description here



After the live boot:



enter image description here



Note that the SDA1 has a sub partition called SDA1P1 and SDA1P2. Another strange thing is that the first sector starts at 0 (ZERO).



So whenever I try to mount this unit it throws some errors out:




mount: mounting /dev/sda1 on /mnt/disk iled: invalid argument




And then I'm unable to mount the disk.



I tried some other stuff, like exporting the .VMDK file to another linux box.



So I had to mount a loopback block-device on my linux machine in order to see the content of the .VMDK.



To do that, I tried:



# kpartx -av "MYBOX.vmdk";
add map loop0p1 (252:2): 0 62814150 linear /dev/loop0 0
add map loop0p2 (252:3): 0 96390 linear /dev/loop0 62814150


Then I was capable to see the VMDK inside my linux box.



# fdisk -l /dev/loop0

Disk /dev/loop0 (Sun disk label): 255 heads, 63 sectors, 3916 cylinders
Units = sectors of 1 * 512 bytes

Device Flag Start End Blocks Id System
/dev/loop0p1 0 62814150 31407075 83 Linux native
/dev/loop0p2 u 62814150 62910540 48195 82 Linux swap


Now I got really excited! I can almost touch the disk, its juts a matter of mounting it, right?



Nope! :/



# mount /dev/mapper/loop0p1 /mnt/
mount: you must specify the filesystem type


Ok, it doesn't sound pretty good.



So I tried to check the superblocks on /dev/mapper/loop0p1:



# mke2fs -n /dev/mapper/loop0p1
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1966080 inodes, 7851768 blocks
392588 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
240 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000


Then I tried to run a FSCK on those blocks:



# e2fsck -b 32768 /dev/mapper/loop0p1 
e2fsck 1.42.9 (4-Feb-2014)
e2fsck: Bad magic number in super-block while trying to open /dev/mapper/loop0p1

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>


I actually got pretty far, but still no success.



Any help would be much appreciated.



UPDATES ON 03-27-18



I've been doing a lot of research lately.



Between a lot of things that didn't take me further, here's what I've done and got positive results.




mkfs.ext4 -S /dev/sdb1 -y




By doing this, I re-made the disk's filesystem. Nice, but very risky (do not do this if you don't have a copy of this disk -- when I did it, it was on a copied image). Please, read MKFS man page regarding the usage of "-S" option.



So OK, I got pretty far guys. I can almost see the light at the end of the tunnel. But before that, we need to do a full scan on the disk.



Let's do it!




fsck.ext4 /dev/sdb1 -y




Then I got a lot of output, basically the disk was entirely corrupted.



At this point, I've tried a lot of technics to recover just 10 files from the disk. Over a week working very hard on this.



Well, let's keep walking!



After all the output, I tried to mount the disk and then.. tchaaaannaaan!




mount /dev/sdb1 /mnt/




The disk was mounted.



Looking at its content, I can see lots of weird files and folders inside "lost+found" folder. Some of them starts with "#". I need more time to study this but basically, all human visible content was gone.



When I say BASICALLY, I really mean it.



I could find about 8GB of data on this VMDK image.



Now I've gotta figure out a way to find my miserable 10 files and re-install everything on another server.



Cheers!



-- If its not done yet, its 'cause it's not finished.










share|improve this question























  • any living soul on the mood to help?
    – Rafael Azevedo
    Mar 23 at 2:16












up vote
0
down vote

favorite
2









up vote
0
down vote

favorite
2






2





I tried to expand a VMWARE ESXI GUEST LINUX DISK without success.



After changing the size of the disk on the vSphere client, I rebooted the server and then lost the disk.



VMWARE GUEST says at the BOOT:




NO OPERATING SYSTEM FOUND




The weirdest thing is that I can't see any disk at the BIOS, but after rebooting with a Ubuntu live CD, I'm able to see SDB1 and SDA.



enter image description here



After the live boot:



enter image description here



Note that the SDA1 has a sub partition called SDA1P1 and SDA1P2. Another strange thing is that the first sector starts at 0 (ZERO).



So whenever I try to mount this unit it throws some errors out:




mount: mounting /dev/sda1 on /mnt/disk iled: invalid argument




And then I'm unable to mount the disk.



I tried some other stuff, like exporting the .VMDK file to another linux box.



So I had to mount a loopback block-device on my linux machine in order to see the content of the .VMDK.



To do that, I tried:



# kpartx -av "MYBOX.vmdk";
add map loop0p1 (252:2): 0 62814150 linear /dev/loop0 0
add map loop0p2 (252:3): 0 96390 linear /dev/loop0 62814150


Then I was capable to see the VMDK inside my linux box.



# fdisk -l /dev/loop0

Disk /dev/loop0 (Sun disk label): 255 heads, 63 sectors, 3916 cylinders
Units = sectors of 1 * 512 bytes

Device Flag Start End Blocks Id System
/dev/loop0p1 0 62814150 31407075 83 Linux native
/dev/loop0p2 u 62814150 62910540 48195 82 Linux swap


Now I got really excited! I can almost touch the disk, its juts a matter of mounting it, right?



Nope! :/



# mount /dev/mapper/loop0p1 /mnt/
mount: you must specify the filesystem type


Ok, it doesn't sound pretty good.



So I tried to check the superblocks on /dev/mapper/loop0p1:



# mke2fs -n /dev/mapper/loop0p1
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1966080 inodes, 7851768 blocks
392588 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
240 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000


Then I tried to run a FSCK on those blocks:



# e2fsck -b 32768 /dev/mapper/loop0p1 
e2fsck 1.42.9 (4-Feb-2014)
e2fsck: Bad magic number in super-block while trying to open /dev/mapper/loop0p1

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>


I actually got pretty far, but still no success.



Any help would be much appreciated.



UPDATES ON 03-27-18



I've been doing a lot of research lately.



Between a lot of things that didn't take me further, here's what I've done and got positive results.




mkfs.ext4 -S /dev/sdb1 -y




By doing this, I re-made the disk's filesystem. Nice, but very risky (do not do this if you don't have a copy of this disk -- when I did it, it was on a copied image). Please, read MKFS man page regarding the usage of "-S" option.



So OK, I got pretty far guys. I can almost see the light at the end of the tunnel. But before that, we need to do a full scan on the disk.



Let's do it!




fsck.ext4 /dev/sdb1 -y




Then I got a lot of output, basically the disk was entirely corrupted.



At this point, I've tried a lot of technics to recover just 10 files from the disk. Over a week working very hard on this.



Well, let's keep walking!



After all the output, I tried to mount the disk and then.. tchaaaannaaan!




mount /dev/sdb1 /mnt/




The disk was mounted.



Looking at its content, I can see lots of weird files and folders inside "lost+found" folder. Some of them starts with "#". I need more time to study this but basically, all human visible content was gone.



When I say BASICALLY, I really mean it.



I could find about 8GB of data on this VMDK image.



Now I've gotta figure out a way to find my miserable 10 files and re-install everything on another server.



Cheers!



-- If its not done yet, its 'cause it's not finished.










share|improve this question















I tried to expand a VMWARE ESXI GUEST LINUX DISK without success.



After changing the size of the disk on the vSphere client, I rebooted the server and then lost the disk.



VMWARE GUEST says at the BOOT:




NO OPERATING SYSTEM FOUND




The weirdest thing is that I can't see any disk at the BIOS, but after rebooting with a Ubuntu live CD, I'm able to see SDB1 and SDA.



enter image description here



After the live boot:



enter image description here



Note that the SDA1 has a sub partition called SDA1P1 and SDA1P2. Another strange thing is that the first sector starts at 0 (ZERO).



So whenever I try to mount this unit it throws some errors out:




mount: mounting /dev/sda1 on /mnt/disk iled: invalid argument




And then I'm unable to mount the disk.



I tried some other stuff, like exporting the .VMDK file to another linux box.



So I had to mount a loopback block-device on my linux machine in order to see the content of the .VMDK.



To do that, I tried:



# kpartx -av "MYBOX.vmdk";
add map loop0p1 (252:2): 0 62814150 linear /dev/loop0 0
add map loop0p2 (252:3): 0 96390 linear /dev/loop0 62814150


Then I was capable to see the VMDK inside my linux box.



# fdisk -l /dev/loop0

Disk /dev/loop0 (Sun disk label): 255 heads, 63 sectors, 3916 cylinders
Units = sectors of 1 * 512 bytes

Device Flag Start End Blocks Id System
/dev/loop0p1 0 62814150 31407075 83 Linux native
/dev/loop0p2 u 62814150 62910540 48195 82 Linux swap


Now I got really excited! I can almost touch the disk, its juts a matter of mounting it, right?



Nope! :/



# mount /dev/mapper/loop0p1 /mnt/
mount: you must specify the filesystem type


Ok, it doesn't sound pretty good.



So I tried to check the superblocks on /dev/mapper/loop0p1:



# mke2fs -n /dev/mapper/loop0p1
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1966080 inodes, 7851768 blocks
392588 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
240 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000


Then I tried to run a FSCK on those blocks:



# e2fsck -b 32768 /dev/mapper/loop0p1 
e2fsck 1.42.9 (4-Feb-2014)
e2fsck: Bad magic number in super-block while trying to open /dev/mapper/loop0p1

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>


I actually got pretty far, but still no success.



Any help would be much appreciated.



UPDATES ON 03-27-18



I've been doing a lot of research lately.



Between a lot of things that didn't take me further, here's what I've done and got positive results.




mkfs.ext4 -S /dev/sdb1 -y




By doing this, I re-made the disk's filesystem. Nice, but very risky (do not do this if you don't have a copy of this disk -- when I did it, it was on a copied image). Please, read MKFS man page regarding the usage of "-S" option.



So OK, I got pretty far guys. I can almost see the light at the end of the tunnel. But before that, we need to do a full scan on the disk.



Let's do it!




fsck.ext4 /dev/sdb1 -y




Then I got a lot of output, basically the disk was entirely corrupted.



At this point, I've tried a lot of technics to recover just 10 files from the disk. Over a week working very hard on this.



Well, let's keep walking!



After all the output, I tried to mount the disk and then.. tchaaaannaaan!




mount /dev/sdb1 /mnt/




The disk was mounted.



Looking at its content, I can see lots of weird files and folders inside "lost+found" folder. Some of them starts with "#". I need more time to study this but basically, all human visible content was gone.



When I say BASICALLY, I really mean it.



I could find about 8GB of data on this VMDK image.



Now I've gotta figure out a way to find my miserable 10 files and re-install everything on another server.



Cheers!



-- If its not done yet, its 'cause it's not finished.







data-recovery vmware disk resize esx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 3:11

























asked Mar 22 at 13:03









Rafael Azevedo

112




112











  • any living soul on the mood to help?
    – Rafael Azevedo
    Mar 23 at 2:16
















  • any living soul on the mood to help?
    – Rafael Azevedo
    Mar 23 at 2:16















any living soul on the mood to help?
– Rafael Azevedo
Mar 23 at 2:16




any living soul on the mood to help?
– Rafael Azevedo
Mar 23 at 2:16















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1018243%2flost-vmware-guest-machine-after-disk-resize%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1018243%2flost-vmware-guest-machine-after-disk-resize%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491