Linux – Unmounting root filesystem without rebooting the server

chrootlinux

I have a server that I can access through SSH. There is no KVM available and there's only one root partition for the whole server.
I have deleted some files that I shouldn't have and want to recover them with extundelete ( http://extundelete.sourceforge.net/ ). For this I need to unmount the targeted file system.

Is there a way to unmount the root file system without rebooting? Maybe by doing something similar to what initrd does to boot a system before mounting the root filesystem on some systems?

Thanks

Best Answer

How about using pivot_root to switch to a temporary, in-memory filesystem root?

See http://www.ivarch.com/blogs/oss/2007/01/resize-a-live-root-fs-a-howto.shtml.

Related Topic