Author Topic: JFS partition corrupted -- what is the root cause, and how to fix it?  (Read 19693 times)

Thomas Hellsén

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
  • Electronics engineer & OS2/eCS user
    • View Profile
Hi everybody,
I have a strange and quite annoying problem. I recently upgraded my computer, and now I'm having a problem with JFS partitions on one of the disks getting corrupted. I slightly suspect it happened after using a FAT32-formatted USB stick but I have no proof.
Has anyone had something similar happen, and is there anything I can do to recover the JFS partition?
Details follow.

Hard drives:
Disk 1: 10.2 GB, partitioned into C: (1.3 GB HPFS, eCS 1.2r) and D: (8.9 GB JFS, program/file storage)
Disk 2: 61.5 GB, partitioned into E: (1.26 GB HPFS, eCS 2.1) and F: (60.2 GB JFS, data/file storage)

After making a backup of all partitions except E:, I moved the hard drives to the new computer (see further below for details). I installed eCS 2.1 to the E: partition on a bootable JFS, since that has worked well on the laptop that I now use to write this. I also installed Air-Boot instead of the old IBM bootmanager.
The installation went well, and I started to install some applications. I also tested that I could use a FAT32-formatted 4 GB USB stick that I previously had let LVM designate as U: and had formatted in MS Windows.
But following a restart, the eCS 2.1 partition suddenly failed to boot. CHKDSK from eCS 1.2r couldn't handle the corruption. I thought then that maybe the bootable JFS was incompatible with eCS 1.2r and that it had corrupted the E: partition, or that I had an unlucky sector failure.
Since I hadn't really installed much of anything, I just re-installed eCS 2.1 on E:, this time selecting HPFS instead of bootable JFS. I went on installing new applications and configuring the system, also (last night) copying some data files to and from the 4 GB FAT32-formatted USB stick mentioned above.
Then I restarted the computer to see the effect of some new WPS classes. eCS 2.1 now hung in the JFS check during boot-up. The D: drive checked out, but the check on the F: drive just had stopped. After awhile of no disk activity, I restarted the system with Ctrl-Alt-Del.
Now Air-Boot complained that the there were boot sector problems and would not start. I restarted the system with a DFSee 11.5 CD (the latest I had burned; DFSee 12.1 was on D: but to no use). I used DFSee to make checks on the partitions, then recreated the boot sector on disk 2 and restarted.
Now Air-Boot comes up and I can boot either eCS 1.2r on C: or eCS 2.1 on E. but they both hang when they are about to start checking the JFS F: partition. None will finish booting. They just beep intermittently a few times, then do nothing.
I have used the management console in the eCS 2.1 installation to verify that partitions C: D: and E: are OK, but it can do nothing about the F: partition.

There is my problem (sorry for the long-winded description). So my two questions are:
1) Can I recover the JFS F: partition, or at least its data (I do have a backup but it would be good to know how I could restore the partition if I hadn't). Can I use DFSee, or should i buy JRescuer, or is there another solution?
2) What was the root cause of the problem? I do suspect the USB stick with FAT32, but I have nothing except the circumstantial evidence that it was used in the system before both corruptions.

Any useful information on the subject(s) would be appreciated.

Best regards,
Thomas Hellsén

PS Details on old & new computer setups below.

Previous hardware: PPI-556, a 266 MHz, 384 MiB tower model computer.
IDE controller 0: the hard drives as above.
IDE controller 1 had two CD/DVD drives:
CD 1:  Plextor Plexwriter (CD only)
CD 2:  CD/DVD reader.
This setup had worked reliably for many years, not a glitch really, but it was getting old and the power supply fan had failed.

E: was a maintenance partition that I planned to upgrade to eCS 2.1 and be the main OS after the switch.
I first made a backup of the partitions to a USB-connected HD, then moved the drives to the new hardware:

IBM ThinkCentre A30, 2.8 GHz, 1 GiB tower model computer, bought used.
Connected the hard drives to IDE controller 0, like above.
IDE controller 1:
CD 2:  CD/DVD reader.
CD 1:  Plextor Plexwriter (CD only) from previous hardware.
/Thomas Hellsén

dbanet

  • Guest
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #1 on: September 14, 2014, 03:25:34 pm »
Tl;dr.

