CentOS 8 kickstart "device is too small for new format"

Issues related to applications and software problems and general support
Post Reply
pjwelsh
Posts: 2632
Joined: 2007/01/07 02:18:02
Location: Central IL USA

CentOS 8 kickstart "device is too small for new format"

Post by pjwelsh » 2019/09/27 16:15:27

Disk partition issue I can't figure out what's wrong in CentOS 8. A fully functional CentOS 7 disk/partition creation section from kickstart file fails. I can *set* sizes on a target system, but if I use some combo of --percent and/or --grow I get an error, "device is too small for new format". Order of the partition creation does not seem to make any difference. Here is size-set version that works in CentOS8 kickstart:

Code: Select all

# Disk partitioning information
part /boot/efi --fstype="efi" --ondisk=sda --size=600 --fsoptions="umask=0077,shortname=winnt" --label=efi
part pv.368 --fstype="lvmpv" --ondisk=sda --size=242573
part /boot --fstype="ext4" --ondisk=sda --size=1024 --label=boot
volgroup VGslash --pesize=4096 pv.368
logvol / --fstype="xfs" --size=230280 --encrypted --label="slash" --luks-version=luks1 --name=01 --vgname=VGslash
logvol swap --fstype="swap" --size=12288 --encrypted --luks-version=luks1 --name=00 --vgname=VGslash
Several derivative attempts of the following produce the error(I tried changing order - no luck):

Code: Select all

part /boot/efi --fstype="efi" --ondisk=sda --size=600 --fsoptions="umask=0077,shortname=winnt" --label=efi
part /boot --fstype="ext4" --ondisk=sda --size=1024 --label=boot
part pv.368 --fstype="lvmpv" --ondisk=sda --size=2 --grow
volgroup VGslash --pesize=4096 pv.368
logvol swap --fstype="swap" --size=12288 --encrypted --luks-version=luks1 --name=LVswap --vgname=VGslash --passphrase=somepassphrase
logvol / --fstype="xfs" --percent=95 --encrypted --label="slash" --luks-version=luks1 --name=LVslash --vgname=VGslash --passphrase=somepassphrase
I see examples of using --size + --grow like https://access.redhat.com/discussions/3815241, but I want to make sure I have some unused VG space to be able to do snapshots. Snipet of above link:

Code: Select all

# Create primary system partitions (required for installs)
part /boot --fstype=xfs --size=512
part pv.01 --grow --size=1
# Create a Logical Volume Management (LVM) group (optional)
volgroup VolGroup --pesize=4096 pv.01
# Create particular logical volumes (optional)
logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=12288 --grow
Any eyes to help spot the issue would be amazing. I've gone through the RedHat portion and think I've gotten all of the changes for CentOS 8 compared to CentOS 7: https://access.redhat.com/documentation ... ng-storage.

This seems like some kind of bug, but it is just as likely my own fault :)
Thanks
PJ

pjwelsh
Posts: 2632
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: CentOS 8 kickstart "device is too small for new format"

Post by pjwelsh » 2019/09/28 15:45:06

I forgot to mention that the partition layout does pass the ksvalidator tool inspection process.

I'm leaning toward some kind of bug with anaconda's parser or something... Any suggestions?

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: CentOS 8 kickstart "device is too small for new format"

Post by hunter86_bg » 2019/09/29 05:50:27

Have you created your kickstarrt on a CentOS 8 system?
As far as I remember, there is a kickstarrt utility that will create a RHEL/CentOS 8 compatible kiclstart.

pjwelsh
Posts: 2632
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: CentOS 8 kickstart "device is too small for new format"

Post by pjwelsh » 2019/09/29 12:28:07

There is a RedHat online tool: https://access.redhat.com/labsinfo/kickstartconfig (login required) that I did try. It has a RHEL 8 option, however, "The tool currently does not support any advanced partitioning." (https://access.redhat.com/documentation ... enced-user)

Also, I've not been able to find the RHEL/CentOS 8 version/replacement of system-config-kickstart. "dnf search kickstart" only gets me the pykickstart package (that has the ksvalidator utility).

eknudtson
Posts: 1
Joined: 2019/09/27 16:44:59

Re: CentOS 8 kickstart "device is too small for new format"

Post by eknudtson » 2019/09/29 20:50:18

I'm having the same issue. I was only able to complete the kickstart by removing the
--grow
option from my partitions.

User avatar
centminmod
Posts: 44
Joined: 2014/07/12 14:28:06
Location: Brisbane, Australia
Contact:

Re: CentOS 8 kickstart "device is too small for new format"

Post by centminmod » 2019/09/30 00:45:35

not sure if it applies to you from rhel 8 docs you linked to
--grow - Tells the logical volume to grow to fill available space (if any), or up to the maximum size setting, if one is specified.

NOTE
If you use --grow= without setting --maxsize= on a swap partition, Anaconda limits the maximum size of the swap partition. For systems that have less than 2 GB of physical memory, the imposed limit is twice the amount of physical memory. For systems with more than 2 GB, the imposed limit is the size of physical memory plus 2GB.

--maxsize= - The maximum partition size in MiB when the partition is set to grow. Specify an integer value here such as 500 (do not include the unit).

pjwelsh
Posts: 2632
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: CentOS 8 kickstart "device is too small for new format"

Post by pjwelsh » 2019/09/30 15:51:00

EDIT:
There is at least one bug I'm hitting up against (https://bugzilla.redhat.com/show_bug.cgi?id=1737588) with at least "--reserved-percent" not being used.

I thought I had a partial solution, but figured out there is seems to just be an additional anaconda bug... there is something broken with the "--size=x" and/or with "--grow"...

pjwelsh
Posts: 2632
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: CentOS 8 kickstart "device is too small for new format"

Post by pjwelsh » 2019/09/30 17:05:43


tony_down_under
Posts: 83
Joined: 2019/08/07 01:50:24
Location: Perth, Australia but originally from Carshalton, Surrey

Re: CentOS 8 kickstart "device is too small for new format"

Post by tony_down_under » 2019/10/01 02:46:15

Why not instead of using free % space - configure a partition. Then later you can remove it and use the free space?

pjwelsh
Posts: 2632
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: CentOS 8 kickstart "device is too small for new format"

Post by pjwelsh » 2019/10/01 11:33:21

That is certainly an option.
I would rather just be able to use the document tools. In this case, I think there is more of a documentation issue. It looks like the "--size" requires some minimum that is not documented. Not sure if it's because of LVM, however. So, "--size=2 --grow" produces the error, but "--size=1000 --grow" works.

Here's the full UEFI+LVM+grow+encrypted working setup for me now(/home and others are network automounts):
# Partition clearing information
ignoredisk --only-use=sda
zerombr
clearpart --all --initlabel
# Disk partitioning information
part /boot/efi --fstype="efi" --ondisk=sda --size=600 --fsoptions="umask=0077,shortname=winnt"
part pv.314 --fstype="lvmpv" --ondisk=sda --size=1000 --grow --encrypted --luks-version=luks1 --passphrase=somepassphrase
part /boot --fstype="ext4" --ondisk=sda --size=1024
volgroup VGslash --pesize=4096 pv.314 --reserved-percent=5
logvol / --fstype="xfs" --percent=95 --name=lvslash --vgname=VGslash --label="slash"
logvol swap --fstype="swap" --size=12962 --name=lvswap --vgname=VGslash --label="swap"

My only other change will be to convert the swap to the one of the auto options depending on workstation-vs-laptop ("swap --recommended" -vs- "swap --hibernation" instead of a fixed size.

So, this is basically, "SOLVED".

Post Reply