linux-system-roles / storage

Ansible role for linux storage management
https://linux-system-roles.github.io/storage/
MIT License
99 stars 55 forks source link

Would like to add primary partition support #437

Open Geertsky opened 2 months ago

Geertsky commented 2 months ago

Hello, I would like to extend the storage role so it could create primary partitions on a disk. As blivet is being used by anaconda it is not clear to me why this is not already possible. Could somebody explain to me why this is not possible? Or better yet, explain to me how this actually already is possible! ;)

Pointers on where I would need to modify what in the storage r /ole would also be greatly appreciated.

Thanks!

Regards, Geert

Ps. I know the parted module, but blivet VS parted is an easy win for blivet to my opinion.

richm commented 2 weeks ago

@vojtechtrefny @japokorn any ideas?

vojtechtrefny commented 1 week ago

The role can currently create a single partition on the entire disk, see https://github.com/linux-system-roles/storage/issues/120 I think the main reason for this is we originally focused on the higher level storage (LVM, RAID...) and ignored everything "below" and nobody really asked for support for managing partitions (until now).

You can create "partition volume" with something like this

  roles:
    - name: linux-system-roles.storage
      storage_pools:
        - name: vda
          type: partition
          disks: vda
          volumes:
            - name: vda1
              type: partition
              fs_type: ext4

but BlivetPartitionVolume currently ignores the size passed to the volume and just creates the partition on the entire disk. So this is one thing that needs to be change, we also don't support any "advanced" options for partitions like creating extended partitions on MBR or resizing partitions etc.

But partitioning support is definitely something that can be added, as you said blivet can do it.