<div dir="auto">Many thanks for your help<div dir="auto">Ignazio<br><div dir="auto"><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">Il Mar 27 Mar 2018 09:52 Andreas Scheuring <<a href="mailto:scheuran@linux.vnet.ibm.com">scheuran@linux.vnet.ibm.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi, I recently did it like this:<div><br></div><div><br></div><div>For Ubuntu: Cherry picked: <a href="https://review.openstack.org/#/c/504588/" target="_blank" rel="noreferrer">https://review.openstack.org/#/c/504588/</a></div><div><br></div><div><br></div><div><div>export DIB_BLOCK_DEVICE_CONFIG='</div><div>  - local_loop:</div><div>      name: image0</div><div>      size: 3GB</div><div><br></div><div>  - partitioning:</div><div>      base: image0</div><div>      label: mbr</div><div>      partitions:</div><div>        - name: root</div><div>          flags: [ boot, primary ]</div><div>          size: 100%</div><div>  - lvm:</div><div>      name: lvm</div><div>      pvs:</div><div>        - name: pv</div><div>          options: ["--force"]</div><div>          base: root</div><div><br></div><div>      vgs:</div><div>        - name: vg</div><div>          base: ["pv"]</div><div>          options: ["--force"]</div><div><br></div><div>      lvs:</div><div>        - name: lv_root</div><div>          base: vg</div><div>          size: 1800M</div><div><br></div><div>        - name: lv_tmp</div><div>          base: vg</div><div>          size: 100M</div><div><br></div><div>        - name: lv_var</div><div>          base: vg</div><div>          size: 500M</div><div><br></div><div>        - name: lv_log</div><div>          base: vg</div><div>          size: 100M</div><div><br></div><div>        - name: lv_audit</div><div>          base: vg</div><div>          size: 100M</div><div><br></div><div>        - name: lv_home</div><div>          base: vg</div><div>          size: 200M</div><div>  - mkfs:</div><div>      name: root_fs</div><div>      base: lv_root</div><div>      label: cloudimage-root</div><div>      type: ext4</div><div>      mount:</div><div>        mount_point: /</div><div>        fstab:</div><div>          options: "defaults"</div><div>          fsck-passno: 1</div><div><br></div><div>'</div><div><br></div><div># See <a href="https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1573982" target="_blank" rel="noreferrer">https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1573982</a></div><div># See <a href="https://bugs.launchpad.net/diskimage-builder/+bug/1715686" target="_blank" rel="noreferrer">https://bugs.launchpad.net/diskimage-builder/+bug/1715686</a></div><div># need to specify lvm2 module to include it into the ramdisk</div><div>disk-image-create -p lvm2 ubuntu-minimal</div><div><br></div><div><br></div><div># -> During boot the kernel was still not able to find the root disk (identified along uuid)</div><div># Executing the following command in the initramfs emergency shell made the volume appear for me</div><div>$ vgchange -ay</div><div>$ blkid</div><div># /dev/vda1: UUID="O11hwE-0Efq-SwO7-Bko8-hVe6-jyOT-7UAiza" TYPE="LVM2_member" PARTUUID="7885c310-01"</div><div># /dev/mapper/vg-lv_root: LABEL="cloudimage-root" UUID="bd6d2d2c-3ca6-4032-99fc-bf20e246e22a" TYPE=“ext4”</div></div><div>exit</div><div><br></div><div><br><div><br class="m_-59507213227259409webkit-block-placeholder"></div><div>Maybe things are going more smoothly with other distros, or maybe things have been fixed in the meanwhile… Or I did something wrong…</div><div><br></div><div>Good luck!</div><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class="m_-59507213227259409Apple-interchange-newline">---</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Andreas Scheuring (andreas_s)</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><br class="m_-59507213227259409Apple-interchange-newline">
</div>
<div><br><div>On 26. Mar 2018, at 17:43, Ignazio Cassano <<a href="mailto:ignaziocassano@gmail.com" target="_blank" rel="noreferrer">ignaziocassano@gmail.com</a>> wrote:</div><br class="m_-59507213227259409Apple-interchange-newline"><div><div dir="auto">Hi all,<div dir="auto">I read diskimage-builder  documentatio but is not clear for me how I can supply lvm configuration to the command. </div><div dir="auto">Some yaml files are supplied but diskimage seems to expect json file.</div><div dir="auto">Please, could anyone post an example? </div><div dir="auto">Regards</div><div dir="auto">Ignazio</div><div dir="auto"><br></div></div>
_______________________________________________<br>OpenStack-operators mailing list<br><a href="mailto:OpenStack-operators@lists.openstack.org" target="_blank" rel="noreferrer">OpenStack-operators@lists.openstack.org</a><br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank" rel="noreferrer">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br></div></div><br></div></div></blockquote></div>