-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Destructive symlinks --> file corruption #7568
Comments
Do you have a snapshot of the dataset before and after the corruption? |
Hi, no, I do not. That is something I learned from all of this, I need to set up proper snapshotting and rotation for my datasets and I need to set up a proper backup solution. |
it happened again today, on a different computer, again running 0.7.6 and debian kernel 4.15.17-1 on funtoo linux. The circumstances of it happened were mysterious. I just noticed all my config files in my home dir were zeroed, empty of contents. Again the common factor was symlinks were pointing to them. This time I had a zfs snapshot of my home directory 15 minutes prior and I simply restored to the previous state using zfs rollback. A bit unnerving... |
Did the empty/zeroed files have the same size as their original counterparts? It's kindof a long shot, but there was a problem a while back that got fixed in 0.7.4 between portage and zfs that caused random package files to be zeroed out. #3125 #6867 https://bugs.gentoo.org/635002 https://bugs.gentoo.org/635126 |
I would also not ignore 4.15.17-1 as the culprit, as we had a user experience filesystem corruption with reiserfs. Possibly there is something weird going on with the kernel, or some new changes related to filesystems that are not 100% friendly to less-tested-prior-to-acceptance-of-patch filesystems. |
It would be useful to see if this destructive symlink behavior can be duplicated while running Funtoo's latest debian-sources-lts kernel. This may help identify if it's a recent kernel regression or an ongoing zfs issue. |
I have since the time of these reports changed over to using Funtoo's debian-sources-lts (4.9.x) kernel as well as moving to zfs 0.7.9 in hopes that all of this was just "gremlins." :) Cheers |
This has finally happened again now, this time using ext4 on a debian system. Whatever it is, be it Emacs, Xorg, the Kernel or something different, it is not a zfs problem. Closed. |
System information
Describe the problem you're observing
The system is a root on ZFS desktop on a mirror pool and uses ecc ram.
After typing "pkill x" and then "startx" -- startx was failing. Then I tried to open files with "vim" from the getty, and my vimrc was also found to be empty of contents!
The following files that I am aware of which became corrupted in my home directory:
For example, the command:
returned:
And
returned:
This wallpaper image is run by my .xprofile and set as the background by feh using the command:
feh --bg-fill --no-fehbg ~/.wallpaper
(~/.wallpaper is a symlink --> ~/Pictures/wall-gentoo.jpg)
What may have happened?
1: Git did something bad? But then I found my wallpaper was corrupt and it is not version controlled!
2: My ~/xinitrc or ~/.xprofile did something bad? But then I noticed my ~/.vimrc file was corrupt, and it is not even referenced within my Xorg startup scripts.
3: Could it be ZFS? ALL of the corrupted files are linked to by symlinks!
See what follows is a directory listing of my $HOME only showing my symlinks:
As you can see, I use many symlinks. Some are symlinks to directories, and others are symlinks directly to files. It appears to me that within a very short period of time, every file that I had loaded into memory was corrupted on disk and zapped of its contents! But only for files that had symlinks pointing to them, meanwhile symlinks pointing to directories had no ill affects, and AFAIK files that were not in use by my user were unaffected.
Right at this time, I got scared, and felt like every file that I was using was becoming corrupted. I rebooted the machine.
After the reboot, I was able to restore all of my known damaged configuration files using the git repo, I discarded the "changes" (corruptions) and restored contents to all my dotfiles. The wallpaper was permanently lost.
The rest of the system appeared to be fine, but I rolled back to a known stable boot environment to be on the safe side. Before doing so, I ran some tests with help from the guys in #zfsonlinux using "ls -al | wc -l" and "stat -c '%s'" commands on my ~/repos/Dotfiles and ~/home/adam and ~/home/adam/Pictures directories and we found the outputs "differ by one", apparently as expected.
I did find one interesting log message in /var/log/everything (metalog) which contained:
And this was to my best guess the time that corruption did happen.
The text was updated successfully, but these errors were encountered: