NGFilesystem file corruption

AmigaOne X5000 platform specific issues.
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: NGFilesystem file corruption

Post by tonyw »

It was exactly that. I now copy the VolumeNode's datestamp from the Root Block, so it reflects the date of the Format.
cheers
tony
Lio
Posts: 47
Joined: Tue Sep 13, 2011 8:07 pm

Re: NGFilesystem file corruption

Post by Lio »

I checked my 3 NGFS ed partitions with the tool NGFcheck and here are the results :

c:NGFCheck sys:
NGFCheck 54.23 (7.11.2016) Debug version

Examining volume 'sys:' on device 'DH0:'

Pass 1: Start checking volume tree
- first pass looks OK

Pass 2: Checking BitMap for double allocations
- second pass looks OK

Pass 3: Checking BitMap for 'lost' blocks
- BitMap has no 'lost' blocks

Grand total:
39586 files with 0 extension headers and 427 comments
2804 dirs with 16 extension headers and 0 comments
0 Hard links
5 Soft links with 0 comments
Blocks used: 488740 (x 4096) = 1954.96 MB
(37 Fixed data, 42411 meta data, 446292 file data)

Volume 'sys:' looks OK
7.DH0:> c:NGFCheck DH1:
NGFCheck 54.23 (7.11.2016) Debug version

Examining volume 'DH1:' on device 'DH1:'

Pass 1: Start checking volume tree
- first pass looks OK

Pass 2: Checking BitMap for double allocations
- second pass looks OK

Pass 3: Checking BitMap for 'lost' blocks
Total of 2046 blocks in 65 segments, allocated in bitmap but not used

Grand total:
91626 files with 0 extension headers and 15 comments
2849 dirs with 33 extension headers and 0 comments
0 Hard links
0 Soft links with 0 comments
Blocks used: 9855435 (x 4096) = 38.50 GB
(37 Fixed data, 94508 meta data, 9760890 file data)

Volume 'DH1:' has errors
7.DH0:> c:NGFCheck DH2:
NGFCheck 54.23 (7.11.2016) Debug version

Examining volume 'DH2:' on device 'DH2:'

Pass 1: Start checking volume tree
In directory DH2:Download/Jeux/
Disk address 33383177 has bad header block type 0 (non-repairable)

Grand total:
75099 files with 0 extension headers and 1154 comments
5260 dirs with 28 extension headers and 0 comments
0 Hard links
0 Soft links with 0 comments
Blocks used: 3992113 (x 4096) = 15.59 GB
(37 Fixed data, 80387 meta data, 3911689 file data)

Volume 'DH2:' has errors

do I have to worry about those errors ?
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: NGFilesystem file corruption

Post by tonyw »

As I see it, you have tested three volumes:

DH0: is OK

DH1: has a whole lot of unused (but allocated) blocks ("lost blocks"). They can't be used because they are already "used" and wasted. That can be fixed easily with the "repair" option. NGFCheck will de-allocate all those blocks and make them available to the file system again. That repair is easy and you can be confident that it will work OK.

DH2: has a header block with a zero "Block Type". The "unrepairable" description is pessimistic and could be over-ruled later.
The missing BlockType means that that Object (file, directory, whatever it is) is inaccessible. There may be part of or a whole file or directory missing. However, unless you have a problem reading or writing to DH2:, I would ignore it. If you have a problem and want to fix it, then try the "List" option first, to see what NGFCheck willl do if you say "repair". It should say "Fix 16-bit value".
cheers
tony
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: NGFilesystem file corruption

Post by xenic »

tonyw wrote:As I see it, you have tested three volumes:
I read Lio's post and checked some of my partitions with strange results. When I tried NGFCheck with your experimental filesystem installed, it crashed to a Grim Reaper. I switched back to the NGFS filesystem that came with my X5000 and NGFCheck worked. My DH0: & DH1: filesystem checked out O.K. with no errors. I got this result with my DH2: partition:
  • 5.Ram_Disk:> NGFCheck DH2:
    NGFCheck 54.23 (7.11.2016) Debug version

    Examining volume 'DH2:' on device 'DH2:'

    Pass 1: Start checking volume tree
    - first pass looks OK

    Pass 2: Checking BitMap for double allocations
    Total of 3 blocks in 2 segments, multiply allocated in bitmap

    Pass 3: Checking BitMap for 'lost' blocks
    Total of 19 blocks in 3 segments, allocated in bitmap but not used

    Grand total:
    370550 files with 0 extension headers and 5081 comments
    52724 dirs with 225 extension headers and 96 comments
    0 Hard links
    1 Soft links with 0 comments
    Blocks used: 5726662 (x 2048) = 11.18 GB
    (37 Fixed data, 423500 meta data, 5303125 file data)

    Volume 'DH2:' has errors
Will backing up the DH2: partition, reformatting it and restoring the backup fix the errors?

The strange part of this occurred with USB. When I switched back to the original NGFS (v54.34) my wireless mouse no longer gets recognized for a boot or reboot. Even with a wired mouse I can no longer access the AmigaOS early boot menu. When I use your experimental NGFS, my wireless mouse get's recognized for cold boot and warm reboots.

When I first got my X5000 last summer my wireless mouse didn't get recognized, my wired keyboard only got recognized if it was plugged into a certain USB port on the back of the computer case and other USB issues. When I was considering returning my X5000, my USB inexplicably started working better and my wireless mouse gets recognized for a boot or reboot. I kept the X5000 but didn't realize that the reason it started working was because I had installed your experimental NGFS. After running NGFCheck successfully with the original FS, I have switched back to the experimental FS and my USB is working OK. I don't understand why a filesystem would affect USB performance but that seems to be the case on my system.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: NGFilesystem file corruption

