Trying To Move To CentOS 7

General support questions
Posts: 21
Joined: 2015/06/21 23:25:20

Trying To Move To CentOS 7

Postby etpoole60 » 2017/12/07 23:40:14

I've a machine currently running CentOS 6.9 64-bit. It's a very good sized machine Intel Core I7; 64 GB RAM; storage is 2 - 120 GB SSD, 4 - 4 TB WD hard drives all configured as RAID-1 and LVM except /boot.

This machine is at least 4 years old and has survived a mother board failure. It runs a Oracle database with multiple schemas - these schemas contain my video library; music library; and reading library; all sorts of other important information - to me that is.

I'm looking ahead to 2020 when CentOS 6 goes away and I want to install CentOS 7 over the existing CentOS 6. But I want to re-use the OS file systems (i.e / (root); /opt; /tmp; /usr; /usr/local; /var) with the /home not reformatted. There are eight other LVM volume groups that will not be reformatted. There is also a huge volume group that is mounted on other machines as NFS that hold their qcow2 files for their KVM virtual machines (even the KVM virtual machines running on this machine use that mount). There is no option to start with a clean machine.

I've done several searches with no luck of anyone installing other than new machines or virtual machines. Hasn't anyone run into this issue??

User avatar
Forum Moderator
Posts: 21764
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Trying To Move To CentOS 7

Postby TrevorH » 2017/12/08 01:12:24

First thing - you do know there is no method to upgrade from CentOS 6 to 7? It's a fresh install or you don't do it.

The major problem with an in-place install like that of CentOS 7 over 6 is that 7 uses grub2 not grub legacy and that means you cannot keep CentOS 6 as an alternative boot option. I didn't fancy that option when I moved from 6 to 7 on this machine as I wanted to know that I could revert to booting the old system if things proved difficult to get working in time (I had a weekend from Friday night to Sunday evening to get it done so that I could get back to work using it on the Monday). To circumvent that, I used my BIOS to switch the boot disk to a different one so CentOS 6 and grub legacy was on the first physical disk and CentOS 7/grub2 was on the 2nd. As it turned out I did need more time as I ran into something that I needed that didn't work - think it was my VPN but it's been about 15 months since I did this so I've forgotten details - and I did need to carry on with el6 for a few more days while I fixed it and the BIOS switch option worked well.

The installer is a bit rubbish and non-intuitive, especially in the disk space selection and partitioning part of it but it does seem to do a fairly good job of not offering to format everything everywhere. You need to check the box that says something like "I will partition this myself" but then it lists all the partitions and LVs that it's found and you click on each one in turn and tell it where you want it mounted and if you want it formatted. Things you don't tell it to mount are left alone for you to configure post-install. You can even tell it to mount things on non-standard paths - so if you had a /backup filesystem now you can create that from the installer just by telling it to mount the right thing on that directory name. Test the installer in a VM first, make sure you're familiar with the partition pages as they're not great.

Can't advise on Oracle but I'd make sure you know that it works by testing things like that in a CentOS 7 VM first - it doesn't have to perform, you just need to know that the version you have will install etc.

My machine is probably a similar age, Xeon e3-1245v3, 32GB and at the time of the reinstall had 3 x SSDs and 2 x 4TB RAID1.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Posts: 21
Joined: 2015/06/21 23:25:20

Re: Trying To Move To CentOS 7

Postby etpoole60 » 2017/12/08 14:25:55

Thank You!
I will do some testing on a VM I've got running CentOS 6 - RAID-1. I know I will have to reformat all of the OS partitions (i.e. /usr; /var; etc.).
While trying to look into the future, I can see issues with booting if /dev/sda goes bad. Currently manually defined in my fstab is the following:

/dev/md0 /boot ext4 defaults 1 2

The original /boot entry with the UUID is commented out. The problem with this is in grub.conf file, it doesn't allow for the possibility of /dev/sda going bad. You have to do that manually. And I can't find explanations on doing that with CentOS-7 and grub-2.

I'm not really worried about Oracle, during installation of Oracle it places 4-6 files in /etc and /usr/local. I can copy them to my main Oracle partition and after CentOS 7 install I can copy them back where they belong. Testing is really required here.


Posts: 262
Joined: 2014/08/07 02:17:29

Re: Trying To Move To CentOS 7

Postby desertcat » 2017/12/10 08:05:49

TrevorH wrote:
...The installer is a bit rubbish and non-intuitive... .

Now THAT is the understatement of the year!!! :lol:

Posts: 902
Joined: 2015/02/17 15:14:33
Location: Bulgaria

Re: Trying To Move To CentOS 7

Postby hunter86_bg » 2017/12/10 08:08:41

When you make your tests on that VM, try creating a raid1 from anaconda and installing over it.Check if everything matches your preferences/requirements and only then plan the migration.
By the way, I'm expecting RHEL8 to show up before 2020.You might consider that as an option.At least they wont introduce somethig drastic as system V to systemd.

Posts: 4
Joined: 2017/03/25 18:23:37

Re: Trying To Move To CentOS 7

Postby Scrapper69 » 2017/12/14 02:24:52

