LVM Boot problems

Discussion in 'Installation/Configuration' started by bschultz, Apr 29, 2007.

  1. bschultz

    bschultz Member

    I have a single hard drive in my Debian Etch server. On install, I selected to use LVM with a separate home directory. I tried to add a second internal drive to the server today, and on reboot, it wouldn't boot up. I get an error message saying

    mail is the hostname of this server. It also says that a uuid device can't be found.

    How do I get this machine to boot properly? If that isn't possible, how do I get a backup of the /var/www directory before I do a fresh install of Etch? I don't have a backup of the web directory, yet...that's what the second drive was for!
     
  2. bschultz

    bschultz Member

    After booting to a recovery CD, I started ssh and tried to backup my websites. Nothing was there. /var/www did not exist!

    So, I did a fresh install of Etch...but, how to avoid this from happening again when I try to install the second hard drive?
     
  3. falko

    falko Super Moderator Howtoforge Staff

    How did you add the second HDD to LVM?
    Did you take a look at this tutorial?
     
  4. bschultz

    bschultz Member

    I hadn't even gotten that far. All I did was plug in the drive and turn the machine back on. That's when it wouldn't boot. I'll check the how-to section more throughly before I try again to plug in the second drive.
     
  5. falko

    falko Super Moderator Howtoforge Staff

  6. bschultz

    bschultz Member

    No I didn't. I actually hadn't found that how-to. Now that I've re-installed (after the problem of no /dev/mapper/mail-root and no websites)...I did the Etch install with LVM configured with separate home directory. Now, when I did the re-install, I had the second drive plugged in. Now, after the install, the drive doesn't show up on the system

    Disk 1 (boot disk) is 120 GB
    Disk 2 (second drive...not showing) is 80 GB

    Any ideas how I should proceed next? Falko, thanks for everything!
     
  7. falko

    falko Super Moderator Howtoforge Staff

    If it doesn't show up, you should control alll plugs again. If that doesn't work, it might be a driver problem. What kind of HDD is this?
     
  8. bschultz

    bschultz Member

    It's a Western Digital drive. If I pull the plugs and plug them back in, what are the odds of the original problem coming back? I already would have done that, but was trying to not run the threat of having the same problem.
     
  9. bschultz

    bschultz Member

    I tried to re-seet the plugs, and found the problem. The IDE cable connection came apart in my hands! That might explain why it didn't work. I got a new cable and just went through the back-up how-to, and everything went GREAT. Thanks, Falko. Any chance of a how-to to set this up as a cron with a rotation of the backups to keep 1 or 2 of the backups around?

    Thanks again!
     
  10. falko

    falko Super Moderator Howtoforge Staff

    You mean something like this? http://www.howtoforge.com/linux_lvm_snapshots
    You could use a find script like this to rotate the backups:

    Code:
    #!/bin/sh
    for file in "$( /usr/bin/find /home/somedir -type f -mtime +2 )"
    do
      /bin/rm -f $file
    done
    This will delete all file older than two days, for example.
     

Share This Page