Making CentOS 7 drive for multiple systems

General support questions
Post Reply
Janman
Posts: 3
Joined: 2014/12/22 11:51:59

Making CentOS 7 drive for multiple systems

Post by Janman » 2015/01/02 08:20:27

I want to use the same HDD with CentOS 7 on multiple different machines.

However, it seems that the installation only works on the system it has been installed on. I figure it has something to do
with the machine device names that can be hard-coded, so that other machines can't find the matching device listed in fstab.

In other operating systems, I have used the UUID of the partitions in the fstab, but since CentOS seems to be using LVM, I am a little lost.


So, how do I make a CentOS 7 harddrive bootable on multiple machines?
Should I somehow label the volumes? Or must I do something completely different?


Additional info:
When the boot fails on a system, dracut prints a warning for each partition:

Code: Select all

dracut Warning: /dev/disk/by-uuid/XYZ does not exist
dracut Warning: /dev/swap does not exist
dracut Warning: /dev/root does not exist
Thanks,
Jan

Michael Halsey
Posts: 2
Joined: 2015/01/03 20:46:21

Re: Making CentOS 7 drive for multiple systems

Post by Michael Halsey » 2015/01/03 21:15:29

You will need to mount the logical volume in the alternative OS's:

Code: Select all

pvs
lvdisplay /dev/'VGNAME'
mount /dev/'VGNAME'/LVNAME'/ 'MOUNT_POINT'
Put the last command in rc.local once you have established your volume group and logical volume name as well as your mount point.

Having said all of the above, I would like to advise you against this all together. I would suggest you move the data onto a non LVM partition which can be easily mounted by all OS's. Either that or put all your OS's in the same LV but that would be messy.

Post Reply

Return to “CentOS 7 - General Support”