[Solved]Filesystem error - shutdown&saving changes on ntfs

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
tome
Contributor
Contributor
Posts: 561
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

[Solved]Filesystem error - shutdown&saving changes on ntfs

Post#1 by tome » 13 Aug 2013, 07:48

Dump-session work nicely but I can't save my changes during shutdown to my psav-ext4.dat or psav-xfs.dat files on ntfs partition. I have these:
for xfs filesystem

Code: Select all

[ number] XFS (loop5): Corruption detected. Unmount and run xfs_repair
               metadata I/O error: block 0xcc02 ("xfs_trans_read_buf_map") error 117 numblks 1
               [some numbers and letters] ......[letter].....
               Internal error xfs_agi_verify at line 1499 of file fs/xfs/xfs_ialloc.c. Caller 0xffffffff81171499
[and so on]

[ number] XFS (loop5): Corruption detected. Unmount and run xfs_repair
		metadata I/O error: block 0xcc02 ("xfs_trans_read_buf_map") error 117 numblks 1
		metadata I/O error: block 0xcc37 ("xlog_iodone") error 5 numblks 64
		Log I/O Error Detected. Shutting down filesystem
unmounting union[  87.776385] XFS (loop5): Please unmount the filesystem and rectify the problem(s)

unmounting everything else
for ext4 filesystem

Code: Select all

saving changes to psav-ext4.dat - do not power off the PC
[ 1119.679249] EXT-4-fs error (device loop5): ext4_put_super:762: Couldn't clean up the journal
		EXT4-fs (loop5): Remounting filesystem read-only
Last edited by tome on 05 Nov 2013, 07:54, edited 2 times in total.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Filesystem error during shutting down and saving changes

Post#2 by fanthom » 13 Aug 2013, 08:34

hi tome,

is this error reproducible? how can i recreate it on my PC? please give me all details possible as i was testing 'changes=EXIT:' + 'dump-session' on native ext4 fs (no save.dat) and everything was ok.
Please add [Solved] to your thread title if the solution was found.

tome
Contributor
Contributor
Posts: 561
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: Filesystem error during shutting down and saving changes

Post#3 by tome » 13 Aug 2013, 12:04

For x86-64 porteus lxde you can try make porteussave.dat (Porteus save session menu) on your ext4 partition (or maybe fat on pendrive) and probably you will have the same error during shutdown - I have only this idea to reproduce this error by you.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Filesystem error during shutting down and saving changes

Post#4 by fanthom » 13 Aug 2013, 18:23

everything is ok here.
created 512B save.dat formatted with xfs and placed on ext4 partition. done 5 reboots, couple times used 'dump-session', watched youtube, played music, etc and still were getting a clean shutdown.

are you sure that your usb stick/hd is not dying? or maybe you had a power interrupt which could mess your changes?
please reformat your partition -> create new save.dat -> use for a couple of days and report back.

can anybody else confirm this?
i'll make this thread sticky so others may see it and report. we must do our best to make sure that users data are safe.
Please add [Solved] to your thread title if the solution was found.

tome
Contributor
Contributor
Posts: 561
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: Filesystem error during shutdown&saving changes on ntfs

Post#5 by tome » 14 Aug 2013, 07:36

With created save.dat placed on fat32 partition (pendrive) I haven't any problem.
Porteus v2.0 has also any problem with saving changes during shuttdown to .dat on ntfs (unlike v2.1 with the same .dat). I have also noticed:
if I press any other key to skip system freezes with this:

Code: Select all

Press space/enter ...
unmounting union
unmounting everyting else
[ number] XFS (loop4): metadata I/O error: block 0x81dff ('xlog_iodone") error 5 numblks 64
          XFS (loop4): Log I/O error detected. Shutting down filesystem
          XFS (some not ANSI characters):Please unmount the filesystem and rectify the problem(s)
I see that PaulBy has also problem with ntfs - maybe kernel?

Carpintonto
Ronin
Ronin
Posts: 3
Joined: 18 Aug 2013, 15:26
Distribution: Porteus 2.1 LXDE
Location: Kellogg Idaho USA

Re: Filesystem error during shutdown&saving changes on ntfs

Post#6 by Carpintonto » 18 Aug 2013, 15:39

Hello to all - first post here

I successfully have installed 2.1 on a 16GB stick formatted 4GB ext4 with the remaining 12 GB Fat32.
I finally got persistence working without any tweaks installed to the 4GB ext4 partition.

The problem was hardware. I think the usb ports on my older HP d530 are under-powered. I never had any trouble transferring data to and from usb drives on that desktop, but lately drives plugged into them will disappear and reappear randomly - mounted or not.

On the HP d530, I could never exit and save without corrupting the flash drive.
Moving the operation to a newer desktop made it all work. :Yahoo!:

User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Filesystem error during shutdown&saving changes on ntfs

Post#7 by francois » 18 Aug 2013, 16:39

It would be interesting to know from what desktop to which desktop you did move. :)
Voltaire: Le mieux est l'ennemi du bien.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5436
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Filesystem error during shutdown&saving changes on ntfs

