Specifying logical volume size as a percent of free space in the volume group in a RHEL 6 kickstart
Issue
- Need to kickstart hosts with a disk layout containing LVM volume groups that leave some spare space for LVM snapshots.
- The following partitioning layout was proposed which seemed unambitious and reasonable:
# disk partitions:
part /boot --fstype=ext4 --size=256
part pv.001 --size=1 --grow
# volume group:
volgroup vg_root pv.001
# logical volumes:
logvol swap --name=lv_swap --vgname=vg_root --size=2048
# let the root volume fill 90% of the volume group, we'll leave 10% available for a snapshot
logvol / --fstype=ext4 --vgname=vg_root --name=lv_root --percent=90
anacondathrows an errorUnable to create new logical volume with no extents. And the traceback is as follows when--percentwas used tologvolstatement
anaconda 13.21.82 exception report
Traceback (most recent call first):
File "/usr/lib/anaconda/storage/partitioning.py", line 1727, in growLVM
grow = portion * vg.vgFree
File "/usr/lib/anaconda/storage/partitioning.py", line 233, in doAutoPartition
growLVM(anaconda.id.storage)
File "/usr/lib/anaconda/dispatch.py", line 208, in moveStep
rc = stepFunc(self.anaconda)
File "/usr/lib/anaconda/dispatch.py", line 126, in gotoNext
self.moveStep()
File "/usr/lib/anaconda/dispatch.py", line 231, in currentStep
self.gotoNext()
File "/usr/lib/anaconda/gui.py", line 1371, in setScreen
(step, anaconda) = self.anaconda.dispatch.currentStep()
File "/usr/lib/anaconda/gui.py", line 1550, in setup_window
self.setScreen()
File "/usr/lib/anaconda/gui.py", line 1563, in run
self.setup_window(runres)
File "/usr/lib/anaconda/gui.py", line 1288, in run
self.icw.run (self.runres)
File "/usr/bin/anaconda", line 1115, in <module>
anaconda.intf.run(anaconda)
AttributeError: 'LVMVolumeGroupDevice' object has no attribute 'vgFree'
Environment
- Red Hat Enterprise Linux 6
anacondakickstart installation
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
