Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Drive_Manager attempts to format a device that does not exist #6128

Closed
bennettp123 opened this issue Feb 4, 2023 · 2 comments
Closed
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Milestone

Comments

@bennettp123
Copy link

bennettp123 commented Feb 4, 2023

Creating a bug report/issue

Required Information

  • DietPi version |
    G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=13
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH='master'
    G_GITOWNER='MichaIng'
    G_LIVE_PATCH_STATUS[0]='applied'
    G_LIVE_PATCH_STATUS[1]='not applicable'
    
  • Distro version | bullseye
  • Kernel version | Linux pihole 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
  • SBC model | Native PC (x86_64)
  • Power supply used | whatever the vhost provides 😛
  • SD card used | nope 😛 (it's a virtio volume on backed by qcow2 on xfs stored on a crucial mx500 connected using sata3)

Additional Information (if applicable)

  • Software title | DietPi-Drive_Manager (I think)
  • Was the software title installed freshly or updated/migrated? fresh install
  • Can this issue be replicated on a fresh installation of DietPi? yes
  • Bug report ID | 3e32d712-b811-4ff8-b41a-64a7d7df6718

Steps to reproduce

  1. Launch DietPi inside a virtual machine
  2. Connect a virtual disk (eg /dev/vda, or in this case, /dev/vdc)
  3. Launch dietpi-drive_manager, and format the disk using GPT, ext4

Expected behaviour

  • DietPi-Drive_Manager creates the GPT partition table
  • DietPi-Drive_Manager creates a new partition in the partition table
  • DietPi-Drive_Manager formats the new partition as ext4

Actual behaviour

  • DietPi-Drive_Manager creates the GPT partition table (as expected)
  • DietPi-Drive_Manager creates a new partition in the partition table (as expected)
  • DietPi-Drive_Manager is unable to format the partition

Extra details

  • Failing command: mkfs.ext4 -F -m 0 /dev/vdcp1
  • Exit code: 1
  • Error log:
    mke2fs 1.46.2 (28-Feb-2021)
    The file /dev/vdcp1 does not exist and no size was specified.
    
  • lsblk shows that the device name is vdc1, not vdcp1
    image

Workaround

  1. Adjust the command to mkfs.ext4 -F -m 0 /dev/vdc1
  2. Make the same adjustment to any other commands that fail (eg mount -o noatime,lazytime,rw /dev/vdcp1 /mnt/backupsmount -o noatime,lazytime,rw /dev/vdc1 /mnt/backups, pictured below)
    image
    image
  3. No need to update /etc/fstab—it uses UUID=, not /dev/vdc1, so it'll work regardless
@MichaIng MichaIng added this to the v8.14 milestone Feb 4, 2023
@MichaIng
Copy link
Owner

MichaIng commented Feb 4, 2023

Many thanks for your report.

/dev/vd[a-z][1-9], what is this for a type if drive? Never seen it, and as unknown type, the drive manager guesses partitions to be added with p1 instead of just 1. I'll add it.

EDIT: Ah, VirtIO volume/virtual disk, you wrote it.

MichaIng added a commit that referenced this issue Feb 4, 2023
- DietPi-Drive_Manager | Resolved an issue where KVM VirtIO virtual disk volumes were not handled correctly. Many thanks to @bennettp123 for reporting this issue: #6128
@MichaIng MichaIng added the Solution available 🥂 Definite solution has been done label Feb 4, 2023
@MichaIng
Copy link
Owner

MichaIng commented Feb 4, 2023

Fixed with: ee86e9c
Would be great if you tested it.

If even possible, when used as root filesystem, it will now also be expended automatically on first boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

2 participants