forked from ondrejbima/freenas-proxmox
-
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Modified Commands and Added Timeouts in /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm
Original:
# Remove the extent
my $remove_extent = freenas_iscsi_remove_extent($scfg, $lun->{'id'});
# Remove the link
my $remove_link = freenas_iscsi_remove_target_to_extent($scfg, $lun->{'id'});Modified:
# Remove the link first
my $remove_link = freenas_iscsi_remove_target_to_extent($scfg, $lun->{'id'});
sleep(3); # 3-second delay for cleanup
# Remove the extent
my $remove_extent = freenas_iscsi_remove_extent($scfg, $lun->{'id'});
sleep(3); # 3-second delay for system stabilizationAfter updating the plugin, restart the API and statistics services:
systemctl restart pvedaemon.service && systemctl restart pvestatd.service
-
removes target associations before storage extents
-
allows TrueNAS to complete internal operations
-
reduces race conditions during deletion
-
ensures clean removal of iSCSI components
The sleep intervals provide necessary buffer time for the FreeNAS API to process each deletion step completely before proceeding.
Metadata
Metadata
Assignees
Labels
No labels