Skip to content

Conversation

@mrstux
Copy link

@mrstux mrstux commented Dec 22, 2025

Fixes #2776

When growing an FS volume, the remote volume was resized, but the change was not visible until the remote volume was re-activated.

Thus the filesystem was only expanded to the visible size, but since the visible size was still the old size, this would cause a quiet failure.

The first thing to do was to actually check the device size after the resize to determine if the resize had succeeded before attempting a FS resize, which should then succeed

The second part of the fix is to simply activate the volume after resizing it rather than before, which means it can succeed.

Unfortunately, this means we could no longer grow an inUse filesystem, as we must de-activate in order to re-activate.

To rectify this, iscsi refresh support was added to the TrueNAS tool, and when using version >=0.7.5, the driver can refresh the iscsi bus to pickup a size change without having to de-activate an inUse volume.

When the iscsi refresh command is not available, and the volume is not in use, the driver will atttempt to de-activate the volume before changing the size.

Fixes lxc#2776

When growing an FS volume, the remote volume was resized, but the change
was not visible until the remote volume was re-activated.

Thus the filesystem was only expanded to the visible size, but since the
visible size was still the old size, this would cause a quiet failure.

The first thing to do was to actually check the device size after the
resize to determine if the resize had succeeded before attempting a FS
resize, which should then succeed

The second part of the fix is to simply activate the volume after resizing
it rather than before, which means it can succeed.

Unfortunately, this means we could no longer grow an inUse filesystem, as we
must de-activate in order to re-activate.

To rectify this, `iscsi refresh` support was added to the TrueNAS tool,
and when using version >=0.7.5, the driver can refresh the iscsi bus to
pickup a size change without having to de-activate an inUse volume.

When the `iscsi refresh` command is not available, and the volume is not
in use, the driver will atttempt to de-activate the volume before changing
the size.

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
@mrstux mrstux requested a review from stgraber as a code owner December 22, 2025 12:18
@stgraber stgraber merged commit b728e76 into lxc:main Dec 22, 2025
55 of 56 checks passed
@mrstux mrstux deleted the se-truenas-setvolumequota-fix branch December 22, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Truenas Driver - Inconsistent Disk Size Update

2 participants