VMware Cloud Community
fun_9990
Contributor
Contributor
Jump to solution

How to resolve reading directory '.': Input/output error after mount vmdk file

I mounted vmdk file and now I can see this mounted hard in my linux OS

but when I want to see hard details with ls command, I get this error message

root@redhost:/data# lsblk -f | grep sd

sda                                                                                     

├─sda1 ext4                          22400b10-###-42ce-9c78-###  253.2G     3% /

├─sda2                                                                                  

└─sda5 swap                          c2370f02-###-485b-98b3-###                [SWAP]

sdb                                                                                     

└─sdb1 ufs                           5ca9951671###                       79.3G    52% /data

~:/data# df -h | grep sd

/dev/sda1       276G  8.7G  254G   4% /

/dev/sdb1       197G  102G   80G  57% /data    <<<<<<<<<<<<

~:/data# cd /data

~:/data# ls

ls: reading directory '.': Input/output error

How can I resolve this problem?

I

Reply
0 Kudos
1 Solution

Accepted Solutions
fun_9990
Contributor
Contributor
Jump to solution

I resolved my problem

I have to use  < 44bsd  used in FreeBSD, NetBSD, OpenBSD  >

to access my files in my VPS
thank you for your attention

View solution in original post

Reply
0 Kudos
4 Replies
continuum
Immortal
Immortal
Jump to solution

Explain what you mean with "I mounted vmdk ..."

Can you still copy or clone the vmdk with vmkfstools or do you see I/O errors as well.

If you can still use that vmdk from inside a VM use ddrescue to clone the vmdk into a new one.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
fun_9990
Contributor
Contributor
Jump to solution

please see this question

How to resolve vi: out of memory error in vmware esxi 6.5

yesterday night, I had a problem about restoring my vmdk file and now I have access to my hard driver

and I added this hard to my VPS

but now I cannot read this hard information

at all, I can send you additional details of my problem

please read below commands, I used some of the methods to resolve my problem but until now I don't have any chance to find a way to do that

~#nano /etc/fstab

UUID=###951671### /DATA ufs defaults 1 2

mkdir /DATA

mount /DATA

~:/DATA# ls

ls: reading directory '.': Input/output error

~:/DATA# mount -o rw,remount /dev/sdb1

mount: /DATA: mount point not mounted or bad option.

~# umount /DATA

~# e2fsck /DATA

OUTPUT

e2fsck 1.44.5 (15-Dec-2018)

e2fsck: Is a directory while trying to open /DATA

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>

~# mount /DATA

mount: /DATA: WARNING: device write-protected, mounted read-only.

AND

umount /dev/sdb1

2. here I have a problem

fsck /dev/sdb1 

mount /dev/sdb1

~# e2fsck /dev/sdb1

OUTPUT

e2fsck 1.44.5 (15-Dec-2018)

ext2fs_open2: Bad magic number in super-block

e2fsck: Superblock invalid, trying backup blocks...

e2fsck: Bad magic number in super-block while trying to open /dev/sdb1

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>

/dev/sdb1 contains a ufs file system

additional commands to help you to know additional details


~# ls -lat | grep DATA

drwxr-xr-x  5 root     root     1024 May 26 11:37 DATA

~# df -h | grep sd

OUTPUT

/dev/sda1       276G  8.7G  254G   4% /

**/dev/sdb1       197G  102G   80G  57% /DATA**

~# lsblk -f | grep sd

OUTPUT

sda                                                                                   

├─sda1 ext4                          ###-c0fb-42ce-9c78-###  253.2G     3% /

├─sda2                                                                                

└─sda5 swap                          ###-27b4-485b-98b3-###                [SWAP]

sdb                                                                                   

└─sdb1 ufs                           ###951671###                       79.3G    52% /DATA


At all, I would like to access this hard /dev/sdb1 in /DATA folder

How can I resolve this problem?

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

Did you  try to edit a flat.vmdk with vi ?

That could explain this problem.

By the way - I tried to get that VMware KB you read deleted or rewritten - but the authorities did not want to listen ...

Anyway - clone the bad vmdk into a new one from inside the guest with ddrescue. And then work with the copy.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
fun_9990
Contributor
Contributor
Jump to solution

I resolved my problem

I have to use  < 44bsd  used in FreeBSD, NetBSD, OpenBSD  >

to access my files in my VPS
thank you for your attention

Reply
0 Kudos