OK, Here's my plan:
1. I've got 2 additional 4 TB hard drives due at my house as a Xmas present. I will install them using RAID-1 and LVM.
2. I plan on adding 1TB to the file system being used to hold all of my KVM machines.
3. I will install a CentOS 6 x86_64 KVM with several file systems.
4. The proposed file systems will be /boot defined as RAID-1 1024MB; vg_vmopsys RAID-1 LVM 64GB for OS files; vg_vmswap RAID-1 LVM 24GB for OS swap; vg_vmdbms RAID-1 LVM 64GB for PostgreSQL DBMS; vg_vmudata RAID-1 LVM 32GB for User Data
5. Configure and use everything as if it will be a perm VM.
Prior to the next step I will get a picture of mdstat; pvs; vgs; lvs; network information (do I need any other information?)
6. Start the install of CentOS 7-1708 and attempt to use the existing qcow2 datasets.
7. Once the install has started I will instruct the installation to format every OS file system EXCEPT /home - don't touch vg_vmdbms or vg_vmudata
I am now into dark area and I may come back to ask for help.

Posts: 21
Joined: 2015/06/21 23:25:20

Re: Trying To Move To CentOS 7

Postby etpoole60 » 2017/12/21 05:00:53

I had a machine running CentOS 6.9 x86_64 and I used it to install CentOS 7 1708 x86_64.
Let me say that the minimal CentOS 7 install saw the existing partitions and LVM definitions perfectly (and labeled them as belonging to CentOS 6.9 partitions). I installed the CentOS 7 into all of the OS partitions (/; /opt; /tmp; /var; /usr; /usr/local; swap) except for /home which I left unchanged but mounted.
There are other LVM partitions that I left unchanged but mounted. Everything not formatted was there and available for use.

I'm following the guidelines I found in the book 'CentOS 7 Linux Server Cookbook' to configure and expand the current package list.

This machine did not have RAID-1 defined so I can't say for sure what will happen there, but I'm going to find out soon.


Posts: 21
Joined: 2015/06/21 23:25:20

Re: Trying To Move To CentOS 7

Postby etpoole60 » 2017/12/25 04:56:22

I forgot to mention that even though it saw the correct volume group (vg_jpd9os) as far as the logical volume name is concerned it did not pick up the existing name (i.e. lv_usr) it wanted to use usr as the LVM name.

Three things I'm doing:
1. Reconstruct all of the users defined in the /home directory.
2. Install java and http from tar balls so I can control where they go.
3. Find out if Oracle DB Client 11gR2 will run correctly underf CentOS 7.

If the above works I will attempt to install on a machine the has RAID-1 and LVM.


Posts: 71
Joined: 2005/10/22 22:06:04
Location: U.K.

Re: Trying To Move To CentOS 7

Postby rklrkl » 2017/12/29 22:42:52

What I did on my home and work CentOS desktops when going from CentOS 6 to 7 is to
create an "/otheros" partition about the same size as CentOS 6's "/" and install CentOS 7 onto
the /otheros partition. Yes, you can share a /boot partition between CentOS 6 and 7
in case you're wondering, mainly because it's grub 1 vs. 2.

I then have CentOS 6's /etc/fstab mount the CentOS 7 "/" as /otheros and similarly
edit CentOS 7's /etc/fstab to mount the CentOS 6 "/" as /otheros. This immediately
gives me the ability to copy files between both OS'es in either direction in case I
need to bring files over. Dual boot is, of course, dead handy, though I believe
in separate /home trees for each OS in that setup. You don't really want to boot CentOS 7 using
CentOS 6's /home - you might get away with it, but it might also "wreck" your CentOS 6
/home setup.

One obvious desktop tip: make *sure* you install MATE on CentOS 7:

yum groupinstall "MATE Desktop"

Once installed, remember to select it as your default desktop (type in username in pre-login,
then click on the cogwheel and choose MATE) - it will give you a smooth transition from
CentOS 6's GNOME 2 desktop.

Of course, it should go without saying that you should install CentOS 7 in a VM first to see if the
software you want to run (Oracle or whatever) works. And, yes, the disk partitioning part of
the CentOS 7 installer is frankly awful - I've got used to its horrible completely unintuitive
interface, but it's got so many things wrong, I can't believe it's not had at least some of
its deficiencies fixed:

* It's non-obvious that if you're starting from scratch, you've got to manually delete all the detected existing OS'es/partitions and start adding new ones from effectively a blank list.
* Mixed size units from KiB through to GiB displayed on the same screen drive me bonkers.
* No option to "use all remaining space on device"! Found out by trial and error that you put a huge value in (e.g. 9999 GiB) for the final partition and it'll round down to the remaining space.
* Now defaults to XFS which is somewhat surprising (ext4 has better performance in most general use cases).

Posts: 21
Joined: 2015/06/21 23:25:20

Re: Trying To Move To CentOS 7

Postby etpoole60 » 2018/01/02 04:53:47

I'm not worried so much about a desktop, I do most of my work via command line.
What I'm really concerned about is all of the Software RAID-1 and LVM file systems with a ton of data I don't want to risk. I've done a physical machine that doesn't have Software RAID-1 but it does have LVM and data.
When doing the CentOS 7 install it listed all of the CentOS 6 file systems and I selected each one and told it which ones could be formatted (i.e. /; /usr; /var; etc.) and which one shouldn't be formatted (i.e. /home; /userdata; etc.).
When I made a mistake I just did a power reboot and started over.
What I can't find is documentation or a tutorial that includes Software RAID-1 in the process. What might happen if I make a mistake and have to do a power reboot? The machine I did this on just had a single 250 GB SATA hard drive. The machine I want to do this to has 2 - 120 GB SSD; 4 - 4TB WD Black Drives - all using Software RAID-1 and LVM - all of the data used by all of my other machines is stored on this machine.

Any ideas?