How to force delete app files under .ix-apps/app_mount/[app]

My migration for nextcloud failed, so I try to uninstall it and switch back to dragonfish do the migration one more time.

Somehow using webui’s uninstall function, it did not remove the files under .ix-apps/app_mount/nextcloud.

rm: cannot remove those files, Device or resource busy,
seems they are used by the system kernel.

It’s a Dataset so you can’t delete it with rm.

Check command: zfs destroy

thank you, but the command doesn’t work, the directory “.ix-app/apps_mount/nextcloud” seems not a dataset, it cannot be delete using either “zfs destroy” or “rm”
zfs destroy give no such dataset error

What about /mnt/.ix-apps/app_mounts/nextcloud?

I’m guessing you you would have to also include the pool it’s on. So

/mnt/mypool/.ix-apps ...

No there is a hidden dataset at /mypool/ix-apps that is mounted at /mnt/.ix-apps. For example

% sudo zfs list /mnt/.ix-apps/app_mounts/dockge
NAME                                USED  AVAIL  REFER  MOUNTPOINT
virtual/ix-apps/app_mounts/dockge   396K  2.63T   104K  /mnt/.ix-apps/app_mounts/dockge

cannot open ‘/mnt/.ix-apps/app_mounts/nextcloud’: leading slash in name
cd /mnt/.ix-apps/app_mounts && zfs destroy nextcloud also not work, cannot open ‘nextcloud’: dataset does not exist

Is that a bug? Truenas did not delete the files under apps_mount after click uninstall button in webui

Potentially. Did you check Remove iX Volumes on the delete dialog?

image

Before we go any further, please grab a debug from the system and submit a bug report. Instructions here: Issue Reporting in Jira | TrueNAS Documentation Hub

Once you’ve done that (and not before), if you want to manually remove the files it looks like you’d actually have to use the hidden location of the dataset on the apps pool rather than the mount location. For example:

% sudo zfs create virtual/ix-apps/app_mounts/test 
% sudo zfs list virtual/ix-apps/app_mounts/test 
NAME                              USED  AVAIL  REFER  MOUNTPOINT
virtual/ix-apps/app_mounts/test    96K  2.63T    96K  /mnt/.ix-apps/app_mounts/test
% sudo zfs destroy virtual/ix-apps/app_mounts/test
% sudo zfs list virtual/ix-apps/app_mounts/test   
cannot open 'virtual/ix-apps/app_mounts/test': dataset does not exist

I did not check the box

Ok so no bug then, that’s to be expected