LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-20-2009, 08:04 AM   #1
Clemens.K
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Rep: Reputation: 0
file/text recovery after second reboot


Hi,

After making some new scriptfiles (/etc/ssl/perl) or changing text in some of these files, I shutdown debian (lenny), custom kernel 2.6.31.1. The next day I start the computer and the files and/or the changes in text are gone!!! If I reboot the next day the computer again, the files are restored (it's repeatable).

Has someone any idea where i have to look for?...

Thanks in advance,
Clemens

Last edited by Clemens.K; 11-23-2009 at 05:44 AM.
 
Old 11-21-2009, 10:54 PM   #2
Guyverix
Member
 
Registered: Nov 2008
Location: Washington State
Distribution: Mint
Posts: 36

Rep: Reputation: 2
Are other parts of the subdirectory still there, or is it only the files themselves that are missing?
 
Old 11-22-2009, 05:44 AM   #3
Clemens.K
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Yes, the rest of the directory is there. Just the changes I made are gone. The rest of the directory is still untouched.

I think it has to do something with swap but i haven't any idea how to resolve it (as it is swap).

Last edited by Clemens.K; 11-22-2009 at 05:45 AM.
 
Old 11-22-2009, 06:56 AM   #4
Guyverix
Member
 
Registered: Nov 2008
Location: Washington State
Distribution: Mint
Posts: 36

Rep: Reputation: 2
What happens if you do a touch test.txt as root user in the directory and reboot?
 
Old 11-23-2009, 05:24 AM   #5
Clemens.K
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Original Poster
Rep: Reputation: 0
(test.txt is coming up)

When I started this morning the computer the first time:

situation 1: listing of /etc/ssl/perl/lib:

-rw-r--r-- 1 root root 12288 Nov 11 14:23 .Distribute.pm.swp
-rw-r--r-- 1 root root 3901 Nov 17 21:51 Certificates.pm
-rw-r--r-- 1 root root 1800 Nov 11 14:23 Distribute.pm
-rw-r--r-- 1 root root 2991 Nov 17 21:18 Include.pm
-rw-r--r-- 1 root root 1376 Nov 10 00:35 ListMenu.pm
-rw-r--r-- 1 root root 1521 Nov 17 21:42 Manager.pm
-rw-r--r-- 1 root root 1292 Nov 10 00:56 Miscellaneous.pm
-rw-r--r-- 1 root root 701 Nov 9 23:39 ModTemplate.pm
-rw-r--r-- 1 root root 1156 Nov 10 21:02 System.pm
-rw-r--r-- 1 root root 566 Nov 17 21:40 temp001
-rwxr-xr-x 1 root root 425 Nov 9 22:11 test
-rwxr-xr-x 1 root root 234 Nov 10 00:56 test2
-rwxr-xr-x 1 root root 253 Nov 9 23:12 test3

I restarted the computer with shutdown -r:
I didn't anything else but a cd, ls and shutdown.
After a restart I got a correct listing (see below).

situation 2: listing of /etc/ssl/perl/lib:

-rw-r--r-- 1 root root 5640 Nov 22 23:14 Certificates.pm
-rw-r--r-- 1 root root 2093 Nov 20 23:57 Distribute.pm
-rw-r--r-- 1 root root 3754 Nov 22 23:14 Include.pm
-rw-r--r-- 1 root root 1393 Nov 20 18:58 ListMenu.pm
-rw-r--r-- 1 root root 1925 Nov 20 23:57 Manager.pm
-rw-r--r-- 1 root root 1309 Nov 15 22:59 Miscellaneous.pm
-rw-r--r-- 1 root root 701 Nov 9 23:39 ModTemplate.pm
-rw-r--r-- 1 root root 1984 Nov 22 23:14 System.pm
-rw-r--r-- 1 root root 430 Nov 15 20:53 temp
-rw-r--r-- 1 root root 195 Nov 15 20:55 temp2
-rw-r--r-- 1 root root 653 Nov 15 20:57 temp3
-rwxr-xr-x 1 root root 441 Nov 11 22:26 test
-rwxr-xr-x 1 root root 197 Nov 17 22:15 test2
-rwxr-xr-x 1 root root 253 Nov 9 23:12 test3

There is a difference in the number of files and differences in filesizes between the two listings.

Now the test.txt:

etc/ssl/perl/lib# touch test.txt

I verified the existence of test.txt.
I got a test.txt in the listing
I restart the computer with both
etc/ssl/perl/lib# shutdown -h now
etc/ssl/perl/lib# shutdown -r now

and in both cases:

situation 3: listing of /etc/ssl/perl/lib:

-rw-r--r-- 1 root root 5640 Nov 22 23:14 Certificates.pm
-rw-r--r-- 1 root root 2093 Nov 20 23:57 Distribute.pm
-rw-r--r-- 1 root root 3754 Nov 22 23:14 Include.pm
-rw-r--r-- 1 root root 1393 Nov 20 18:58 ListMenu.pm
-rw-r--r-- 1 root root 1925 Nov 20 23:57 Manager.pm
-rw-r--r-- 1 root root 1309 Nov 15 22:59 Miscellaneous.pm
-rw-r--r-- 1 root root 701 Nov 9 23:39 ModTemplate.pm
-rw-r--r-- 1 root root 1984 Nov 22 23:14 System.pm
-rw-r--r-- 1 root root 430 Nov 15 20:53 temp
-rw-r--r-- 1 root root 195 Nov 15 20:55 temp2
-rw-r--r-- 1 root root 653 Nov 15 20:57 temp3
-rwxr-xr-x 1 root root 441 Nov 11 22:26 test
-rw-r--r-- 1 root root 0 Nov 23 11:29 test.txt
-rwxr-xr-x 1 root root 197 Nov 17 22:15 test2
-rwxr-xr-x 1 root root 253 Nov 9 23:12 test3


test.txt still exists after a reboot and I expect that it's gone tomorrow when I startup the computer. And, after a reboot tomorrow, I think I will get test.txt back.

It's not only my /etc/ssl/perl/lib directory but certainly also my root directory liable to this strange behaviour.

Last edited by Clemens.K; 11-23-2009 at 11:03 AM.
 
Old 11-23-2009, 06:29 AM   #6
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Can you do a
Code:
df -h /etc
and post the output?
It might be worth doing a filesystem check too.
 
Old 11-23-2009, 10:38 AM   #7
Clemens.K
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 46G 5.5G 39G 13% /
 
Old 11-23-2009, 10:57 AM   #8
Clemens.K
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Original Poster
Rep: Reputation: 0
filesystemcheck from knoppix-cd:

# e2fsck -n -f /dev/hda2

pass 1-5 -> no errors.

Last edited by Clemens.K; 11-23-2009 at 11:05 AM.
 
Old 11-24-2009, 12:09 AM   #9
Guyverix
Member
 
Registered: Nov 2008
Location: Washington State
Distribution: Mint
Posts: 36

Rep: Reputation: 2
Hmm, this one is really weird.. I would almost suspect that different mount points are being loaded somehow? I dont suppose that this is a multi-os system is it?
 
Old 11-24-2009, 03:58 AM   #10
Clemens.K
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Original Poster
Rep: Reputation: 0
No, just a plain debian standalone server configuration. I think it has something to do with the journaling-system (ext3, writeback mode). Otherwise I have no idea where it gets it's faulty listing from. But there are no relevant errors about ext3 and inodes in the logs.
The other strange thing is that it often happens after a few hours or overnight and it's not always the case (that generally means hardware, but I don't think so). I also looked for crond-items. But there are no suspicious entries in the cron-directories. It looks like I am hunting a ghost which has a party with impact.

