Coder Social home page Coder Social logo

ansible-bash-bigboot's People

Contributors

jordigilh avatar ygalblum avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

swapdisk

ansible-bash-bigboot's Issues

Device and partition resolution does not work for NVMe based storage

The current implementation assumes that the partition's path is always: /dev/<Device><Counter>, e.g. for device /dev/vda the partitions are /dev/vda1, /dev/vda2 etc.

However, when in some cases, e.g. NVMe, this is not the case and an additional letter is used. So, for partition of disk /dev/nvme0n1 is /dev/nvme0n1p1.

This root cause has several effects on the code.
In the Ansible role, should use:

- name: Identify the boot device parent
  ansible.builtin.command: "lsblk -spnlo name {{ _boot_device.device }}"
  changed_when: false
  register: _boot_device_deps

- name: Capture boot device details
  ansible.builtin.set_fact:
    boot_device_name: "{{ _boot_device_deps.stdout_lines | last }}"
    boot_device_original_size: "{{ _boot_device.size_total | int }}"

In the shrink.sh script

ensure_extendable_fs_type "$DEVICE_NAME""$BOOT_PARTITION_NUMBER"

In addition the BOOT_PARTITION_FLAG is not always set:

[root@steady-midge ~]# parted -m /dev/nvme0n1 print
BYT;
/dev/nvme0n1:32.2GB:nvme:512:512:msdos:NVMe Device:;
1:1049kB:500MB:499MB:ext4::;
2:500MB:32.2GB:31.7GB:::lvm;

Consider finding the boot partition based on fstab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.