Thread (12 messages) 12 messages, 6 authors, 2016-08-21

Re: Strange behavior after "rm -rf //"

From: Chris Murphy <hidden>
Date: 2016-08-08 17:13:55

On Mon, Aug 8, 2016 at 10:30 AM, Ivan Sizov [off-list ref] wrote:
I'd ran "rm -rf //" by mistake two days ago. I'd stopped it after five
seconds, but some files had been deleted. I'd tried to shutdown the
system, but couldn't (a lot of files in /bin had been deleted and
systemd didn't work). After hard reboot (by reset button) and booting
to a live USB a strange thing was discovered.

Deleted files are present when I "mount -r" the disk, but
btrfs-restore tells they are deleted ("We have looped trying to
restore files too many times to be making progress").

What does it mean? Will those files be deleted after RW mount?
Just a wild guess, the deletions may be in the tree log and haven't
been applied to the other trees (fs tree, extent tree, etc). So yes
I'd expect they get deleted on a rw mount.

This is what kernel? Because kernel 4.6 offers mount option
"nologreplay" which suggests even if you do mount -r that log replay
happens, so you shouldn't see these deleted files unless you mount ro
*and* use nologreplay mount option.

Anyway, even 5 seconds of rm -rf damages too much. If you don't have
recent snapshots then it's not sanely salvageable, just reinstall.


-- 
Chris Murphy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help