Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 27 Nov 2014, 15:39
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
Attention! Using Puppy4.3x with ext3 is dangerous by default
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Author Message
Abnormalter


Joined: 31 Jan 2010
Posts: 95
Location: Russia

PostPosted: Sun 31 Jan 2010, 08:44    Post subject:  Attention! Using Puppy4.3x with ext3 is dangerous by default
Subject description: // May be It's lose users data
 

This is dangerous because default value of current kernel now is data=writeback
And the cause as sudden loosing power, the file system does not write to hard disk very huge array of information.
This happens because somewhere between kernels 2.6.25 and 2.6.30 (in kernel 2.6.30.5 - exactly) kernel programmers to do a change of values, who uses default setting for caching the file system.
Unfortunately, the creators of the kernel do this and pass as default change it from data=ordered to data=writeback
Requires a patch to the kernel initialization (or prescription data=ordered in fstab for ext3).
( On Russian, see topic here: http://forum.puppyrus.org/index.php/topic,3609 )
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7084
Location: Perth, Western Australia

PostPosted: Sun 31 Jan 2010, 18:01    Post subject:  

Hmmm, yes, I'll consider that next time I compile the kernel. 2.6.30+ allows the default to be set to "ordered":

http://www.mail-archive.com/linuxkernelnewbies@googlegroups.com/msg01904.html

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sun 31 Jan 2010, 20:45    Post subject:  

from: http://ext4.wiki.kernel.org/index.php/Ext3_data_mode_tradeoffs

"Ordered mode is the mode used by most distributions, but can introduce latency problems in some workloads, especially if there is a combination of high bandwidth background writes and foreground processes calling fsync(). In worst case scenarios, the fsync() call can take 500ms to multiple seconds to return. In applications such as firefox, which called fsync() out of its main UI thread, the application can appear to have crashed since it is no longer responsive to the user's mouse or keyboard input."

"(Note, however, that Ordered Mode does not guarantee that the file will be consistent at an application level; the application must use fsync() at appropriate commit points in order to guarantee application-level consistency.)"
Back to top
View user's profile Send private message 
Jim1911

Joined: 19 May 2008
Posts: 2457
Location: Texas, USA

PostPosted: Sun 31 Jan 2010, 21:26    Post subject:  

From link posted by Barry above:
Quote:
Filesystems can be forced to use a specific data journalling mode by specifying a mount option on the command line, or in /etc/fstab, or by using the "tune2fs -o journal_data_ordered" or "tune2fs -o journal_data_writeback" to specify a default mount option in the filesystem superblock.

If there is truly a problem with unsaved data loss when power is interrupted, this could be an interim fix, while waiting on an updated kernel.
Back to top
View user's profile Send private message 
aarf

Joined: 30 Aug 2007
Posts: 3620
Location: around the bend

PostPosted: Sun 31 Jan 2010, 22:16    Post subject: Re: Using Puppy4.3x with ext3 is dangerous by default
Subject description: // May be It's lose users data
 

Abnormalter wrote:
This is dangerous because default value of current kernel now is data=writeback
And the cause as sudden loosing power, the file system does not write to hard disk very huge array of information.
This happens because somewhere between kernels 2.6.25 and 2.6.30 (in kernel 2.6.30.5 - exactly) kernel programmers to do a change of values, who uses default setting for caching the file system.
Unfortunately, the creators of the kernel do this and pass as default change it from data=ordered to data=writeback
Requires a patch to the kernel initialization (or prescription data=ordered in fstab for ext3).
( On Russian, see topic here: http://forum.puppyrus.org/index.php/topic,3609 )

while i know none of the technical side. i have been using 431 for hours daily since it's creation and my laptop undergoes many battery empty related power failures and my 431 frugal install on internal SSD at sda2 with ext3 file system has NEVER given me ANY problems of any sort when the power out happens. sorry.
i plug in the cable restart and my opera browser restarts exactly where it left off. no problem at all, never noticed any loss of data elsewhere either.

_________________

ASUS EeePC Flare series 1025C 4x Intel Atom N2800 @ 1.86GHz RAM 2063MB 800x600p ATA 320G
_-¤-_

<º))))><.¸¸.•´¯`•.#.•´¯`•.¸¸. ><((((º>
Back to top
View user's profile Send private message Visit poster's website 
Abnormalter


Joined: 31 Jan 2010
Posts: 95
Location: Russia

PostPosted: Mon 01 Feb 2010, 10:44    Post subject:  

BarryK wrote:
Hmmm, yes, I'll consider that next time I compile the kernel. 2.6.30+ allows the default to be set to "ordered":

http://www.mail-archive.com/linuxkernelnewbies@googlegroups.com/msg01904.html


Dear Barry, thank you for your understanding!
I think any Linux, and even more so PuppyLinux, *should* be reliable OS, but dangerous option and a features, introduced by default, -- this is a compromise of idea the robust operating systems...
(N.B. Ever since MS-DOS, at last 1980th, and the initial period of Linux, at 90th, so in BSD, who have very safetly and reliabilitly structure, was taken as a good form is *not use* dangerous values as the default, but giving user the ability to include this as an option...)
IMHO. I believe that all users should know these basics, the more the creators of software (such as who wrote the kernel) should not neglect the experience accumulated over decades... But now more than ever have the opportunity to introduce gui-configurator tools, that would all users to quickly and visually configure own copy of the OS under their real need and demand. (As soon as I have free time, I'll try to write the appropriate gui-configurator for available among others in the Puppy.)
I apologize for some sententious of my message... Smile
Sorry for the delay in response.
Back to top
View user's profile Send private message 
Abnormalter


Joined: 31 Jan 2010
Posts: 95
Location: Russia

PostPosted: Mon 01 Feb 2010, 11:00    Post subject: Re: Using Puppy4.3x with ext3 is dangerous by default
Subject description: // May be It's lose users data
 

aarf wrote:

while i know none of the technical side. i have been using 431 for hours daily since it's creation and my laptop undergoes many battery empty related power failures and my 431 frugal install on internal SSD at sda2 with ext3 file system has NEVER given me ANY problems of any sort when the power out happens. sorry.
i plug in the cable restart and my opera browser restarts exactly where it left off. no problem at all, never noticed any loss of data elsewhere either.


Firstly, my usage statistics of the Puppy (including as a small server) by configuration under the 2.6.26.16 kernel is 24 hours at day, 7 days at week, and 365 days at year Smile - and I use it without any problems. (Similarly, and under other clones of Linux.) Note: due to smallness of my network, I did not use any UPS...
However, since the installation in January 2010 on my computer puppy-431 (who under kernel 2.6.30.5), and until I described the cause of data loss, it took no more than 2 weeks. But do comparison it please with some annual maintenance by use the puppy-42x without any problems. That is fact for me overriding.
Secondly, as a factually rule, all laptops have a more reliable "at birth" to power loss causes, it is dependent not on the degree of efficiency own battery. Unlike a typical computer desktop (without UPS, of course).
Thirdly, all described in the topic for me is the case only for (a) use the ext3 FS on HDD; (b) because prescribed as default values in the corresponding HDD' fstab, alike:

Puppy-431 (Linux kernel version: 2.6.30.5):
/dev/sda1 /mnt/sda1 ext3 defaults 0 0
/dev/sda2 /mnt/home ext3 defaults 0 0
/dev/sda4 /mnt/sda4 ext3 defaults 0 0

It is the conditions that create the preconditions for the incident, who described above.

Regards!
Back to top
View user's profile Send private message 
Dingo


Joined: 11 Dec 2007
Posts: 1423
Location: somewhere at the end of rainbow...

PostPosted: Mon 01 Feb 2010, 11:19    Post subject:  

using reiserfs may be a solution? (waiting for fix in kernel)

since in puppy we can mount via pmount I think also pmount needs a tweak

_________________
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux
Back to top
View user's profile Send private message Visit poster's website 
Abnormalter


Joined: 31 Jan 2010
Posts: 95
Location: Russia

PostPosted: Mon 01 Feb 2010, 11:23    Post subject:  

"However, the problem with using a default of Writeback Mode is that after a system crash or a power failure, files that were written right before the system went down could contain previously written data or other garbage... Using Writeback Mode extends the time from when a file is written to when it is pushed out to disk to 30 seconds. This can be surprising for some users; however, it should be noted that such problems can still be an issue with Ordered Mode..." (http://www.mail-archive.com/linuxkernelnewbies@googlegroups.com/msg01904.html)
-- It is true!
Need to permit an user's configuration - as prefer it, but do not as default...
Back to top
View user's profile Send private message 
Abnormalter


Joined: 31 Jan 2010
Posts: 95
Location: Russia

PostPosted: Mon 01 Feb 2010, 11:26    Post subject:  

Dingo wrote:
using reiserfs may be a solution? (waiting for fix in kernel)

since in puppy we can mount via pmount I think also pmount needs a tweak


Hmm ... Perhaps yes.
Back to top
View user's profile Send private message 
Abnormalter


Joined: 31 Jan 2010
Posts: 95
Location: Russia

PostPosted: Mon 01 Feb 2010, 11:51    Post subject: Additional mind  

By little more thinking about written on the link, I believe that all you see above: "Ordered mode is the mode used by most distributions, but can introduce latency problems in some workloads, especially if there is a combination of high bandwidth background writes and foreground processes calling fsync(). In worst case scenarios, the fsync() call can take 500ms to multiple seconds to return. In applications such as Firefox..." - it is has not relation to environment reality of PuppyLinux! This is true because any operational data, including the cache and personal settings by Firefox (as example), stored in the virtual filesystem (and worked into very fast DRAM). And periodically only (by default every 30 seconds) this data can be dropped into user's hard disk, -- to the save file pup_save-xxxx.2fs

UPD: for others HDD or partitions it have not corresponding too...
Back to top
View user's profile Send private message 
PANZERKOPF

Joined: 16 Dec 2009
Posts: 280
Location: Earth

PostPosted: Mon 01 Feb 2010, 17:12    Post subject:  

Dingo wrote:
using reiserfs may be a solution? (waiting for fix in kernel)

No, use "data=ordered" option in fstab . Also this option can be used directly.
For example: mount /dev/sda2 /mnt/sda2 -o data=ordered

_________________
SUUM CUIQUE.
Back to top
View user's profile Send private message 
aarf

Joined: 30 Aug 2007
Posts: 3620
Location: around the bend

PostPosted: Mon 01 Feb 2010, 18:03    Post subject:  

apparently the file system inside a frugal install pup_save is ext2 and when this pupsave is located on a ext3 partition there doesn't seem to be a problem in my experience. many people have reported problems with full installs when power failure occurs perhaps this ext3 thing was their problem. i still see the solution as frugal install.
_________________

ASUS EeePC Flare series 1025C 4x Intel Atom N2800 @ 1.86GHz RAM 2063MB 800x600p ATA 320G
_-¤-_

<º))))><.¸¸.•´¯`•.#.•´¯`•.¸¸. ><((((º>
Back to top
View user's profile Send private message Visit poster's website 
Abnormalter


Joined: 31 Jan 2010
Posts: 95
Location: Russia

PostPosted: Tue 02 Feb 2010, 15:57    Post subject:  

PANZERKOPF wrote:
Dingo wrote:
using reiserfs may be a solution? (waiting for fix in kernel)

No, use "data=ordered" option in fstab . Also this option can be used directly.
For example: mount /dev/sda2 /mnt/sda2 -o data=ordered


Of course, but need specialized tools for it Smile
I create it now, please see it here: http://murga-linux.com/puppy/viewtopic.php?t=52109

Last edited by Abnormalter on Tue 02 Feb 2010, 16:03; edited 1 time in total
Back to top
View user's profile Send private message 
Abnormalter


Joined: 31 Jan 2010
Posts: 95
Location: Russia

PostPosted: Tue 02 Feb 2010, 16:02    Post subject:  

aarf wrote:
apparently the file system inside a frugal install pup_save is ext2 and when this pupsave is located on a ext3 partition there doesn't seem to be a problem in my experience. many people have reported problems with full installs when power failure occurs perhaps this ext3 thing was their problem. i still see the solution as frugal install.


No, for me cause it is not. I don't use full install, but I use frugal permanently (for many computers). This problem is enviroment changing on 2.6.30 kernel default option of mount... I was fix it now.
Test the Tools, please: "Data Loss Defender Tools" - http://murga-linux.com/puppy/viewtopic.php?t=52109
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0962s ][ Queries: 12 (0.0045s) ][ GZIP on ]