OS/2, eCS & ArcaOS - Technical > Storage

JFS file corruption

(1/4) > >>

Greg Pringle:
I use JFS for large volumes and need back ups. When doing this in the past I used XCOPY /S /E which worked well. Then when the disks became too big I use cp -r which worked with larger data sets. Then both started failing.
Then I wrote some Java to do the same thing.
First it creates a text file listing of every file and directory with full paths.
On a 2T drive this could be about a 150MB file.
Then I read the listing and create smaller files limited by the number of files and the data size.
This created 110 smaller listings.
These listings could be used to copy the files to any drive or subdirectory.
However when I went to copy the files I had a JFS sytem crash about 8 listings in.
After some review I determined the file being copied  was currupt on the disk but had passed chkdsk.
It turned out I had to remove the file from the listing and about 20 more after it.
This was done by ediiting the listing file and then restaring the copy.
This approach copied the files but not the extended attributes.

Then I took the copy on the new SSD drive and put it in a fast machine which had an SSD boot drive.
The copy failed again. The speed was too fast between the SSD volumes for JFS to sync up.
It turned out to be two reasons. First, there needed to be some throttling when writing 400MB files and second there was a java problem. The java RandomAccessFile does not actually write in real time like standard ioctl disk access. Most people rely on a simple close() to end the file write. This failes on very speedy systems. Instead a RandomAccessFile.getFD().sync() is required before the close().

To make my life harder the SSD had a fault at about half way where a write would cause a kernal panic. If I wrote past this part of the disk it worked fine. The disk was a brand new SanDisk 3D 1T drive.

ivan:
Hi Greg,

There you have found the reason why I never use a JFS partition larger than 500GB.  Having been bitten in the past by a corrupt 1 TB JFS partition I soon learned to keep the partitions down to a manageable size for easy backups.  A case of once bitten twice shy. 

The only place where I don't have multiple partitions is in my NAS boxes, those have RAID 1 disks formatted as either Ext3 or Ext4.

Greg Pringle:
Hi Ivan, that is good advice. Normally I do try and keep the partitions smaller. The problems I encountered were not a complete JFS failue but only a section of the disk. It looks like the file pointers became crossed for a section of files after a power outage.
In the past I have had 3 complete JFS corruption failures. Each one came from filling the JFS partition more than 90% and then continurally writing and deleting files with the near full partition. That will eventually kill the partition.
I have not tried the drive reorganization feature as a solution. Instead I don't do the > 90% activity or just copy the entire drive to a new one.
As to raid. I have used (now obsolete) the EzRaid devices which are raid 1 mirrors. These were nice devices because the disks were not changed by the controller and could be removed and used without the controller. Lately I have some StarTech PCI Express 2.0 SATA III 6Gbps RAID (rail 1) controllers on some drives. These mark the disks and make them only work with a similar controller. These use the Marvell - 88SE9230 controller which is also used by other manufacturers. The StarTech can be used for the boot drive. It has a built in setup utility accessed before the boot.

Paul Smedley:
Hi Greg,


--- Quote from: Greg Pringle on October 27, 2019, 07:18:55 pm ---I use JFS for large volumes and need back ups. When doing this in the past I used XCOPY /S /E which worked well. Then when the disks became too big I use cp -r which worked with larger data sets. Then both started failing.
Then I wrote some Java to do the same thing.

--- End quote ---

Have you considering using rsync to do this? rsync will only copy across the files that have changed - significantly reducing the duration/CPU impact of the copy.

My daily rsync of ~600GB of data on my NAS to an external drive runs in a couple of minutes.

Cheers,

Paul.

roberto:
Maybe this could be the problem you had. With copy and with xcopy this is currently happening.
In fact, if someone can tell me how I can execute the copy command, I appreciate it.
I enclose a photo with the copy command in green, and the result later in pink.

I saw this same problem the other day when running on a windows connected to a test samba server with arcaos, when creating a new folder from windows I gave it two different names on the samba server.

Navigation

[0] Message Index

[#] Next page

Go to full version