Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I plan to upgrade a Debian system with three volume groups on three disks to Ubuntu. vgdisplay -v shows the device/partition associated with each volume group. How do I preserve (or remap)the volume groups and the associated logical volumes; while, of course, preserving the data? I'm thinking vgscan is my friend, right?
You did not mention whether or not you plan on putting any part of the OS, root, home on LVM.
If the VG disks are only data disks then the following is safe.
VG metadata is stored on disk.
This approach is not necessary, but it's always better to be safe than sorry.
Make a backup copy of /etc/lvm to a USB stick (just in case). copies of LVM metadata are stored there and may be used in the event of any metadata corruption (should not happen).
Turn off computer, unplug disks with VG/LV.
Install Ubuntu, then apt-get install lvm2
Turn off computers, reattach VG disks, boot the computer and the Volume Groups should be there.
They may not be active by default you may have to activate them with
Code:
vgchange -ay vgname
Make mount points and mount the logical volumes, add them to /etc/fstab and you're done.
Always make a complete backup before major upgrades, changes.
To further explain, see the (edited) output of "fdiak -l" and the output of "df -h" below.
As shown, I need to preserve the appsvg VG on the boot volume; and the VGs, sasvg and satavg, each on separate devices.
Added to my situation, is the unusable small size of /usr. Prior to the install, I plan to:
1) reduce the size of LV appsvg-apps
2) create LV apps-usr to be used as /usr
During the install I plan to use the existing layout for /, /tmp, /var, /opt.
Question:
Will the installer "honor" the LVM space of appsvg, and (from the metadata?) present me an opportunity to specify the apps-usr LV to be used for /usr?
Is there a better/safer approach?
From your previous comments, how risky is it to leave the apps-sas and apps-sata attached during the install process?
Again, many thanks for your guidance,
Mike
-----
fdisk -l /dev/sda
Disk /dev/sda: 72.7 GB, 72746008576 bytes
255 heads, 63 sectors/track, 8844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 62 497983+ 83 Linux ............................ /
/dev/sda2 63 1035 7815622+ 82 Linux swap / Solaris
/dev/sda3 1036 1157 979965 83 Linux ............................ /tmp
/dev/sda4 1158 8844 61745827+ 5 Extended
/dev/sda5 1158 1279 979933+ 83 Linux ............................ /usr
/dev/sda6 1280 1401 979933+ 83 Linux ............................ /var
/dev/sda7 1402 1523 979933+ 83 Linux ............................ /opt
/dev/sda8 1524 8844 58805901 8e Linux LVM ........................ appsvg
Will the installer "honor" the LVM space of appsvg, and (from the metadata?) present me an opportunity to specify the apps-usr LV to be used for /usr?
In the section where you specify advanced partitioning I think it's something like "Something Else"
you can choose from the existing partitions and logical volumes, specifying whether or not they are to be used, their filesystem type(s), whether or not the filesystems needs to be (re)formatted, and their mount points.
I don't trust these installers for more complicated partioning and/or LVM use as I have had one (vmware) clobber my data LVs without first asking permission/confirmation. So, I'm probably appropriately paranoid.
Quote:
Is there a better/safer approach?
Always.
Do you have enough space to make backups of everything prior to upgrading? If so, do so.
Quote:
From your previous comments, how risky is it to leave the apps-sas and apps-sata attached during the install process?
As I said, you do get a chance to specify all that I've mentioned.
May I play devil's advocate and ask the reason for switching from Debian to Ubuntu?
Is this a server or desktop?
I have an Ubuntu 10.04.3 LTS server with 2 10TB VGs, each with several logical volumes for data, however the OS is installed on its own disk and backed up to one the logical volumes using fsarchiver and sysrescuecd.
I also recommend eliminating the extended partitions and use a GPT partition table instead.
I don't trust these installers for more complicated partioning and/or LVM use as I have had one (vmware) clobber my data LVs without first asking permission/confirmation. So, I'm probably appropriately paranoid.
...
Always.
Do you have enough space to make backups of everything prior to upgrading? If so, do so.
Hard to argue with any of that.
I never trust the partitioning front-ends shipped with installers. Also the result of being bitten. I pre-allocate everything as I wish, mount them where I want ... and pray if you want anything not formatted.
Just yesterday I had a situation where a (non-Debian based) upgrade wouldn't allow me to mount the root and not format it. An upgrade, not (clean) re-install ... Distro devs always seem to have fixed ideas about how we as users should use their stuff.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.