files in home directory being deleted or reverting to an old version

I have had two systems now with a very strange problem. On both systems after a reboot and auto login to the primary (and only) user account files and indeed a whole directory were simply gone as well as desktop settings also held in the users home seem to have reverted to original settings.

On one of the machines an employee had this happen again but this time it not only lost some files and directories but for a few files were replaced by the old (a week ago) versions of the same file. In fact he said it was just like the system going back to a week ago, desktop background and all. The only curious thing though is Rendering reverted back to the default (XRender) but it had been changed to 3 weeks ago to OpenGL (to allow 3D flgrx to work) and this reverted back to XRender.

I have used OpenSuse for years and am very Linux knowledgeable and have never seen anything like it. It is a very disturbing behavior though. Is there anyone else out there who has observed this or something similar occurring?? Any ideas what may cause this behavior??

The only theory I have is something that KDE or related “user services” is doing that is supposed to be a new feature but is really horribly buggy.

I am using OpenSuSe 12.3 with updates as of about 3 weeks ago, the KDE desktop, EXT4 filesystems (separate root and /home), AMD Radeon graphics with Catalyst driver. Overall nothing real special. System otherwise is very stable.

On 2013-04-19 03:26, skull33 wrote:

> On one of the machines an employee had this happen again but this time
> it not only lost some files and directories but for a few files were
> replaced by the old (a week ago) versions of the same file. In fact he
> said it was just like the system going back to a week ago, desktop
> background and all.

This can be done if you use btfrs. Please verify what filesystem you
actually use.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

So I did not understand just how many user computers are in this group with a problem of losing files or folders. I have seen the XRender/OpenGL problem with nVIDIA video cards and the solution is to upgrade to kernel to version 3.8. As for the files/folders issue, I have not see it, but I promptly upgraded the kernel on all installed PC’s with openSUSE 12.3, so perhaps you might make the same choice. Have a look at this blog on the subject: openSUSE and Installing New Linux Kernel Versions - Blogs - openSUSE Forums. As for the file/folder issue, why not show us your fstab files. Open up terminal, type in the following command:

cat /etc/fstab

Copy the resulting text into a forum message using the advanced forum message editor. Once the text is pasted here, highlight it and press the code # tag to encase it in a code # block. You might want to supply more that one fstab file from different PC’s reported to have the problem and consider that kernel upgrade.

Thank You,

What about rest of disk other than home. Any software missing on these systems ?

And /home is on the same machine, not an NFS mount from a server??
I’ve never seen this. And have my doubts whether this is actually possible without having btrfs.

On 04/19/2013 03:26 AM, skull33 wrote:
> I have had two systems now with a very strange problem. . .
> On one of the machines an employee had this happen again but this time
> it not only lost some files and directories but for a few files were
> replaced by the old (a week ago) versions of the same file.

in addition to the btrfs question not yet answered, i wonder since
this is a work environment: you must have some sort of iron clad
backup system in place…please describe it…does it include
(maybe) scripts run by cron using (say) rsync…

the reason i ask (now, i know almost nothing about systemD, but) i
have heard that some scrips/services/other magic that have been
useful for years don’t automatically “just work” on 12.3’s systemd…

have you been keeping up with systemd?

just saying.


dd
http://tinyurl.com/DD-Caveat

The way it is described by the OP, the only way this can happen is the restore of some snapshot. No filesystem is capable to go back a week on it’s own. Systemd IMHO is not involved.

On 2013-04-19 12:19, dd wrote:
>
> in addition to the btrfs question not yet answered, i wonder since this
> is a work environment: you must have some sort of iron clad backup
> system in place…please describe it…does it include (maybe) scripts
> run by cron using (say) rsync…

Good point…


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On 2013-04-19 12:56, Knurpht wrote:

> The way it is described by the OP, the only way this can happen is the
> restore of some snapshot. No filesystem is capable to go back a week on
> it’s own. Systemd IMHO is not involved.

Not systemd, that’s not the point.

It is possible, being an work place situation, that there is a
backup/restore solution in use. Such a setup could, should be able, to
restore files to a previous point in time.

This would be controlled by scripts, services, etc. It is just possible
that those services are not configured properly after the migration to
systemd. It is also possible that those scripts were simply misused,
triggered by mistake, accident, etc.

That would explain a file reversal without using btfrs. It is worth
investigating.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Thanks for all the ideas. Unfortunately I guess I am looking for someone else who has actually experienced this behavior, seeing is believing in this case.

In reply to the posts, with some good suggestions. I am definitely using EXT4. The OpenGL/XRender is not really the primary issue just an example of a setting that we changed from default and reverted. My fstab has nothing special in it. The home directory is NOT a networked directory it is however a separate file system although this config is common. So any more ideas would be welcome or as I noted someone else actually seeing this happen.