Post#8 by brokenman » 18 Aug 2013, 17:05

Thanks for posting Carpintonto!

Info like this is valuable. It's not the first time I have seen MOBO's with faulty 5V rails. A symptom of which is disappearing and reappearing USB volumes.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Carpintonto
Ronin
Ronin
Posts: 3
Joined: 18 Aug 2013, 15:26
Distribution: Porteus 2.1 LXDE
Location: Kellogg Idaho USA

Re: Filesystem error during shutdown&saving changes on ntfs

Post#9 by Carpintonto » 19 Aug 2013, 05:37

francois wrote:It would be interesting to know from what desktop to which desktop you did move. :)
https://dl.dropboxusercontent.com/u/582 ... failed.txt

https://dl.dropboxusercontent.com/u/582 ... -works.txt

tome
Contributor
Contributor
Posts: 561
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: Filesystem error during shutdown&saving changes on ntfs

Post#10 by tome » 04 Nov 2013, 10:18

I have made some tests:
1. changed initrd.xz (fs posix compatibility test in linuxrc) to have possibility to make changes in folder for NTFS - it also doesn't work for saving changes (changes=exit: and probably changes= for last writes to disk by exiting), dump-session is ok, (by this and other tests some my files were removed from disk so don't make links to your folders on real fs if you are testing something)

2. replaced folders (but not scripts) in initrd v2.1 with v2.0 and added changes_exit.conf ('_' instead of '-') to etc - it works

Conclusion: bug must be in linuxrc,
Suggestion: if something goes wrong it can be notification for 1sek to easily read text.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Filesystem error during shutdown&saving changes on ntfs

Post#11 by fanthom » 04 Nov 2013, 20:13

you are absolutely right. i wasn't able to recreate the issue for 2 reasons:
- was using save.dat on ext4 partition
- i'm running 'porteus-current' rather than 2.1 where this bug is already fixed
finally was able to track it down when i switched to original initrd.xz from 2.1

Solution
please unpack initrd.xz from 2.1 and edit 'PID' variable in the cleanup script as follows:

Code: Select all

PID=`ps | sed -n '/PID/,/{cleanup}/p' | egrep -v "\[.*\]" | egrep -v 'PID|cleanup|ntfs-3g' | sed -r "s/^ *([0-9]+).*/\\1/" | tr "\n" " "`
Explanation:
in 2.1 i have switched to plain ntfs-3g (instead of mount.ntfs) for mounting ntfs partitions and never updated the cleanup script. this way ntfs-3g helper was killed before anything was written to the container.

Who is affected:
users who are using 'changes=EXIT:' with save.dat placed on ntfs formatted partitions

i will leave this thread as sticky so it will be easier to find solution. please confirm that everything is ok after updating initrd.
thanks a lot for reporting.
Please add [Solved] to your thread title if the solution was found.

tome
Contributor
Contributor
Posts: 561
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: [Solved]Filesystem error - shutdown&saving changes on nt

Post#12 by tome » 05 Nov 2013, 09:11

Yes everything is ok.
I have also noticed that if there is for example /1/2/3 path in changes-exit.conf data are saved to /3 and /1/2 is ignored. Building cpio archive is very random, for the same files (but not path - copied to other place, the same owner, other time for links) the output size for initrd.xz are a little bit different (raw data on disk?, meta information?).

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: [Solved]Filesystem error - shutdown&saving changes on nt

Post#13 by fanthom » 05 Nov 2013, 12:04

Yes everything is ok.
very good :)
I have also noticed that if there is for example /1/2/3 path in changes-exit.conf data are saved to /3 and /1/2 is ignored.
please provide example (full paths needed)
the output size for initrd.xz are a little bit different
yes - no idea why
Please add [Solved] to your thread title if the solution was found.

tome
Contributor
Contributor
Posts: 561
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: [Solved]Filesystem error - shutdown&saving changes on nt

Post#14 by tome » 05 Nov 2013, 17:55

I have replaced path
/home
with
/home/guest/Desktop
and after reboot I had new
/Desktop
folder instead of
/home/guest/Desktop

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: [Solved]Filesystem error - shutdown&saving changes on nt

Post#15 by fanthom » 05 Nov 2013, 21:25

ehh.. lame coding :)

please edit cleanup script once again and change:

Code: Select all

cp -af $FOLDERS $MNAME 2>/dev/null
to

Code: Select all

cp -af --parents $FOLDERS $MNAME 2>/dev/null
please let me know if that helped so i'll update it for next release.
Please add [Solved] to your thread title if the solution was found.

Post Reply