There is my problem (sorry for the long-winded description). So my two questions are:
1) Can I recover the JFS F: partition, or at least its data (I do have a backup but it would be good to know how I could restore the partition if I hadn't). Can I use DFSee, or should i buy JRescuer, or is there another solution?

No, DFSee doesn't feature recovering files from a corrupted JFS partition.



JRescuer/JUne has worked flawlessly to me once. The shareware version doesn't recover the files, but tells you if it can do that by showing a small piece of a file you choose in a text field that you may copy from. If however it doesn't work straight-forward, there still are some options: read the included readme carefully.

If you think it doesn't cost that much or you simply don't want to pay for some reason, please write to me.



I don't get, have you tried booting to a live-cd and doing a CHKDSK X: /F:3?
« Last Edit: September 14, 2014, 03:27:45 pm by Boris »

eirik

  • Guest
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #2 on: September 14, 2014, 03:53:28 pm »
Hi Boris,

before you despair completely, boot from the CD and go to a command line console where you issue chkdsk x: /f

x is your drive letter and the option /f is a bit stronger than plain chkdsk (I use it when on the rare time that my JFS filesystem does not "come alive").  To date it has always worked for me, but your problems may be of a more serious nature.  Good luck!

Eirik

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #3 on: September 14, 2014, 04:51:36 pm »
Quote
it happened after using a FAT32-formatted USB stick but I have no proof.

Highly unlikely, but probably not impossible...

Quote
is there anything I can do to recover the JFS partition?

Since these disks are old, I need to ask which version of JFS did you use to format them? If it was the old, original, IBM version, and you did not do a format after the update that fixed a problem that required a new format (this was long before eCS), then throw in the update to the Mensys bootable JFS, and you may be seeing the result.

If the suggested CHKDSK does not work, you could try just forcing the drive to clean status, and see if you can recover the files. DFSEE can do that by going to File-> Open single partition-> and select the one that you want. The Mode=FDISK menu should change to Mode=JFS. Do Mode=JFS-> Set FS Mounted - Clean, and close DFSEE. This does NOT mean the the file system is clean, but it may allow you to recover what you need, before it gets into trouble again.

If you can recover the files, I would suggest that you format all of the JFS volumes, before trying to use them again (take the data off first). It may even be a good idea to wipe out what is on the disks, and recreate the whole thing.

If that doesn't work, I will suggest that the disk may be going bad, and you have lost your data. BACKUP is the only real answer, but that won't help, if you don't have one already.

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #4 on: September 14, 2014, 07:16:31 pm »
It might be that the different jsf versions on 1.2 and 2.1 cause problems. Like Eirik said, boot from cdrom, preferably the 2.1 and run chkdsk x: /f . If that fixes the corrupted partitions, proceed with copying the 2.1 ifs stuff over to your other bootable partitions.
The files are:
x:\os2\jfschk32.exe
x:\os2\jfsh.msg
x:\os2\dll\ujfs.dll
x:\os2\install\jfs.ifs
x:\os2\install\jfs.msg
This also makes sense because the later jfs version contains a number of fixes.

Thomas Hellsén

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
  • Electronics engineer & OS2/eCS user
    • View Profile
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #5 on: September 14, 2014, 10:15:19 pm »
Thank you all who have answered so far.

Boris, Eirik: I tried running CHKDSK F: /F:3 from a command window in the management console in the eCS 2.1 installation program, and it states the following, accompanied by a number of short beeps:

The current hard disk drive is: F:
The type of file system for the disk is JFS.
The JFS file system program has been started.
Internal error: devices.c(532): Read error 23 (CRC)
Internal error: devices.c(532): Read error 23 (CRC)
JFS0068: CHKDSK  Superblock is corrupt and cannot be repaired because both
primary and secondary copies are corrupt.  CHKDSK CANNOT CONTINUE.

This does suggest that Doug is correct: the disk may indeed be going bad. It could definitely be worth copying the still-good E: partition and the backup of the F: partition to a new hard disk and see how that works. Then I can let DFSee do a long-time test of the drive and see if it comes out faulty.

Doug: I think I formatted the JFS partitions with eCS 1.2 before the eCS 1.2r update. I have no idea if the actual filesystem data differs between the two eCS versions' JFS implementations, but I haven't heard of any interoperability problems either. Not to say I hear or know much about that, though.
As for clean-marking the partition in DFSee, I assume the partition cannot be read at all (by eCS) since both superblocks are corrupted.

I have a backup that I made before transferring the hard disks to a new system, so most of the files on F: should be okay. It might be worth downloading JRescuer and see if it can do anything with the partition. If it can recover files, it may be worth buying it to recover those files I changed or added since the backup. It will take awhile to get this fixed but I'll post back when I have something new.
/Thomas
/Thomas Hellsén

eirik

  • Guest
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #6 on: September 15, 2014, 11:23:42 am »
Hi again,

fortunately, you do have a backup (that hopefully is good).  Your disk issue goes beyond the problems I've encountered before and been able to fix.  A reformat of the disk (preferably from eCS 2.1) will usually render the disk useable again.  Moreover, you may get important feedback to the extent of your problem, in particular if you use the format option where you check for disk integrity.  I am looking forward to hear the feedback from your reformat.

Eirik

ivan

  • Hero Member
  • *****
  • Posts: 1556
  • Karma: +17/-0
    • View Profile
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #7 on: September 15, 2014, 12:52:54 pm »
Hi Thomas,

You didn't sat who the disk manufacturer was so I can't be specific.  It looks as if you need to get the manufacturers disk tools and run them against each disk.  This will tell you if there are problems with the disks and fix bad sectors if possible by replacing them from the reserve sectors.

If they pass the manufacturers tests then I would suggest you reformat using the long format option - just don't try that on a 1.5TB disk unless you have a lot of time before you need to use it. 

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #8 on: September 15, 2014, 04:42:24 pm »
Quote
I have no idea if the actual filesystem data differs between the two eCS versions' JFS implementations, but I haven't heard of any interoperability problems either

I think the eCS versions are data compatible. It was just the very early OS/2 version that had the problem. I mentioned it because it was a possible cause.

I would suggest that you use your backup (to a different disk, if possible). It will take a long time to try to recover anything from the bad disk. I have found that it is much faster, and easier, to simply recreate whatever gets lost. Of course, if there s something REALLY important, you can try to recover that, by itself.

Those disks are, obviously, IDE disks. You may find it difficult to find replacements, at a reasonable cost. If your new system can use SATA disks, get one of them. Currently, it seems that the smallest, generally, available is about 500 GB. Just don't get one larger than 2 TB, or eCS (currently) can't use it. If your system can't handle SATA (even with an adapter), try the used market, but you take your chances that you will get a bad one. It is usually a waste of time to try to recover a disk that is showing problems, but you may be lucky and a simple, long, format will do it. I wouldn't use that disk for important stuff though.

Alex Taylor

  • Sr. Member
  • ****
  • Posts: 385
  • Karma: +5/-0
    • View Profile
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #9 on: September 16, 2014, 11:18:41 am »
Quote
I have no idea if the actual filesystem data differs between the two eCS versions' JFS implementations, but I haven't heard of any interoperability problems either

I think the eCS versions are data compatible. It was just the very early OS/2 version that had the problem. I mentioned it because it was a possible cause.

I seem to recall there was one release which changed the filesystem structures slightly, and therefore necessitated a reformat.  I don't remember if it was a late IBM update or one of the BootJFS releases. In any case, reformatting with the latest eCS JFS.IFS and UJFS.DLL in place is probably advisable.

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #10 on: September 16, 2014, 01:26:06 pm »
Quote
I have no idea if the actual filesystem data differs between the two eCS versions' JFS implementations, but I haven't heard of any interoperability problems either

I think the eCS versions are data compatible. It was just the very early OS/2 version that had the problem. I mentioned it because it was a possible cause.

I seem to recall there was one release which changed the filesystem structures slightly, and therefore necessitated a reformat.  I don't remember if it was a late IBM update or one of the BootJFS releases. In any case, reformatting with the latest eCS JFS.IFS and UJFS.DLL in place is probably advisable.

I have had what I think was a compatability problem with JFS similar to this one when I installed  an eCS 2.0 beta version on a box with 1.13 already on it.. It was solved by reformatting with and using the latest version only. The problem would occur everytime the 1.13 install was booted and had written to the disk until I synched the JFS files.

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #11 on: June 23, 2016, 01:36:22 pm »
Hello
I use this thread because i think that is similar problem.
Aproximately 15 days ago, over a pc with ecs2.0, I format and install ecs22b2. Yesterday the user finish the pc ok, without any problems.
Today in the start show this photo with the error:

The pc have one disk sata, and c: d: e: volums, c: start ok is the boot. But d: and e: are in error.


Saludos

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #12 on: June 23, 2016, 02:52:54 pm »
Hi roberto

I have seen that message a few times before. Maybe I have been lucky as each time I have rebooted and chkdsk has worked fine at the second attempt. I think I read somewhere that this error could be caused by chkdsk running out of memory space.

You could try booting from the eCS2.2b2 dvd to the Maintenance Console and running chkdsk. If that fails you may want to investigate the disk using DFSee.


Regards

Pete


roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: JFS partition corrupted -- what is the root cause, and how to fix it?
« Reply #13 on: June 23, 2016, 04:33:36 pm »
Yesterday the user finish the pc ok, without any problems.
Here was the problem in the user, he told me to turn it off properly, but the reality is that the user turn it off while doing the backup , with average copy made . As I understand it may be normal what happened. I am restoring the drive d: and I left the drive e: for further tests . With the Pete sugestions. Thanks Pete.
Saludos