Skip to content

Instantly share code, notes, and snippets.

View ancorgs's full-sized avatar

Ancor Gonzalez Sosa ancorgs

  • Suse Linux Gmbh
  • Las Palmas de Gran Canaria
View GitHub Profile

The base classes

Y2Storage (yast2-storage-ng) provides the two main classes to calculate proposals (with a common base class).

Let's see the relevant information about failed proposals and so on.

# Class to calculate a storage proposal
#
# @note This is a base class. To really perform a proposal, see classes
@ancorgs
ancorgs / 00-packages-probing.md
Last active March 3, 2020 15:56
Installing packages during yast2-storage-ng probing: usability

The original problem

If YaST is used to partition/format/encrypt/whatever some storage devices but the system lacks some of the tools needed to perform the operations, YaST has always shown a dialog alerting about the situation and allowing to install the missing packages. It looks like this:

Commit pop-up

But the presence of those tools was only checked at the end of the process, when YaST needed them to create/format/encrypt new devices (in the screenshot above, YaST asked for cryptsetup because

@ancorgs
ancorgs / raspberry-proposal.md
Last active November 27, 2019 11:51
Installer's storage proposal for Raspberry Pi
  • if the target disk uses a MBR partition table
    • if the first partition in the target boot disk is an EFI partition
      • only requires to use the existing EFI partition (the bootcode will be installed there)
    • if the first partition in the target boot disk is a firmware partition
      • and there is also a suitable EFI partition in the target disk
        • requires to mount the firmware partition at /boot/vc
        • requires to use the existing EFI partition
      • and there is no suitable EFI partition in the target disk
        • requires to mount the firmware partition at /boot/vc
  • requires a new /boot/efi partition (see below)
@ancorgs
ancorgs / multipath.md
Last active August 22, 2019 15:50
Multipath and AutoYaST experiments

Facts

  • When multipath is activated in a Linux system, ALL disks in such system are grouped into multipath devices. For example, if sda is an individual disk while sdb and sdc are actually part of the same multipath, the system will contain two multipath block devices (one for sdb+sdc and another one for sda only). That's represented in the targetmap by the corresponding CT_DISK and CT_DMMULTIPATH elements. When using libstorage-ng, all those disks and multipath devices are also represented in the devicegraph.
  • With AutoYaST, multipath is only activated if start_multipath is true. The presence of a CT_DMMULTIPATH drive has no influence.
  • Important: AutoYaST in SLE12-SPX will often select the disk with bios_id=0x80 for the first drive, no matter whether such drive is CT_DISK or CT_DMMULTIPATH and no matter whether the disk is part of a multipath device. See [this code](https://github.com/yast/yast-autoinstallation/blob/c01fe86f3d508c4b7d7be28bfd8d66541e1b1fa8/src/modules/AutoinstStorage.r
@ancorgs
ancorgs / AA_suma_partitioning.md
Last active May 31, 2019 11:01
SUMA Guided Setup

This shows a preliminary idea on how the SUMA requirements could be addressed reusing a lot of code from the current partitioning proposal and from the current Guided Setup.

In the control file, we just need to add a new attribute to identify volumes that must be allocated in its own separate LVM VG. The rest of the <partitioning> section of control.xml would stay as it is now.

And then, the new wizard would reuse many of the steps already present in the current Guided Setup.

@ancorgs
ancorgs / partitioner-edit-explanations.md
Created April 29, 2019 14:06
Explanations and labels for editing a partition
@ancorgs
ancorgs / aa_select_disks.md
Last active February 13, 2019 09:11
Select Devices

Improving the "select disks" screen

See the "Improve devices selection in the Guided Setup PBI.

We basically have to answer three questions.

  1. Which information to display for each device?
  2. Which widget to use for a reasonable number of disks?
  3. Which widget to use for an insane number of disk?

Leaving aside what is correct and what is not, I have problems putting these two sentences from the chat together (from a purelly technical low-level POV).

  1. We can do any change in the WhateverImpl classes without affecting ABI compatibility "because users of library does not use Impl".

  2. A change in the public Bcache breaks ABI compatibility "for all programs linked to libstorage-ng, no matter if bcache stuff is used at all".

Why changing the Bcache class has an binary influence in the other public classes but changing WhateverImpl does not? How are they different in that regard? As I understand, the fact that WhateverImpl is non-public is a convention, not something the compiler knows.

Change 1

Instead of including the skelcd-* packages directly in the inst-sys, the inst-sys will contain a repo containing the skelcd-* packages and maybe also the licenses or any other stuff that the first steps of the installer (i.e. registration and any previous step) expect to get from libzypp.

Let's say that repo is located at /usr/share/fallback-repo

Change 2

@ancorgs
ancorgs / aa_partitioner-idea1b.md
Last active October 26, 2018 13:47
Wild idea 1 (second iteration) for Partitioner UI