Page 1 of 2

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

Posted: 13 Aug 2013, 07:48
by tome
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

Re: Filesystem error during shutting down and saving changes

Posted: 13 Aug 2013, 08:34
by fanthom
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.

Re: Filesystem error during shutting down and saving changes

Posted: 13 Aug 2013, 12:04
by tome
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.

Re: Filesystem error during shutting down and saving changes

Posted: 13 Aug 2013, 18:23
by fanthom
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.

Re: Filesystem error during shutdown&saving changes on ntfs

Posted: 14 Aug 2013, 07:36
by tome
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?

Re: Filesystem error during shutdown&saving changes on ntfs

Posted: 18 Aug 2013, 15:39
by Carpintonto
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!:

Re: Filesystem error during shutdown&saving changes on ntfs

Posted: 18 Aug 2013, 16:39
by francois
It would be interesting to know from what desktop to which desktop you did move. :)

Re: Filesystem error during shutdown&saving changes on ntfs

Posted: 18 Aug 2013, 17:05
by brokenman
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.

Re: Filesystem error during shutdown&saving changes on ntfs

Posted: 19 Aug 2013, 05:37
by Carpintonto
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

Re: Filesystem error during shutdown&saving changes on ntfs

Posted: 04 Nov 2013, 10:18
by tome
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.

Re: Filesystem error during shutdown&saving changes on ntfs

Posted: 04 Nov 2013, 20:13
by fanthom
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.

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

Posted: 05 Nov 2013, 09:11
by tome
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?).

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

Posted: 05 Nov 2013, 12:04
by fanthom
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

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

Posted: 05 Nov 2013, 17:55
by tome
I have replaced path
/home
with
/home/guest/Desktop
and after reboot I had new
/Desktop
folder instead of
/home/guest/Desktop

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

Posted: 05 Nov 2013, 21:25
by fanthom
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.