LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-25-2010, 05:00 AM   #1
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Rep: Reputation: 39
data loss after sudden reboot on xfs


Hello everyone!
I have a laptop running slackware-current. The disk is /dev/sda and the root 'sda1' is xfs formatted (there is also linux swap at sda2).

recently I was trying to setup openvpn and had to copy a folder with configuration files from /usr/doc/openvpn_<version>/easy-rsa to /etc/openvpn.

I am sure the copying completed cause I got a prompt,
but a few seconds later the battery died on me. When I got mains and powered it up, I could see the directory I copied under /etc/openvpn, and the files where all there too. but they all contained nothing. i.e. they had a size of 0.

I read http://xfs.org/index.php/XFS_FAQ#Q:_..._filesystem.3Fhttp://xfs.org/index.php/XFS_FAQ#Q:_..._filesystem.3Fthat an external journal filesystem for root is not supported. I am not sure If it applies to my situation though. As in does it use an internal journal instead?

and the bottom line is: shouldn't the copying have completed successfully? shouldn't I be worried, that this copy failed?

Thank you for your help!
 
Old 10-25-2010, 06:04 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Sorry, but this is a risk you take by using XFS. The files you copy are not written right away, like with many filesystems (though not with the ext4 default either), instead they are kept in RAM and written later. There might be an option somewhere to make it safer ... not sure.
 
1 members found this post helpful.
Old 10-25-2010, 06:07 AM   #3
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
The rap on xfs has always been that it does not handle hard shutdowns gracefully, i.e. you often get data loss or data corruption when you have a hard shutdown of an xfs filesystem.
Just because you got to a prompt before the system went down does not necessarily mean all the data was successfully written to disk; it probably had not been flushed out of ram or the disk buffers and written to disk before the shutdown occurred.
 
1 members found this post helpful.
Old 10-25-2010, 11:46 AM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by nass View Post
Hello everyone!
I have a laptop running slackware-current. The disk is /dev/sda and the root 'sda1' is xfs formatted (there is also linux swap at sda2).

recently I was trying to setup openvpn and had to copy a folder with configuration files from /usr/doc/openvpn_<version>/easy-rsa to /etc/openvpn.

I am sure the copying completed cause I got a prompt,
but a few seconds later the battery died on me. When I got mains and powered it up, I could see the directory I copied under /etc/openvpn, and the files where all there too. but they all contained nothing. i.e. they had a size of 0.

I read http://xfs.org/index.php/XFS_FAQ#Q:_..._filesystem.3Fhttp://xfs.org/index.php/XFS_FAQ#Q:_..._filesystem.3Fthat an external journal filesystem for root is not supported. I am not sure If it applies to my situation though. As in does it use an internal journal instead?

and the bottom line is: shouldn't the copying have completed successfully? shouldn't I be worried, that this copy failed?

Thank you for your help!
If you keep reading the FAQ, you'll see something that applies to what you saw. (The next few FAQ entries also address your problem to some degree.)
 
1 members found this post helpful.
Old 10-25-2010, 12:27 PM   #5
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Original Poster
Rep: Reputation: 39
It does say so, however, it didn't talk about a remedy at all.
at any rate I used this guide to choose a filesystem and i'll live with it for now
with its goods and bads
 
Old 10-25-2010, 12:33 PM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Yeah, I mean it's a great high performance filesystem, with some drawbacks. Each filesystem has pros and cons like you said, this is one of the cons of XFS, so plan ahead for it.

I suspect you are using this on a laptop (battery went dead), I would have used JFS, it uses less CPU usage, is just as fast, and does not have this issue, but may have others
 
Old 10-25-2010, 12:46 PM   #7
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Original Poster
Rep: Reputation: 39
yes thats what happened..
JFS seemed... slow and I had not tried XFS in any other slackmachine so far.
and the laptop is old so I decided not to go for JFS.

I would like to see your views on filesystems for laptop, desktop, server, and router machines. can we make a poll out of this?

Last edited by nass; 10-25-2010 at 12:49 PM.
 
Old 10-25-2010, 02:06 PM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
You can start a poll in the right forum for what filesystem they use ...

I think that laptops may be the exception, because: 1) They have batteries that can go out. 2) Because they have batteries, CPU usage is important. Thus I would conclude JFS is the best for laptops. For desktops, especially with a good UPS, you can probably safely use XFS.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sudden Loss of Networking sniff SUSE / openSUSE 5 12-08-2007 10:30 AM
Sudden sound loss andy-k Ubuntu 1 10-11-2007 09:14 AM
Slack 10.1, 2.6: Sudden Network Loss?? Kenkudaki Linux - Networking 2 09-06-2005 11:11 AM
sudden connection loss Jeebizz Slackware 7 10-17-2004 10:09 PM
iptables - Sudden loss of connectivity ckenshol Linux - Networking 5 03-21-2004 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration