Best practice disk setup

General support questions
Post Reply
lxuser15
Posts: 3
Joined: 2015/10/06 19:22:48

Best practice disk setup

Post by lxuser15 » 2015/10/06 19:30:50

I'm looking for pointers about best-practice for disk setup of CentOS
as a virtual guest on basically any hypervisor, though primarily
VMware/KVM/XEN in x86_64 enterprise environments.
Mainly I'm hoping for guidance on how to treat /boot and being able
to use LVM for all filesystems while still be able to resize these
online without having to cope with partitions.
The best would be if it had been possible to just create everything
as logical volumes on the first disk directly without having to
create any partition. But then there's the problem of booting off an
LVM. AFAICT that's still not supported, and anaconda doesn't
allow you to place /boot in an LVM.
This is just for the root disk, the data disks are treated as plain
LVM PV's with no partition created as that gives the best ability
to resize online overtime as data grows.

Thanks for your thoughts

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Best practice disk setup

Post by TrevorH » 2015/10/06 21:26:26

Give /boot 500MB which should be enough for the default number of installonly_pkgs in yum (kernels). Make everything else LVM LVs. If you want the ability to shrink filesystems without backup/reformat/restore then don't use xfs, use ext4.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lxuser15
Posts: 3
Joined: 2015/10/06 19:22:48

Re: Best practice disk setup

Post by lxuser15 » 2015/10/07 17:56:47

Thanks for your thoughts, and I agree on it.
But it doesn't answer my concern about using
partitions. If you create a partition for /boot on the
first disk. Then you need to create another partition
on that disk in order to utilize the rest of the space
for anything. AFAIK you can't use the rest of the
space for LVM unless you turn that into partition
of type 8E.
With this comes of course the problems if you are
to extend the disk with additional space as LVM
ist still bound to the partition boundary. One needs
to remove the partition and recreate with a new
end in order to make use of the newly added
disk space. And this can't be done online as this
is the first disk :-(
Sure one could always add a second disk to the
LVM

What do admins normally do, what's considered
best practice?

Thanks

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Best practice disk setup

Post by gerald_clark » 2015/10/07 21:54:31

Not true. You do not have to resize the partition.
You can add another LVM partition and add it to the same volume group.

lxuser15
Posts: 3
Joined: 2015/10/06 19:22:48

Re: Best practice disk setup

Post by lxuser15 » 2015/10/08 14:09:38

Yes that's true. But unless you make an extended partition, you can only have 4
primary partitions. What if you need to grow the LVM more than 3 times over time,
then that can't be done.
If going with an extended partition, then you're still tied into the partition boundary
of the exteded partition right?

Thanks

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Best practice disk setup

Post by gerald_clark » 2015/10/08 14:48:17

You are not limited to one LV per VG.
Just assign the rest of the disk to a PV and make it part of your VG. Assign/expand LVs as needed.
As far as extended partitions vs primary partitions, I have no idea what you are asking, and it makes no difference.

nouvo09
Posts: 184
Joined: 2009/09/19 19:21:36
Location: Paris, France

Re: Best practice disk setup

Post by nouvo09 » 2015/10/11 09:27:57

lxuser15 wrote:Yes that's true. But unless you make an extended partition, you can only have 4
primary partitions.
And not true neither on GPT format disks
Member of centos-FR forum

Post Reply