Results 1 to 4 of 4

Thread: Moving an LVM to a new linux install

  1. #1
    Senior Member kopite's Avatar
    Join Date
    Sep 2006
    Location
    Liverpool
    Posts
    3,491
    Thanks
    80
    Thanked
    157 times in 126 posts
    • kopite's system
      • Motherboard:
      • Asus Maximus IV Gene-Z
      • CPU:
      • Intel Core i5 2500K
      • Memory:
      • 8GB DDR3 1600 MHz Corsair Memory Vengeance Black
      • Storage:
      • 128GB Crucial m4 for main drive. 3.5 TB of storage space over western Digital Drives
      • Graphics card(s):
      • Gigabyte NVIDIA GTX 970 G1 Gaming Edition
      • PSU:
      • 750W ANTEC TRUEPOWER
      • Case:
      • Silverstone Fortress FT03
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 1 x 27 inch dell Monitor 1 x 20 inch Dell monitor
      • Internet:
      • Virgin media 150MB

    Moving an LVM to a new linux install

    Hey everyone,

    I have a file server atm that is running debian. The OS is on one disk and then there is an LVM that has all my stored files over a few other disks

    I want to reinstall the os and maybe change it to Ubuntu but I want to make sure That I can do this without losing the stuff on the lvm?

    Will it just be a matter of disabling the LVM on current os, Install new os then enable LVM on new os or is there something i`m missing?


    Thanks in advance

  2. #2
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable

    Re: Moving an LVM to a new linux install

    You can just install Ubuntu over Debian without touching any of the LVs. I think you'll need the alternative install CD to install with LVM, but it's not a big problem, just hit enter on the LVs you want mounted at boot, and give them a mount point without formatting. Some Debian cruft may be left over, not certain on that, but it shouldn't cause problems either. Alternatively, if you have a system specific LV you can just format that and not touch your data LVs.
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  3. #3
    Registered+
    Join Date
    Jul 2009
    Posts
    70
    Thanks
    9
    Thanked
    19 times in 16 posts

    Re: Moving an LVM to a new linux install

    Yeah, wipe root and stick your new flavour on it - just make sure you don't overwrite the lvm by accident: if you're not used to the way linux names or describes disks, then it might be safer for you to just pull the sata cable prior to the re-install and use the below to mount/automount it.

    Code:
    # vgchange -ay
    # mount /dev/mapper/whatever_your_old_lvm_was_called /your/new/mount_point
    should be pretty obvious which node in /dev/mapper is the old volume.

    To auto mount, do something like

    Code:
    echo "/dev/mapper/<whatever> /<mountpoint> <filesystem> defaults 0 0" >> /etc/fstab
    *note*, the double ">>" is very important... don't use a single ">"

  4. #4
    Senior Member kopite's Avatar
    Join Date
    Sep 2006
    Location
    Liverpool
    Posts
    3,491
    Thanks
    80
    Thanked
    157 times in 126 posts
    • kopite's system
      • Motherboard:
      • Asus Maximus IV Gene-Z
      • CPU:
      • Intel Core i5 2500K
      • Memory:
      • 8GB DDR3 1600 MHz Corsair Memory Vengeance Black
      • Storage:
      • 128GB Crucial m4 for main drive. 3.5 TB of storage space over western Digital Drives
      • Graphics card(s):
      • Gigabyte NVIDIA GTX 970 G1 Gaming Edition
      • PSU:
      • 750W ANTEC TRUEPOWER
      • Case:
      • Silverstone Fortress FT03
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 1 x 27 inch dell Monitor 1 x 20 inch Dell monitor
      • Internet:
      • Virgin media 150MB

    Re: Moving an LVM to a new linux install

    Cheers ppl I thought so.

    my os is on a 250 GB drive completely seperate from the LVM so very little chance of my wiping it by accident

    The LVM I usually mount as a folder within Home so there shouldnt be any system data on there

    Now I just need to get a monitor plugged into it

    Thanks again

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •