2

I accidentally ran lvreduce on / instead of "/home" on a RHEL 5.9 system that unfortunately had a lot of code that was not backed up, and the system will not boot now obviously.

What is the best way to go about trying to recover files from the disk. Can I mount the other logical volumes especially /home, /etc, /var, /opt in single user mode?

peterh
  • 4,953
  • 13
  • 30
  • 44
  • In case it helps anyone in future: Boot in recovery mode OR with system rescue CD or something which has lvm tools. Use lvs to look at logical volumes. Reverse the lvreduce done using lvextend to put the root volume back to original size. Reboot. This worked for me to recover system when doing lvreduce on one partition and lvextend on another when a resize2fs was not done on a volume. Hairy though! :-7 Best not to get into situation! – gaoithe Aug 12 '15 at 16:43

1 Answers1

2

Who cares about /? All your important stuff should be in the other logical volumes, and as long as you never touched those, you should be able to access them without issue from a rescue CD.

Of course, you're lucky this time. Next time, you may not be. Before you do anything else beyond this, get backups in place.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972