With bootable RAID1 and LVM, what benefit do HDD partitions provide?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
The bigger benefit is the ability to add/remove PV's.
Do *NOT* make up misleading terminology of you expect help from others. The terminology for LVM is well known and well explained. Use it.
There is no intrinsic benefit in partitioning a device prior to pvcreate - however:
- most documentation you will find will be predicated on partitioned disks.
- initrd may or may not be aware of full disk PVs. YMMV.
A big reason for partitioning (even if it's just a single partition using the entire drive) is so that at some time in the future you won't see a partitioning tool report "sd{X} has no partitions" and mistakenly conclude that this is the new disk you just installed. It's similar to the reason that GPT always creates a "Protective MBR" with a single, maximum-sized partition. It keeps a non-GPT-aware tool from reporting that nothing is allocated on the disk.
Also, if at some point you decide that you really do want a separate partition on the disk (perhaps for installing another OS), shrinking an existing partition and adding another is a heck of a lot easier than converting a disk from unpartitioned to partitioned.
Last edited by rknichols; 12-01-2016 at 09:32 AM.
Reason: Also, ...
Do *NOT* make up misleading terminology if you expect help from others. The terminology for LVM is well known and well explained. Use it.
Proposed text clarification: Can I think of the LV as being real similar to a disk partition? The OS sees and treats the two devices the same, no?
Quote:
Originally Posted by rknichols
A big reason for partitioning (even if it's just a single partition using the entire drive) is so that at some time in the future you won't see a partitioning tool report "sd{X} has no partitions" and mistakenly conclude that this is the new disk you just installed.
Excellent tip RK!!! A single big partition it will be. establishing a partition table makes sense, I just couldn't see the need for multiple partitions, just to have them 'hidden'from the OS by a LG spanning the whole disk.
No one has yet mentioned the need for at least one partition, the 1 MiB Bios Boot partition where the grub2 core.img is stored in a small partition with no filesystem. if you plan on booting from these disks you will at least need this small partition.
Also since you plan on using LVM on top of mdraid Raid 1 I recommend using a separate /boot partition outside of LVM. This is what the Fedora installer does as well as others. While technically it is possible to boot a LVM disk without having a separate /boot partition as rknichols said it is more complex and requires the LVM grub modules to be installed into the core.img.
From the GRUB Arch-Wiki
LVM
If you use LVM for your /boot, make sure that the lvm module is preloaded:
/etc/default/grub
GRUB_PRELOAD_MODULES="lvm"
You may also have to add grub modules for mdraid as well in your case. Also from the GRUB Arch-Wiki:
RAID
GRUB provides convenient handling of RAID volumes. You need to add insmod mdraid09 or mdraid1x which allows you to address the volume natively. For example, /dev/md0 becomes:
set root=(md/0)
whereas a partitioned RAID volume (e.g. /dev/md0p1) becomes:
set root=(md/0,1)
To install grub when using RAID1 as the /boot partition (or using /boot housed on a RAID1 root partition), on devices with GPT ef02/'BIOS boot partition', simply run grub-install on both of the drives, such as:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.