0

Here just for example:

part pv.01 -size=100 -grow -ondisk=/dev/sda
part pv.02 -size=300 -grow -ondisk=/dev/sdb
  1. Is the purpose of the PV.<ID> usage merely used to customize the initial size of some disk?

  2. How to specify the <ID> value of some PV ahead of time since itself would be "random" number?

Refer the following http link: CentOS/RHEL 7 LVM Partitioning in Kickstart?

larsks
  • 43,623
  • 14
  • 121
  • 180
lylklb
  • 3
  • 3

1 Answers1

0

Is the purpose of the PV. usage merely used to customize the initial size of some disk?

The part command is used to create disk partitions. The various options allow you to specify the associated block device, the size of the partition, etc. By assigning a pv.<ID> identifier, you are declaring that this partition will be an LVM "physical volume" (PV), and you can then use those identifiers when creating a volume group in your ks.cfg, e.g:

part pv.01 --size=100 --grow --ondisk=/dev/sda
part pv.02 --size=300 --grow --ondisk=/dev/sdb
volgroup vgsys pv.01 pv.02

How to specify the value of some PV ahead of time since itself would be "random" number?

You assign these identifiers in your Kickstart configuration file; they aren't randomly assigned nor do you need to know them "ahead of time". They only have meaning within the context of your Kickstart configuration.

You may want to read the documentation for the part command as well as the documentation for the volgroup command.

larsks
  • 43,623
  • 14
  • 121
  • 180
  • So does it mean that the PV. can be any values including any letter that I want to specify , e.g. PV.edu817 ? – lylklb Nov 07 '22 at 12:50
  • Experimentally, yes, the `` component can be an arbitrary value (I ran a kickstart install with `part pv.foo ...`)...but why bother? The identifiers are only relevant in your kickstart. – larsks Nov 07 '22 at 14:09