#ubuntu-s390x 2016-06-20
<fbader> If I have / on an LV and expand it with another PV on EKCD DASD, how do I make sure that additional volume will be online when I reboot.  I did 'chzdev -e 0201' and a 'lszdev' showed it was ON and PERS.   But after reboot, it could not mount / because the 2nd PV was not online.
<fbader> I didn't see a list of dasd in zipl.conf, and there doesn't appear to be a dasd.conf file to list ECKD DASD that is to be online at boot.
#ubuntu-s390x 2016-06-21
<jfh> g'morning
<fbader> Hi, I wonder if anyone can help with this.
<fbader> If I have / on an LV and expanded it with another PV on EKCD DASD, how do I make sure that additional volume will be online when I reboot?  I did 'chzdev -e 0201' and a 'lszdev' showed it was ON and PERS.   But after reboot, it could not mount / because the 2nd PV was not online.
<fbader> Is there some place where you put a list (e.g., /etc/dasd.conf, /etc/zipl.conf) of ECKD DASD that is to be online at boot?
<tinoco> xnox: ^^ do we ? or we're only using dasd module parameters for chccwdev enabling dasds ?
<xnox> fbader, $ chzdev -e 0201 && update-initramfs -u
<xnox> chzdev -e > generates the new udev rules
<xnox> update-initramfs -u rebuilds the initramfs and includes the new udev rules
<xnox> fbader, i am meant to write a hook to chzdev to automatically call update-initramfs -u when needed....
<fbader> @xnox I was not aware of running "update-initramfs -u" after chzdev.  I will try that and see if that resolves the issue of the device not being online at boot.  Thanks!
<fbader> That may also explain why when a ECKD DASD device was removed with "chzdev -d 0300" (which was online when the system was installed), that's why it kept coming back online after a reboot.
<fbader> We need to do the "chzdev -e 0301" and then "update-initramfs -u" to make it permanent after a reboot.  chzdev did remove the udev rule but the device was still online.
<xnox> fbader, correct, because initramfs has the udev rules of whatever was on disk last time  it was generated.
<xnox> fbader, you can use -a to affect only active configuration, without writing udev rules on disk
<xnox> e.g. $ chzdev -a -e/-d 0301 -> to enable/disable devices without writing things on disk.
#ubuntu-s390x 2016-06-23
<xnox> cpaelzer, hey. in addition to the IPL bug, the installer on FBA devices tries to use (a) msdos partition table (b) create logical partition #5 which fails.
<xnox> on FBA devices, what partition table should be used?
<cpaelzer> xnox: hi
<cpaelzer> xnox: I only saw it uses fdasd and reported that -so you are saying "afterwards" it is using msdos parts which fails as well
<cpaelzer> hmm
<cpaelzer> xnox: let me check the docs what partition table format should be used
<xnox> cpaelzer, i tried autopartitioning, and it clearly went to use msdos because the label is not "dasd"
<xnox> dasdfmt complaints "this is not eckd" device and
<cpaelzer> xnox: yeah this type can't be formatted by Linux at all
<xnox> and fdasd also complaints.
<cpaelzer> xnox: that is what I meant with "we should put something in docs" in the bug
<cpaelzer> xnox: yeah it is not fdasd, it is what a scsi disk would be
<cpaelzer> xnox: fdisk ?
<cpaelzer> what does it use?
<xnox> fdisk can do anything under the moon =)
<xnox> "It understands GPT, MBR, Sun, SGI and BSD partition tables."
<xnox> i'll try gpt, if possible, but i think that blows up too =)
<cpaelzer> xnox: still searching the table I've seen last week ...
<cpaelzer> xnox: http://public.dhe.ibm.com/software/dw/linux390/docu/l4n4dd29.pdf page 159
<cpaelzer> xnox: lets start there
<cpaelzer> FBA disks are column #3
<cpaelzer> and as they don't work with dasdfmt they won't have CDL/LDL disk layout
<cpaelzer> instead only CMS disk layout is supported
<cpaelzer> and only one partition ...
<cpaelzer> they don't name the/a tool to partition
<cpaelzer> maybe it doesn't even have one - I mean there is a "max partition = 1"
<cpaelzer> xnox: ^^
<cpaelzer> I asked jfh to put a FBA disk as secondary device to his VMs so we could try with the power of a full linux instead of install env
<cpaelzer> jfh: is that ready somewhere ?
<xnox> cpaelzer, yes
<xnox> i have that
<cpaelzer> xnox: great
<xnox> let me try to create two primary partitions
<cpaelzer> I'd be bold and say maybe it is never partitioned at all - but please try the multitude of options you'd have with fdisk or so
<xnox> cpaelzer, this starting to make sense.
<cpaelzer> hca: I never worked that much with FBA - could you comment/confirm on the partitioning no FBA a bit?
<cpaelzer> hca: who needs that FBA cruft (well sadly some people like it)
<xnox> so in debian, for a long time it had short-circuited "automatic partioning" cause at the time of debian port only FBA was common, and if it can only have one partition.... partman autoparitioning into 5 partitions makes no sense.
<cpaelzer> xnox: ack
<cpaelzer> xnox: and dasd CDL format can only have three, not
<cpaelzer> 5
<cpaelzer> which is most common today
<xnox> sure, but we use fdasd there which is sensible.
<cpaelzer> xnox: as long as you are not using fdasd trying to do >3 :-)
<cpaelzer> xnox: I'll have to go to lunch now - but yes for FBA you'll likely have to revive the old short-circuit
<sth> cpaelzer let me clarify a few things about FBA devices
<sth> cpaelzer they do not have to and even can not be formatted using dasdfmt
<sth> cpaelzer per default there is a single partition implicit partition, meaning the partition is created by the DASD driver and has no information written to the disk
<sth> cpaelzer within z/VM you can use CMS FORMAT to generate a CMS partition
<sth> cpaelzer as of today IBM does not support the usage of fdisk for FBA devices
<sth> cpaelzer I tested it to a certain degree and it works with msdos style partition tables and up to 3 partitions
<sth> cpaelzer as far as I remember there is a conflict with GPT and zipl on FBA devices, there might be a risk of data corruption because of overlapping areas on the disk
<cpaelzer> sth: hi Stefan
<jfh> @cpaezler and @xnox: sorry for joining this conversation so late ...
<jfh> afair there is no special partition table for FBA, and defaults back to msdos
<cpaelzer> sth: thanks a lot, that confirmed all I found so far in a much more condensed way - great
<cpaelzer> jfh: see above the explanation of sth about partitions
<jfh> and I think fdisk does automatically use msdos if no table is there ...
<jfh> oh - okay ...
<cpaelzer> jfh: and all sth reports matches what I found in the device drivers handbook
<cpaelzer> also he owns the driver so there very unlikely is a better source of information :-)
<jfh> I see, but didn't know that fdisk is (still) not officially supported ... due to the fact that is used by lot's of folks on FBA devices ... and is even described in that way in the virt cookbooks ... anyhow ...
<sth> cpaelzer: no problem, let me know if you need more information
<xnox> sth, what i'm taking out of this discussion is that (a) parted is buggy, and tries to create extended/logical partitions (b) i should fix our installer to not do that on FBA and CKD devices
<xnox> (c) there is still the IPL bug off FBA devices =(
<sth> xnox, a b c yes and I am working on c
<xnox> sth, during 16.04 development we mostly used uncompressed kernel images, and switched to compressed images very late. I wonder if using scripts from kernel source tree to uncompress the kernel image would help to mitigate the IPL bug, or be able to investigate it easier.
<jfh> @sth: Hmm, I'm wondering if EDEV FBA can really be an officially supported scenario in this case ?!
<cpaelzer> jfh: it can, just not with partitioning
<cpaelzer> sth: the implicit partition by the dsasd-fba driver is the supported solution right?
<sth> xnox it might help to mitigate but as the bugs hits on special kernel sizes/offsets it might also not
<jfh> that's btw the suggested step from the virt. cookbook "parted -s /dev/dasde mklabel msdos mkpart primary 0% 100%"  (dasde being an FBA device)
<cpaelzer> sth: not that I'd vote to pad the kernel, but is the pattern of bad size/offset already known ?
<xnox> cpaelzer, well at the moment we have a bug with ECKD drives too - if one forces to use msdos partition table, it will caboom with automatic partitioning recipy.
<cpaelzer> ouch
<xnox> so this bug is worth fixing
<sth> jfh as of today there is a bug in the loader for FBA devices and i think the install image needs to be updated with a fixed zipl to get this fixed, I do not know if you would like to restrict this scenario officially
<xnox> sth, we have new media published on 21st of July for 16.04.1 release. It would be nice to have a fix for this before then (july 14th the latest)
<jfh> @sth: not necessarily, if not needed ... ;-)
<sth> cpaelzer we create chunks of the kernel image thats adresses are written to the bootmap file, if one of those chunks consists exactly of 128 blocks it will break the loader
<jfh> @xnox: agreed
<xnox> sth, about restricting.... in general there is plenty of ways of shooting one in the foot. And obvious ways of shooting oneself in the foot should not be the default =) like it currently is with clicking "continue" throughout the installer on an fba device.
<xnox> (with partitioning & IPL imploding)
<jfh> @xnox, @sth: is case we don't have a proper solution until 16.04.1 we should at least add a comment to the release notes, right ? But let's see ...
<cpaelzer> sth: thanks for the info, are these chunks the offset list created due to filesystem fragmentation - shouldn't be too much on a newly installed system
<sth> jfh regarding the usage of parted/fdisk on FBA, at least I am not aware of an official support statement, I do not know if the cookbook can be seen as such a statement
<sth> jfh as far as I have tested the described usage of parted should work
<sth> cpaelzer I am not 100% sure about the list generation but I think no
<sth> i have a fix for the loader in test
<sth> should be included in our bugzilla next week, I think
<jfh> @sth: that usually worked for me as well and for lot's of other folks (even for customers in prod) - so I assumed that it is officially supported - so "support due to long-term and traditional usage" ;-)
<sth> jfh ;)
<xnox> https://bugs.launchpad.net/ubuntu/+source/partman-base/+bug/1595495
<ubottu> Launchpad bug 1595495 in partman-base (Ubuntu) "DASD drives can only hold 3 partitions" [Undecided,New]
<xnox> uploaded a fix to yakkety to short-circuit extended partitions usage on dasd drives.
<xnox> will retest, and sru into xenial.
