question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to resize disk image to requested size (Ext4)

See original GitHub issue

Issue happens on SCALE (TrueNAS-SCALE-22.02.4), but not CORE (TrueNAS-13.0-U2). This is when running a VM migration from ESXi to OpenShift.

Maybe this is related? https://github.com/kubevirt/kubevirt/issues/6586

I haven’t tried the new VDDK version (7.0.3.2) here as I don’t think that is contributing to the issue: https://vdc-repo.vmware.com/vmwb-repository/dcr-public/b677d84a-d0a2-46ab-99bc-590c2f6281b9/d1496e6a-0687-4e13-afdd-339a11e33fab/VDDK-703c-ReleaseNotes.html


image image

image

image

SCALE

csiDriver:
  name: "org.democratic-csi.iscsi"

storageClasses:
- name: freenas-api-iscsi-csi
  defaultClass: false
  reclaimPolicy: Delete
  volumeBindingMode: Immediate
  allowVolumeExpansion: true
  parameters:
    fsType: ext4
  mountOptions: []
  secrets:
    provisioner-secret:
    controller-publish-secret:
    node-stage-secret:
    node-publish-secret:
    controller-expand-secret:


driver:
  config:
    driver: freenas-api-iscsi
    instance_id:
    httpConnection:
      protocol: http
      host: 172.16.x.x
      port: 80
      username: root
      password: ********
      allowInsecure: true
    zfs:
      datasetParentName: tank/k8s/iscsi/v
      detachedSnapshotsDatasetParentName: tank/k8s/iscsi/s
      zvolCompression: lz4
      zvolDedup: off
      zvolEnableReservation: true  # Tried false here as well
      zvolBlocksize:
    iscsi:
      targetPortal: "172.16.x.x:3260"
      targetPortals: []
      # leave empty to omit usage of -I with iscsiadm
      interface:
      namePrefix: csi-
      nameSuffix: "-cluster"
      targetGroups:
        - targetGroupPortalGroup: 1
          targetGroupInitiatorGroup: 1
          targetGroupAuthType: None
      extentInsecureTpc: true
      extentXenCompat: false
      extentDisablePhysicalBlocksize: false
      extentBlocksize: 512
      extentRpm: "SSD"
      extentAvailThreshold: 0

CORE

csiDriver:
  name: "org.democratic-csi.iscsi"

storageClasses:
- name: freenas-iscsi-csi
  defaultClass: false
  reclaimPolicy: Delete
  volumeBindingMode: Immediate
  allowVolumeExpansion: true
  parameters:
    fsType: ext4
  mountOptions: []
  secrets:
    provisioner-secret:
    controller-publish-secret:
    node-stage-secret:
    node-publish-secret:
    controller-expand-secret:


driver:
  config:
    driver: freenas-iscsi
    instance_id:
    httpConnection:
      protocol: http
      host: 172.16.x.x
      port: 80
      username: root
      password: **********
      allowInsecure: true
      apiVersion: 2
    sshConnection:
      host: 172.16.1.119
      port: 22
      username: root
      password: ***********
    zfs:
      cli:
        paths:
          zfs: /usr/local/sbin/zfs
          zpool: /usr/local/sbin/zpool
          sudo: /usr/local/bin/sudo
          chroot: /usr/sbin/chroot
      datasetParentName: tank/k8s/iscsi/v
      detachedSnapshotsDatasetParentName: tank/k8s/iscsi/s
      zvolCompression: lz4
      zvolDedup: off
      zvolEnableReservation: false
      zvolBlocksize: 16K
    iscsi:
      targetPortal: "172.16.x.x:3260"
      targetPortals: []
      # leave empty to omit usage of -I with iscsiadm
      interface:
      namePrefix: csi-
      nameSuffix: "-cluster"
      targetGroups:
        - targetGroupPortalGroup: 1
          targetGroupInitiatorGroup: 1
          targetGroupAuthType: None
      extentInsecureTpc: true
      extentXenCompat: false
      extentDisablePhysicalBlocksize: false
      extentBlocksize: 512
      extentRpm: "SSD"
      extentAvailThreshold: 0

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:42 (15 by maintainers)

github_iconTop GitHub Comments

3reactions
awelscommented, Oct 18, 2022

Yeah, excellent summary!

For configuring the driver to use 0% reserve you can try the following (helm values syntax):

driver:
  config:
    node:
      format:
        ext4:
          customOptions:
          - -m
          - 0

I would argue that this should be the default for ext4 in a containerized world, not having that set by default leads to the issue we figured out here.

1reaction
travisghansencommented, Oct 17, 2022

I think a call is in order. Shout out to my github profile email and we’ll get something arranged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importer always runs out of disk space · Issue #1078 - GitHub
So we attempt to resize the disk image to exactly that size. This fails because of variable overhead by whatever file system is...
Read more >
Unable to resize ext4 partition - Ask Ubuntu
1 Answer 1 · first increase the size of '/dev/sda4' · Move the new 'unallocated space' inside '/dev/sda4' to become adjacent to (next...
Read more >
Can't resize ext4 partition - Server Fault
I have read that cloning the HDD to the SSD should work for NTFS filesystems. But it isn't working for the ext partition....
Read more >
How to to resize an ext4 partition from the command line?
First: Increase the disk size. In ESXi this is simple, just increase the size of the virtual disk. Now you have a bigger...
Read more >
Can I expand the size of a file based disk image? - Super User
First you have to create an image file: # dd if=/dev/zero of=./binary.img bs=1M count=1000 1000+0 records in 1000+0 records out 1048576000 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found