System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

LVM on sdd or sdd1 which is best?

SOLVED
Go to solution
ManojK_1
Valued Contributor

LVM on sdd or sdd1 which is best?

Hi,

 

There is a new disk (/dev/sdd) is presented to our RHEL system. I have to configure LVM on the disk.

 

What is the best way to create LVM on a disk.

I am having two options now. Please tell me which one is best.

 

1) pvcreate /dev/sdd. initialize the disk for use by LVM  and then create vg on it.

or

2) use fdisk and create /dev/sdd1 and use pvcreate and vgcreate?

 

If there is any other option please let me know?

 

Manoj K

Thanks and Regards,
Manoj K
2 REPLIES
Matti_Kurkela
Honored Contributor
Solution

Re: LVM on sdd or sdd1 which is best?

Advantages and disadvantages of using pvcreate on the whole-disk device (your method 1):

+ wastes less disk space

+ if you have data alignment requirements (e.g. SSD disk, a disk with 4KB sector size, or a high-performance SAN LUN), they are easy to satisfy. If your RHEL version is new enough, pvcreate has a "--dataalignment" option; with older versions, the "--metadatasize" option can achieve the same thing indirectly.

- a disk used in this way cannot be bootable using standard PC BIOS +  GRUB bootloader.

- if this is a SAN LUN and someone accidentally presents it to a Windows system, the Windows system cannot recognize that the disk is already in use.

 

Advantages and disadvantages of using fdisk (your method 2):

- wastes some disk space (traditionally the entire first track is dedicated to partition table only)

- if you have data alignment requirements, satisfying them may require some careful disk geometry calculations

+ the disk can be made bootable: BIOS will recognize it as a valid boot target, and you can add a separate /boot partition so that the GRUB bootloader (that uses BIOS to access the disk) can find its own configuration file, the kernel file and the initrd file.

+ if this is a SAN LUN and someone accidentally presents it to a Windows system, the Windows sysadmin will immediately see the disk is already partitioned with an unknown partition type (= Linux LVM) and hopefully won't overwrite it without checking with the SAN administrator first.

 

Which one is best? It depends on your situation. Which of the above-mentioned things are important to you and which are not?

MK
ManojK_1
Valued Contributor

Re: LVM on sdd or sdd1 which is best?

Hi MK,

 

Thanks for the information.

 

I got the information what i am looking for.

 

Thanks and Regards,

Manoj K

Thanks and Regards,
Manoj K