1

we have a problem related to ext3 file system error in SUSE 11 service pack 1

The problem is we have a lvm partition which use ext3 file system and it is mounted in '/abc/bcd' directory. we have a directory named 'global' in /abc/bcd When we create any directory or file in 'global' directory it generate "mkdir: cannot create directory : Invalid argument" and we also unable to copy data of this global directory.

When we copy data of this global directory it generate 'Input/output error' but when we create directory or file in another directory in /abc/bcd directory it work well without any error.

How can we create directory or file in this global directory ?

Archemar
  • 31,554

4 Answers4

2

Are you seriously asking how to write data to a corrupt filesystem?

If your filesystem is corrupt, stop immediately. Read all data off the filesystem, make a copy on a safe place, and then throw it away and start anew. You really do not want to write data to a filesystem if you think it's corrupt (unless your data isn't important).

The only other alternative is "lose everything", eventually.

If you can't write to or read from that directory, that's a pretty good indication that things are indeed corrupt. Since you're using LVM, you might want to create a snapshot and run fsck on that snapshot; hopefully this will allow you to recover that data.

1

You might have a corrupted filesystem/logical volume, or a hardware failure.

It is advised to search for hardware failure first, then if no H/W issue, try fsck. (fsck stand for FileSysem Consistency Check).

hardware issue

search for 'sense key' in the result of dmesg

 dmesg | grep -i 'sense key'

corrupted filesystem

use fsck to recover filesystem, you must unmount first.

  unmount /abc/bcd
  fsck /dev/dsk/foo

(I assume you can get device).

fsck is likely to delete or move data, so a backup might be of use, and it is obviously too late now.

Archemar
  • 31,554
0

You probably have a hardware issue. (Look at output of dmesg). So buy a new disk and use the backup. You might try to copy the entire raw partition to some other disk and use debugfs on that copy. After doing that, you could use some smartctl (from smartmontools package) on the failing disk.

  • But we unable to copy or take backup by tar of this global directory.we need all data of this global directory because our SAP application is running on this directory. – user120909 Jun 25 '15 at 12:40
  • You have older backups (on off-line or remote media). Otherwise it is a huge mistake. – Basile Starynkevitch Jun 25 '15 at 12:50
  • 1
    Use dd to copy the raw partition data (including the corruption, but also the data that's still there) off the failing disk immediately. If your disk then dies, you're not going to lose more data. Next, make a copy of the file you created with dd and run fsck on that file. This way, if recovery fails, you haven't lost your backup. If all goes well, fsck will repair the filesystem for you to loopmount it. If not, make a second copy of the dd output and use debugfs (from the e2fsprogs package) to fix the filesystem. You may need professional help for this step, though. – Wouter Verhelst Jun 25 '15 at 15:28
-1

Fdisk will only be able to repair a file systen at the top layer, use a product called SpinRight to repair and/or work around bad sectors and recover data from a failed hard drive. It's a dos product and it's not free but I believe it's the best out there for hardware level recovery... Gibson Research - SpinRight

  • Looks like a commercial ad... And the issue is on a Linux system,... debuge2fs should certainly be more relevant – Basile Starynkevitch Jun 25 '15 at 15:39
  • Sorry, I mistyped... it's dos not windows. It doesn't matter what os it's running on because it working on the hardware level (low level) not the file system level. And I did disclose that it was not free software. debuge2fs is works on the file system (high level) and will not repair a hard drive at the hardware (low level) level. – Carl Lindgren Jun 25 '15 at 20:27