It does not appear to affect anything but stuff in /home which in this case is just a single user, this tells me it is probably something that runs as part of the desktop (just with that users permissions). Just a theory.

I have to say there is not enough time in the day to keep up with new services and desktop helpers. Kinda wish for the old days and would really like the OpenSuSe folks to at least provide the option of NOT starting all the **** automatically and allowing during install or easily at the desktop the admin or user to select what they want happening in the background. Except for a few kernel services you can have a perfectly useable desktop Linux without this.

I manage the systems and am not using any third party backup/restore. Work does get backed up by simply tar’ing key directories to a flash drive periodically using a very simple (one line) script.

I do have a theory that would involve a failure accompanied by a brain dead move by a developer. Way back when (a decade ago) there was a distro that for whatever reason did not always mount /home so it was therefore sometimes empty. This would prevent proper login by anyone but root. I guess if the same thing was happening AND some program came along and attempted to restore the user(s) in /home from some automatic archive this could lead to something similar?? What could be doing the automatic archive, not sure, I did notice there is something called snapper that takes automatic snapshots and allows you to retrieve them. I do not know much about it. Maybe Snapper gone wild? Again just a theory.

On 04/20/2013 08:26 AM, skull33 wrote:
>
> Kinda wish for the old days and would
> really like the OpenSuSe folks to at least provide the option of NOT
> starting all the **** automatically and allowing during install or
> easily at the desktop the admin or user to select what they want
> happening in the background.

first, there are no OpenSuSe folks…there are some members of the
openSUSE community here, but almost no developers…practically all
here are users volunteering to try to help other users…

second: what you wish for is already there…easily available…

go to the documentation’s install layout here:
http://doc.opensuse.org/documentation/html/openSUSE/opensuse-startup/art.osuse.installquick.html#sec.osuse.installquick.install

and scroll down to paragraph 10. which is information concerning the
slide/image just above the paragraph…

it is here during the install when the administrator can elect to NOT
install stuff (applications, libraries, services, patterns, and etc)
they do not want…and, by not installing it can’t run…so the
“option of NOT starting all the **** automatically” is there, you
just have to be willing to do the admin work and NOT install.

then, even if you do install you can use YaST > System > System
Services (Run Level) to enable or disable what is running so you can
get to your “select what they want happening in the background”

> Except for a few kernel services you can
> have a perfectly useable desktop Linux without this.

alternatively, if you don’t wish to NOT install during install…or,
don’t want to have to turn off what is automatic started in this
distro you might wish to choose a distro which offers a much more
rudimentary system from the get-go…not sure, but i think all of
Puppy, DSL and (maybe) Arch do those things…no need to wish that
this very complete (with kitchen sink) drop in replacement for any
modern desktop operating system wasn’t as complete as this distro’s
development community want it.

> What could be doing the
> automatic archive, not sure, I did notice there is something called
> snapper that takes automatic snapshots and allows you to retrieve them.
> I do not know much about it. Maybe Snapper gone wild? Again just a
> theory.

well, hmmmmm… Snapper is a tool for managing btrfs…and, if it is
running on your system maybe “I am definitely using EXT4” is in
question…perhaps we will be able to better help if you would please
show us the terminal output and input, as well as the beginning
prompt and exit prompt, from


df -hlT
cat /etc/fstab
mount
sudo /sbin/fdisk -l
ps -ef | grep snappe[r]

copy/paste the in/output back to this thread using the instructions
here: http://goo.gl/i3wnr


dd
http://tinyurl.com/DD-Caveat

i use ext4 but snapper is installed(system conf in sig). This is getting weird.

$cat /etc/fstab 
/dev/disk/by-id/ata-Hitachi_HDS721050DLE630_MSK423Y224561G-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-Hitachi_HDS721050DLE630_MSK423Y224561G-part2 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-Hitachi_HDS721050DLE630_MSK423Y224561G-part3 /home                ext4       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
$zypper se -i snapper
Repository 'rpms' is out-of-date. You can run 'zypper refresh' as root to update it.
Loading repository data...
Reading installed packages...

S | Name                | Summary                                    | Type   
--+---------------------+--------------------------------------------+--------
i | libsnapper2         | Library for filesystem snapshot management | package
i | snapper             | Tool for filesystem snapshot management    | package
i | snapper-zypp-plugin | A zypp commit plugin for calling snapper   | package
$

On 2013-04-20 08:26, skull33 wrote:
>
> Thanks for all the ideas. Unfortunately I guess I am looking for
> someone else who has actually experienced this behavior, seeing is
> believing in this case.

None has, sorry.

The only way of experiencing this is either using btfrs snapshots, or
backup/restore thingies.

> In reply to the posts, with some good suggestions. I am definitely
> using EXT4.

Prove it :slight_smile:

We are non believers here. For example, execute this and post it, inside
code tags:


su -
blkid