Last edited by Clemens.K; 11-24-2009 at 06:29 AM.
 
Old 11-25-2009, 02:32 AM   #11
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Let's examine the mount points to be sure: please post output of
Code:
cat /etc/mtab
But I agree that it really makes me think about the journaling & disk caching.
 
Old 11-25-2009, 05:18 AM   #12
Clemens.K
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Original Poster
Rep: Reputation: 0
pesula:~# cat /etc/mtab
/dev/hda2 / ext3 rw,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
procbususb /proc/bus/usb usbfs rw 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
/dev/mapper/lvg_01-lvol_01 /archive/volume_01 ext3 rw 0 0
/dev/mapper/lvg_01-lvol_02 /archive/volume_02 ext3 rw 0 0
/dev/mapper/lvg_01-lvol_03 /archive/volume_03 ext3 rw 0 0
/dev/mapper/lvg_01-lvol_04 /archive/volume_04 ext3 rw 0 0
/dev/mapper/lvg_01-lvol_05 /archive/volume_05 ext3 rw 0 0
/dev/mapper/lvg_01-lvol_06 /archive/volume_06 ext3 rw 0 0
/dev/mapper/lvg_01-lvol_07 /archive/volume_07 ext3 rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
 
  


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
Recovery of text files s5s Linux - Software 2 08-28-2009 06:09 AM
Linux Text File convert to Windows/Notepad Text File = Wrapped? backroger Linux - Software 4 01-18-2009 05:54 AM
text match pipe to file then delete from original text file create new dir automatic tr1px Linux - Newbie 6 09-10-2008 09:40 PM
How to parse text file to a set text column width and output to new text file? jsstevenson Programming 12 04-23-2008 02:36 PM
Recovery Text File Gerardoj Linux - General 1 03-26-2004 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:21 PM.

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