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

link|improve this question
feedback

3 Answers

I would try to get someone to help you with a live rescue CD like the PLD Linux Rescue disk. But only having ssh access, no KVM, no ILO, no backups, etc. is pretty risky.

One other option is to install the free Hot Copy snapshotting utility from R1Soft(hcp): See: http://www.r1soft.com/tools/linux-hot-copy/

It would allow you to take a read-only snapshot of your root partition and mount it to a subdirectory. You could run your undelete/repair utility against the snapshot mount.

link|improve this answer
I would love to have someone help me with a rescue CD. But from my past experience with the abysmal level of incompetence of my host, I doubt I could get them to help me... R1soft sounds interesting... – Thomas Wang Aug 13 '11 at 19:00
Well, the R1Soft Hot Copy will definitely work to give you a read-only snapshot without needing a reboot. What flavor/version of Linux are you running? R1Soft have pre-built modules available for most kernel versions, but your system will need internet access in order to download the appropriate module. This may be your best bet. – ewwhite Aug 13 '11 at 20:27
Ok, I've been looking at R1Soft Hot Copy and it seems that they store the snapshot in the unused space on my partition, which would run the risk of overwriting the deleted files... I'll ask them some questions... – Thomas Wang Aug 14 '11 at 3:19
feedback

No, this is not doable on this earth.

link|improve this answer
2  
Nor in the universe. – mailq Aug 13 '11 at 14:38
2  
Or, in any other universe. – EightBitTony Aug 13 '11 at 15:01
@EightBitTony: Who knows what is possible in other universes ;) – Iain Aug 13 '11 at 17:15
silly answers are not useful – Michael Dillon Aug 14 '11 at 6:14
feedback

you could use dd and netcat to copy the disk/partition somewhere else and do the recovery there

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.