NextcloudPi - Unable to Format 2nd USB Drive

NextcloudPi version (eg, 29.0.5): v1.54.2
Operating system and version (eg, Ubuntu 29.04): Debian GNU/Linux 11. 5.15.61-v8+ (aarch64)
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.59
PHP version (eg, 8.3): 8.1.27

Hi all,

I’m having the following error while formatting the 2nd USB drive after moving data to 1st USB drive (/media/mainDrive). Even after I selected "Remove data dir (MAY BREAK YOUR SYSTEM), the same error below happened.

"ERROR: Data directory is on USB drive (or can't be determined) and removal of data directory was not explicitly allowed." \
      "Please move the data directory to SD before formatting the USB drive." \
      "If you are certain that the data directory is not on this USB drive, check 'Allow data directory removal'." \
      "Exiting..."

Steps to replicate it:

  1. Disconnect 1st USB drive from Pi
  2. Connect 2nd USB drive to Pi
  3. Run nc-format-usb
  4. The error above happened

I could only format the 2nd USB drive when I set the data dir back to the SD card, but I would like to avoid doing such every time when I want to format a USB drive.

Does anyone have this problem? Are there any additional settings needed to be done before formatting a USB drive where the data has been exported to a USB drive initially?

Appreciate the help.