Please use code tags for printouts and commands. Advanced editor, ‘#’
button.
Posting in
Code Tags - A Guide

I have to say there is not enough time in the day to keep up with new
services and desktop helpers. Kinda wish for the old days and would
really like the OpenSuSe folks to at least provide the option of NOT
starting all the **** automatically and allowing during install or
easily at the desktop the admin or user to select what they want
happening in the background. Except for a few kernel services you can
have a perfectly useable desktop Linux without this.

You can. There are a lot of choices if you do not select automatic install.

However, most of the services that run by default are used and benefit a
majority of users, that’s why they are there. Some are controversial and
slow down the system, like indexers. So disable/uninstall them if you wish.

I do have a theory that would involve a failure accompanied by a brain
dead move by a developer. Way back when (a decade ago) there was a
distro that for whatever reason did not always mount /home so it was
therefore sometimes empty. This would prevent proper login by anyone
but root.

If, for some reason, the /home partition failed to mount, and for some
reason, you did not get told (you should get booted into emergency
mode), you would be writing to the /home directory, not the /home
partition. If this happens some times and not others, you would see
different versions of your user files each time.

Please do and paste here:


cat /etc/fstab

To verify this hypothesis, log out from any graphical desktop, switch to
a text mode console, login as root (not as user then su, will not work)
and do:


df -h
ls /home
umount /home
ls /home
mount /home

and paste it back here.

> What could be doing the
> automatic archive, not sure, I did notice there is something called
> snapper that takes automatic snapshots and allows you to retrieve them.
> I do not know much about it. Maybe Snapper gone wild? Again just a
> theory.

Snapper, as Denver points out, is a btrfs tool, and it can indeed be
used to go back in time. Ie, revert files to a previous version.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On 2013-04-20 13:56, vazhavandan wrote:
>
> i use ext4 but snapper is installed(system conf in sig). This is getting
> weird.

Maybe it gets installed same as tools to handle features of xfs or
reiserfs. But I doubt that it can really work without a btfrs filesystem :-?

Unless it stores snapshots on some directory :-?


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

It doesn’t seem to be saving any snapshots on my machine

$snapper list
Unknown config.
$sudo snapper list
Unknown config.
$

Only ext4 here, no snapper installed.

The one thing I could think of would be that the user has been working for a week without /home being mounted.

Please understand that no one here can say anything decent about all this without you providing output asked for.

Am 20.04.2013 17:06, schrieb Knurpht:
>
> Only ext4 here, no snapper installed.
>
> The one thing I could think of would be that the user has been working
> for a week without /home being mounted.
>
>
That should be easy to check by looking at / without the extra partition
for /home being mounted and looking into the /home directory if it
contains something and not simply nothing.


PC: oS 12.3 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.10.0 | GTX 650 Ti
ThinkPad E320: oS 12.3 x86_64 | i3@2.30GHz | 8GB | KDE 4.10.0 | HD 3000
HannsBook: oS 12.3 x86_64 | SU4100@1.3GHz | 2GB | KDE 4.10.0 | GMA4500

On 2013-04-20 17:09, Martin Helm wrote:
> Am 20.04.2013 17:06, schrieb Knurpht:
>>
>> Only ext4 here, no snapper installed.
>>
>> The one thing I could think of would be that the user has been working
>> for a week without /home being mounted.
>>
>>
> That should be easy to check by looking at / without the extra partition
> for /home being mounted and looking into the /home directory if it
> contains something and not simply nothing.

I gave him instructions for how to verify that. I’m waiting for him to
post back with results.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Thanks to all who have weighed in on this.

I forgot to mention (as I have just taken it for granted) that the home file-system is a software (md) RAID 1 array on these two systems.

The problem appears to be that neither system was probably given enough time to refresh the RAID array after construction (this appears to be quite slow under OpenSuSe 12.3) and both systems possibly had an unexpected power-off early in there lives. As a result after looking into this further both systems had an inconsistent RAID array (missing member) for the home file-system.

So the cause of the behavior was that on successive reboots sometimes your home directory came from member 1 and sometimes from member 2 as the member missing seemed to ping-pong. The split was about 90/10 over a whole bunch of reboots.

Solution for the time being was to dump using RAID as any benefits it would give are over-whelmed by this behavior. In addition as a result of my discovery this thread really belongs in another forum as I see this as likely a kernel issue.

Parting thought Here is what I see as strange. I have used software RAID 1 on many machines both for our internal use and for customers for years and I know I have had many times when I found inconsistent arrays (missing member) but I never remember seeing a ping-pong situation like this. Usually a member goes away and is gone until I use mdadm to force a rebuild of the array. My only thought as to why I have not ever seen this in the past is maybe this is the first time when an unexpected power-off probably occurred on both machines before the array had finished initializing.

I will look in other forums for issues related to this and if I come across something will post here a link to what I found.