Post by tonyw »

Hi xenic,

The external API of the filesystem was changed at one point and the old NGFCheck no longer works with the new FS. You have to upgrade both to get them to work together.

Now to your problem:

The "allocated but not used" blocks are insignificant. The only problem is that they waste space on the disk. A "repair" pass with NGFCheck will fix them easily.

The "multiply allocated" blocks are a more serious problem. That means that two (at least) Objects (files, directories, links etc) are claiming the disputed blocks. I have never seen it happen, but NGFCheck checks everything, so it was bound to be detected one day. NGFCheck will keep only the first object that it finds if you let it repair the volume. All subsequent objects claiming the same data will be deleted.

If you copy everything onto another partition, you may find that two files seem to contain the same data (or two directories contain the same files, or...). Formatting it is certainly going to fix the problem.
cheers
tony
Lio
Posts: 47
Joined: Tue Sep 13, 2011 8:07 pm

Re: NGFilesystem file corruption

Post by Lio »

little update : I did what you recommended and here are the results :

7.DH0:> ngfcheck DH1: repair
NGFCheck 54.23 (7.11.2016) Debug version

Examining volume 'DH1:' on device 'DH1:'

Pass 1: Start checking volume tree
- first pass looks OK

Pass 2: Checking BitMap for double allocations
- second pass looks OK

Pass 3: Checking BitMap for 'lost' blocks
Total of 2046 blocks in 65 segments, allocated in bitmap but not used

Pass 3: Repairing.................................................................

Finished repair pass

Grand total:
91627 files with 0 extension headers and 15 comments
2849 dirs with 33 extension headers and 0 comments
0 Hard links
0 Soft links with 0 comments
Blocks used: 9858003 (x 4096) = 38.51 GB
(37 Fixed data, 94509 meta data, 9763457 file data)
Now run NGFCheck again without the Repair option
to check that the results are OK
7.DH0:> ngfcheck DH2: repair list
NGFCheck 54.23 (7.11.2016) Debug version

Examining volume 'DH2:' on device 'DH2:'

Pass 1: Start checking volume tree
In directory DH2:Download/Jeux/
Disk address 33383177 has bad header block type 0 (non-repairable)

Dump of Fault List:
Header First Number Flags Fault Action Path
31001315 0 0 0x0001 Bad comment Delete comment DH2:Download/Jeux/FreespaceFull_OS4_1.10.lha
33383178 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33388225 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33388650 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33388857 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33389293 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33429553 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
30867870 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33628096 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33628567 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33629355 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33636083 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33636089 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33636427 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33636485 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33637564 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33637786 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33638270 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33640583 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33640847 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33647099 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33648453 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33649799 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33650192 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33650756 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33651116 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33652621 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33653647 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33654949 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
30715049 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
30716434 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
30720451 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33658848 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33662900 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33668897 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33669558 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33670560 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33672469 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33672857 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33673419 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33674963 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33675381 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33676837 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33681373 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33682743 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
33685531 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
30657123 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
30661022 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
30661164 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
30666097 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
30670072 33340227 0 0x0001 Unrecognisable hdr Remove from dir DH2:Download/Jeux/
0 0 0 0x0001 - Restart FS DH2:
52 nodes total

Pass 3: Repairing...................................................

Finished repair pass

Grand total:
75137 files with 0 extension headers and 1163 comments
5262 dirs with 28 extension headers and 0 comments
0 Hard links
0 Soft links with 0 comments
Blocks used: 4007730 (x 4096) = 15.65 GB
(37 Fixed data, 80427 meta data, 3927266 file data)
Now run NGFCheck again without the Repair option
to check that the results are OK


there was a DSI guru after the "52 nodes total" and I could ignore it and got the rest ! I can provide the crashlog if you want !

then I checked again and here are the results :

7.DH0:> ngfcheck DH1:
NGFCheck 54.23 (7.11.2016) Debug version

Examining volume 'DH1:' on device 'DH1:'

Pass 1: Start checking volume tree
- first pass looks OK

Pass 2: Checking BitMap for double allocations
- second pass looks OK

Pass 3: Checking BitMap for 'lost' blocks
- BitMap has no 'lost' blocks

Grand total:
91627 files with 0 extension headers and 15 comments
2849 dirs with 33 extension headers and 0 comments
0 Hard links
0 Soft links with 0 comments
Blocks used: 9858003 (x 4096) = 38.51 GB
(37 Fixed data, 94509 meta data, 9763457 file data)

Volume 'DH1:' looks OK
7.DH0:> ngfcheck DH2:
NGFCheck 54.23 (7.11.2016) Debug version

Examining volume 'DH2:' on device 'DH2:'

Pass 1: Start checking volume tree

Grand total:
75137 files with 0 extension headers and 1163 comments
5262 dirs with 28 extension headers and 0 comments
0 Hard links
0 Soft links with 0 comments
Blocks used: 4007730 (x 4096) = 15.65 GB
(37 Fixed data, 80427 meta data, 3927266 file data)

Volume 'DH2:' has errors

side question : in the doc, there is mention of trashcan/recycled drawer. As I could not find a recycled drawer, is there a worknig trashcan ?
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: NGFilesystem file corruption

Post by tonyw »

There is no ".recycled" drawer at this stage. It may come later (eventually it will be the only way to support SSD devices with TRIM).
There is a ".restored" drawer but you won't see it unless it has something in it. When you "UnDelete" a file, it is restored to that directory and can be moved from there to wherever you want it.

The ".restored" directory is in the root of the volume but won't appear if it is empty.

You can decide at Format time whether to include a "Trashcan" drawer, or you can add/delete one at any time - it's only a directory, after all, nothing unusual about it.
cheers
tony
Post Reply