From felix-anaconda at fefe.de Mon Aug 1 12:08:57 2016 From: felix-anaconda at fefe.de (Felix von Leitner) Date: Mon, 1 Aug 2016 14:08:57 +0200 Subject: Partition siizes in percent (without using LVM) Message-ID: <20160801120857.GA16195@qarx.de> Hi! I need to make a kickstart configuration for Redhat 6.8. It is to form the basis for installing a commercial product on it later, and that product has some peculiar constraints on what they support and what not. That is the reason why this is Redhat 6.8 in the first place. The system installation is supposed to go on sda, and this works fine, but there is an sdb, too, and it is comparatively huge (> 20 TB). The constraints of the product say that there should be two partitions on sdb, one about 10% of it and one the rest of the space. The only way I could make this work is with LVM. It now turns out the product utterly fails if installed on LVM. Please note that I'm not blaming anyone for anything here. I just want to get this done. How do you make a partition 10% of the total size without using LVM in kickstarter? I found no way, surely I must be missing something obvious. Would it help if I made a custom DVD with a newer Anaconda binary, say from Fedora? Thanks, Felix From angus.clarke at gmail.com Mon Aug 1 12:48:00 2016 From: angus.clarke at gmail.com (Angus Clarke) Date: Mon, 1 Aug 2016 14:48:00 +0200 Subject: Partition siizes in percent (without using LVM) In-Reply-To: <20160801120857.GA16195@qarx.de> References: <20160801120857.GA16195@qarx.de> Message-ID: If I understand your problem correctly, you must label the disk as "gpt" which will allow you to specify larger (>2TB) filesystems. Other gotchas: don't use fdisk (doesn't support gpt style partition tables) - use parted instead (not sure if you need to do this in a %pre section or if the default "part" parameter supports gpt in rhel6+) I used the following once: %pre # Partition alignment dd if=/dev/zero of=/dev/sda bs=512 count=1 parted -s /dev/sda mklabel gpt parted -s /dev/sda mkpart primary 2048s 1050624s parted -s /dev/sda mkpart primary 1052672s 100% Note the firs partition starts at 2048 (required for gpt) Hope that helps Angus On 1 August 2016 at 14:08, Felix von Leitner wrote: > Hi! > > I need to make a kickstart configuration for Redhat 6.8. It is to form > the basis for installing a commercial product on it later, and that > product has some peculiar constraints on what they support and what not. > That is the reason why this is Redhat 6.8 in the first place. > > The system installation is supposed to go on sda, and this works fine, > but there is an sdb, too, and it is comparatively huge (> 20 TB). The > constraints of the product say that there should be two partitions on > sdb, one about 10% of it and one the rest of the space. > > The only way I could make this work is with LVM. It now turns out the > product utterly fails if installed on LVM. > > Please note that I'm not blaming anyone for anything here. I just want > to get this done. > > How do you make a partition 10% of the total size without using LVM in > kickstarter? I found no way, surely I must be missing something obvious. > > Would it help if I made a custom DVD with a newer Anaconda binary, say > from Fedora? > > Thanks, > > Felix > > _______________________________________________ > Kickstart-list mailing list > Kickstart-list at redhat.com > https://www.redhat.com/mailman/listinfo/kickstart-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From noamda at mellanox.com Mon Aug 1 12:48:25 2016 From: noamda at mellanox.com (Noam Davida) Date: Mon, 1 Aug 2016 12:48:25 +0000 Subject: Partition siizes in percent (without using LVM) In-Reply-To: <20160801120857.GA16195@qarx.de> References: <20160801120857.GA16195@qarx.de> Message-ID: Why can't you just calculate the percentage on the %pre section? %pre Write a small bash script to get the size of disk sdb, calculate the size of each partition you want and write to file Output will be $calc_size_p1, $calc_size_p2 echo "part /boot --fstype ext4 --size 1024 --asprimary --ondisk=sdb" > /tmp/partitioning.cfg echo "part / --fstype ext4 --size ${calc_size_p1} --ondisk=sdb" >> /tmp/partitioning.cfg echo "part / --fstype ext4--size ${calc_size_p2} --ondisk=sdb" >> /tmp/partitioning.cfg echo "part swap --size 2000 --ondisk=sdb" >> /tmp/partitioning.cfg %end Now use %include outside of %pre section to include the partition scheme you created: %include /tmp/partitioning.cfg Thanks, Noam -----Original Message----- From: kickstart-list-bounces at redhat.com [mailto:kickstart-list-bounces at redhat.com] On Behalf Of Felix von Leitner Sent: Monday, August 1, 2016 3:09 PM To: kickstart-list at redhat.com Subject: Partition siizes in percent (without using LVM) Hi! I need to make a kickstart configuration for Redhat 6.8. It is to form the basis for installing a commercial product on it later, and that product has some peculiar constraints on what they support and what not. That is the reason why this is Redhat 6.8 in the first place. The system installation is supposed to go on sda, and this works fine, but there is an sdb, too, and it is comparatively huge (> 20 TB). The constraints of the product say that there should be two partitions on sdb, one about 10% of it and one the rest of the space. The only way I could make this work is with LVM. It now turns out the product utterly fails if installed on LVM. Please note that I'm not blaming anyone for anything here. I just want to get this done. How do you make a partition 10% of the total size without using LVM in kickstarter? I found no way, surely I must be missing something obvious. Would it help if I made a custom DVD with a newer Anaconda binary, say from Fedora? Thanks, Felix _______________________________________________ Kickstart-list mailing list Kickstart-list at redhat.com https://www.redhat.com/mailman/listinfo/kickstart-list From felix-anaconda at fefe.de Mon Aug 1 13:20:07 2016 From: felix-anaconda at fefe.de (Felix von Leitner) Date: Mon, 1 Aug 2016 15:20:07 +0200 Subject: Partition siizes in percent (without using LVM) In-Reply-To: References: <20160801120857.GA16195@qarx.de> Message-ID: <20160801132006.GA7772@qarx.de> > If I understand your problem correctly, you must label the disk as "gpt" > which will allow you to specify larger (>2TB) filesystems. Other gotchas: > don't use fdisk (doesn't support gpt style partition tables) - use parted > instead (not sure if you need to do this in a %pre section or if the > default "part" parameter supports gpt in rhel6+) Well, to be honest, I was hoping to use the declarative syntax of Anaconda instead of writing a script. When I inherited this project, it was a script, and it did basically what you are suggesting, but the mke2fs on the Redhat 6.8 ISO is defective and cannot create a filesystem larger than 16 TB. So I needed to switch to XFS, and the mkfs.xfs is not there, not even in the freshly created installed system, unless you also declaratively create an XFS partition somewhere. I was hoping that there is a newer version of anaconda that I could use on the DVD, that would have something like the logvol --percent option, but for the part statement. The alternative I'm seeing right now is to create a dummy partition on SDB declaratively, and then have a script that deletes it and makes two new partitions from inside the chroot into the fresh system. I find this option highly objectionable. Nobody should leave this kind of legacy hack behind at work. :-) Thanks, Felix From felix-anaconda at fefe.de Mon Aug 1 13:23:39 2016 From: felix-anaconda at fefe.de (Felix von Leitner) Date: Mon, 1 Aug 2016 15:23:39 +0200 Subject: Partition siizes in percent (without using LVM) In-Reply-To: References: <20160801120857.GA16195@qarx.de> Message-ID: <20160801132339.GB7772@qarx.de> > Why can't you just calculate the percentage on the %pre section? That is a good idea and might just have to do it like this. Still, why does the part statement not have a --percent when --ondisk is used? It looks so obvious to me. What were the reasons for not having it? Thanks, Felix From phracek at redhat.com Thu Aug 18 13:47:06 2016 From: phracek at redhat.com (Petr Hracek) Date: Thu, 18 Aug 2016 15:47:06 +0200 Subject: Kickstart ordering Message-ID: Hi folks, I generate a kickstart via from python code and generation if fine. But order of section in my case is: - partitioning, users, repositories etc. - %pre section - %post section - %packages section But what about if I would like to change the order to: - partitioning, users, repositories etc. - %pre section - %packages section - %post section Post and packages are exchanged. Greetings and thanks for the help. -- Petr Hracek Software Engineer Developer Experience Red Hat, Inc. Mob: +420 777 056 169 email: phracek at redhat.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tibbs at math.uh.edu Thu Aug 18 14:07:33 2016 From: tibbs at math.uh.edu (Jason L Tibbitts III) Date: Thu, 18 Aug 2016 09:07:33 -0500 Subject: Kickstart ordering In-Reply-To: (Petr Hracek's message of "Thu, 18 Aug 2016 15:47:06 +0200") References: Message-ID: >>>>> "PH" == Petr Hracek writes: PH> Post and packages are exchanged. But the difference is only cosmetic, isn't it? I mean, %post is always called after the %packages have all been installed, regardless of their order in the file. Or is it this cosmetic difference that you actually want? If so, an awk script should easily be able to convert one to the other. - J< From phracek at redhat.com Thu Aug 18 14:14:04 2016 From: phracek at redhat.com (Petr Hracek) Date: Thu, 18 Aug 2016 16:14:04 +0200 Subject: Kickstart ordering In-Reply-To: References: Message-ID: HI Jason, yes. It is only a cosmetic issue in kickstart file. See https://bugzilla.redhat.com/show_bug.cgi?id=1302295 Nothing else. On Thu, Aug 18, 2016 at 4:07 PM, Jason L Tibbitts III wrote: > >>>>> "PH" == Petr Hracek writes: > > PH> Post and packages are exchanged. > > But the difference is only cosmetic, isn't it? I mean, %post is always > called after the %packages have all been installed, regardless of their > order in the file. > > Or is it this cosmetic difference that you actually want? If so, an awk > script should easily be able to convert one to the other. > > - J< > -- Petr Hracek Software Engineer Developer Experience Red Hat, Inc. Mob: +420 777 056 169 email: phracek at redhat.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tibbs at math.uh.edu Thu Aug 18 15:13:39 2016 From: tibbs at math.uh.edu (Jason L Tibbitts III) Date: Thu, 18 Aug 2016 10:13:39 -0500 Subject: Kickstart ordering In-Reply-To: (Petr Hracek's message of "Thu, 18 Aug 2016 16:14:04 +0200") References: Message-ID: Just so you know, that bug is private.... - J< From simpsonar77 at gmail.com Thu Aug 18 15:29:43 2016 From: simpsonar77 at gmail.com (Andrew Simpson) Date: Thu, 18 Aug 2016 11:29:43 -0400 Subject: Kickstart ordering In-Reply-To: References: Message-ID: This is purely cosmetic, as mentioned. If you need to install packages later on, simply mount the source in the %post section and install via RPM or YUM and exclude those packages from the %packages section Andrew Simpson On Thu, Aug 18, 2016 at 11:13 AM, Jason L Tibbitts III wrote: > Just so you know, that bug is private.... > > - J< > > _______________________________________________ > Kickstart-list mailing list > Kickstart-list at redhat.com > https://www.redhat.com/mailman/listinfo/kickstart-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From clumens at redhat.com Thu Aug 18 18:03:48 2016 From: clumens at redhat.com (Chris Lumens) Date: Thu, 18 Aug 2016 14:03:48 -0400 Subject: Kickstart ordering In-Reply-To: References: Message-ID: <20160818180347.GA20864@exeter.usersys.redhat.com> > I generate a kickstart via from python code and generation if fine. > But order of section in my case is: > > - partitioning, users, repositories etc. > - %pre section > - %post section > - %packages section > > But what about if I would like to change the order to: > - partitioning, users, repositories etc. > - %pre section > - %packages section > - %post section > > Post and packages are exchanged. This would require code changes - check out BaseHandler.__str__ in pykickstart/base.py. - Chris From drlogix at gmail.com Thu Aug 18 20:28:32 2016 From: drlogix at gmail.com (Thomas Sanders) Date: Thu, 18 Aug 2016 13:28:32 -0700 Subject: Kickstart ordering In-Reply-To: <20160818180347.GA20864@exeter.usersys.redhat.com> References: <20160818180347.GA20864@exeter.usersys.redhat.com> Message-ID: +1 (even if it is cosmetic) :) -Thomas On Thu, Aug 18, 2016 at 11:03 AM, Chris Lumens wrote: > > I generate a kickstart via from python code and generation if fine. > > But order of section in my case is: > > > > - partitioning, users, repositories etc. > > - %pre section > > - %post section > > - %packages section > > > > But what about if I would like to change the order to: > > - partitioning, users, repositories etc. > > - %pre section > > - %packages section > > - %post section > > > > Post and packages are exchanged. > > This would require code changes - check out BaseHandler.__str__ in > pykickstart/base.py. > > - Chris > > _______________________________________________ > Kickstart-list mailing list > Kickstart-list at redhat.com > https://www.redhat.com/mailman/listinfo/kickstart-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlehman at redhat.com Mon Aug 29 19:44:09 2016 From: dlehman at redhat.com (David Lehman) Date: Mon, 29 Aug 2016 15:44:09 -0400 Subject: RFC: Disk specification by classes/tags Message-ID: <1472499849.11097.19.camel@redhat.com> Hi All, I work on blivet, which is the storage management backend for anaconda/kickstart. I'm working on a feature that was inspired by discussion on this list: specification of disks by class/tag. Eventually, I imagine this capability will be plumbed through kickstart and anaconda. In the interest of determining how much machinery I should build into this, I'm soliciting use-cases for this type of filtering. Here's what I have so far: # do autopart, but only use local drives ignoredisk --onlyuse=@local autopart # make sure /boot goes on a local drive part /boot?--ondisk=@local # make sure a pv that backs an lvm cache lv goes on the ssd part pv.cache.0 --fstype=lvmpv --size=4096 --grow --ondisk=@ssd # put a data volume on a shared SAN volume part /shared --size=100000 --grow --ondisk=@remote What kinds of restrictions do you wish you could easily place on disk sets in your kickstart configurations? Thanks, David From david at graniteweb.com Mon Aug 29 20:23:47 2016 From: david at graniteweb.com (David Rock) Date: Mon, 29 Aug 2016 15:23:47 -0500 Subject: RFC: Disk specification by classes/tags In-Reply-To: <1472499849.11097.19.camel@redhat.com> References: <1472499849.11097.19.camel@redhat.com> Message-ID: <20160829202347.GC30969@apple.graniteweb.com> * David Lehman [2016-08-29 15:44]: > > What kinds of restrictions do you wish you could easily place on disk > sets in your kickstart configurations? Our primary need is to identify and use only local disk. The way we manage it now is by blacklisting the HBA drivers. A @local tag would be a lot nicer for us. -- David Rock david at graniteweb.com From sr at genyosha.net Tue Aug 30 00:31:28 2016 From: sr at genyosha.net (Steve Rikli) Date: Mon, 29 Aug 2016 17:31:28 -0700 Subject: RFC: Disk specification by classes/tags In-Reply-To: <1472499849.11097.19.camel@redhat.com> References: <1472499849.11097.19.camel@redhat.com> Message-ID: <20160830003128.GA10134@dragon.genyosha.home> On Mon, Aug 29, 2016 at 03:44:09PM -0400, David Lehman wrote: > > I work on blivet, which is the storage management backend for > anaconda/kickstart. I'm working on a feature that was inspired by > discussion on this list: specification of disks by class/tag. > Eventually, I imagine this capability will be plumbed through kickstart > and anaconda. > > In the interest of determining how much machinery I should build into > this, I'm soliciting use-cases for this type of filtering. Here's what > I have so far: > > # do autopart, but only use local drives > ignoredisk --onlyuse=@local > autopart > > # make sure /boot goes on a local drive > part /boot??--ondisk=@local > > # make sure a pv that backs an lvm cache lv goes on the ssd > part pv.cache.0 --fstype=lvmpv --size=4096 --grow --ondisk=@ssd > > # put a data volume on a shared SAN volume > part /shared --size=100000 --grow --ondisk=@remote > > > What kinds of restrictions do you wish you could easily place on disk > sets in your kickstart configurations? I know we can already hardcode which disk to use (--ondisk=sda) but I'd like to be able to tell kickstart to use only the 1st disk found, or at least confine the kickstart to 1 drive. You're in the same ballpark with @local (+ @ maybe?) but e.g. if I have a pair of SSD and I want the 2nd one to be used for non-sysdisk duties, today I think I have to use disk names. Thanks for looking into this sort of enhancement. Even just the above ideas are potentially helpful. sr. From vpodzime at redhat.com Tue Aug 30 05:28:04 2016 From: vpodzime at redhat.com (Vratislav Podzimek) Date: Tue, 30 Aug 2016 07:28:04 +0200 Subject: RFC: Disk specification by classes/tags In-Reply-To: <20160830003128.GA10134@dragon.genyosha.home> References: <1472499849.11097.19.camel@redhat.com> <20160830003128.GA10134@dragon.genyosha.home> Message-ID: <1472534884.8647.1.camel@redhat.com> On Mon, 2016-08-29 at 17:31 -0700, Steve Rikli wrote: > On Mon, Aug 29, 2016 at 03:44:09PM -0400, David Lehman wrote: > > > > > > I work on blivet, which is the storage management backend for > > anaconda/kickstart. I'm working on a feature that was inspired by > > discussion on this list: specification of disks by class/tag. > > Eventually, I imagine this capability will be plumbed through kickstart > > and anaconda. > > > > In the interest of determining how much machinery I should build into > > this, I'm soliciting use-cases for this type of filtering. Here's what > > I have so far: > > > > # do autopart, but only use local drives > > ignoredisk --onlyuse=@local > > autopart > > > > # make sure /boot goes on a local drive > > part /boot??--ondisk=@local > > > > # make sure a pv that backs an lvm cache lv goes on the ssd > > part pv.cache.0 --fstype=lvmpv --size=4096 --grow --ondisk=@ssd > > > > # put a data volume on a shared SAN volume > > part /shared --size=100000 --grow --ondisk=@remote > > > > > > What kinds of restrictions do you wish you could easily place on disk > > sets in your kickstart configurations? > > I know we can already hardcode which disk to use (--ondisk=sda) but I'd > like to be able to tell kickstart to use only the 1st disk found, or at > least confine the kickstart to 1 drive. > > You're in the same ballpark with @local (+ @ maybe?) but e.g. > if I have a pair of SSD and I want the 2nd one to be used for non-sysdisk > duties, today I think I have to use disk names. So in your case you don't care which SSD is used as long as only one of them is? Something like 'ignoredisk --one_disk_install'? -- Vratislav Podzimek Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic From petro at cpetro.us Tue Aug 30 20:36:26 2016 From: petro at cpetro.us (C. Petro) Date: Tue, 30 Aug 2016 14:36:26 -0600 Subject: RFC: Disk specification by classes/tags In-Reply-To: <20160830003128.GA10134@dragon.genyosha.home> References: <1472499849.11097.19.camel@redhat.com> <20160830003128.GA10134@dragon.genyosha.home> Message-ID: > I know we can already hardcode which disk to use (--ondisk=sda) When building a kickstart configuration for two or more types of machines sometimes that *doesn't* work. Last time I went through that I had Dell R620XDs (IIRC) and these awful SuperMicro boxes that had a windows only raid controller and I had to scriptomagically bang sdb and sdc together to get a predictable MD0. The sda device was present, but didn't work. What would be *really* cool is a couple of built in tags (@local, @remote, etc.) but also a way to define NEW tags on the fly--for example having a PRE script that creates an MD device then tags that as @fred or one that goes looking for a drive with particular characteristics (say for example I have a HP DL380G8 with 3 onboard RAID controllers and want to strip my data RAID across them, I can look for the first drive on each controller and make them a RAID 1, then the next X drives as a PV, and the last Y drives as a second PV etc.. > but I'd like to be able to tell kickstart to use only the 1st disk found, or at least confine the kickstart to 1 drive. On Mon, Aug 29, 2016 at 6:31 PM, Steve Rikli wrote: > On Mon, Aug 29, 2016 at 03:44:09PM -0400, David Lehman wrote: >> >> I work on blivet, which is the storage management backend for >> anaconda/kickstart. I'm working on a feature that was inspired by >> discussion on this list: specification of disks by class/tag. >> Eventually, I imagine this capability will be plumbed through kickstart >> and anaconda. >> >> In the interest of determining how much machinery I should build into >> this, I'm soliciting use-cases for this type of filtering. Here's what >> I have so far: >> >> # do autopart, but only use local drives >> ignoredisk --onlyuse=@local >> autopart >> >> # make sure /boot goes on a local drive >> part /boot??--ondisk=@local >> >> # make sure a pv that backs an lvm cache lv goes on the ssd >> part pv.cache.0 --fstype=lvmpv --size=4096 --grow --ondisk=@ssd >> >> # put a data volume on a shared SAN volume >> part /shared --size=100000 --grow --ondisk=@remote >> >> >> What kinds of restrictions do you wish you could easily place on disk >> sets in your kickstart configurations? > > I know we can already hardcode which disk to use (--ondisk=sda) but I'd > like to be able to tell kickstart to use only the 1st disk found, or at > least confine the kickstart to 1 drive. > > You're in the same ballpark with @local (+ @ maybe?) but e.g. > if I have a pair of SSD and I want the 2nd one to be used for non-sysdisk > duties, today I think I have to use disk names. > > Thanks for looking into this sort of enhancement. Even just the above > ideas are potentially helpful. > > sr. > > _______________________________________________ > Kickstart-list mailing list > Kickstart-list at redhat.com > https://www.redhat.com/mailman/listinfo/kickstart-list