Skip to main content

Destroy a File System

To destroy a file system, you need to access the JuiceFS Cloud Service console, find the corresponding file system, and click Delete at the bottom of the Settings tab to perform the destroy operation.

Risk warning

Before proceeding, confirm the following:

  • Irreversible operation: Destroying a file system will permanently delete all data within it and cannot be recovered.
  • Data backup: Before destroying a file system, ensure that the data in the file system has been properly backed up.
  • No business dependency: Before destroying a file system, you must ensure that no related business is still using the file system.

Destroy process

1. Unmount the file system

Before destroying a file system, ensure that all clients have unmounted the file system. If any client is still using the file system, an error message similar to the following will appear:

Prompt for unmounting the file system

2. Purge the file system

The JuiceFS Cloud Service client only allows deleting an empty file system. Therefore, before destroying the file system, you need to ensure that all data in the file system has been deleted.

The client provides a destroy command that can directly purge all data in the file system. However, before executing it, you need to use the status command to find the UUID of the file system:

juicefs status <file system name>

Get the file system UUID

Then use the destroy command to purge the file system:

juicefs destroy <file system name> <file system UUID>

Purge the file system

3. Destroy the file system

After all data in the file system has been deleted, you can click Delete in the Settings tab of the JuiceFS Cloud Service console to perform the destroy operation.

Destroy the file system

How to destroy a file system after manually deleting its object storage

JuiceFS Cloud Service adopts a data and metadata separation architecture. The data is stored in object storage, while the metadata is stored in an in-house developed metadata engine. Even if the object storage associated with a file system is manually deleted, the control panel can still see the directory structure of the file. This is because the metadata engine still retains the relevant metadata and will consider this file system as non-empty, making it impossible to destroy.

Destroy requires purging data first

Although the control panel can display the directory and file structure of the file system, this information is read from the metadata engine, and the control panel does not provide or implement metadata cleanup functionality. Therefore, if the object storage associated with a file system is manually deleted, a viable solution is to recreate a bucket with the same name on the same platform, allowing the file system to reconnect to this bucket, and then perform the destroy operation.

Recreate the bucket

Of course, if you find that the bucket name associated with the current file system is already occupied, you can create a new bucket with an available name. Then, in the Settings section shown in the image above, modify the Bucket value to the name of the newly created bucket and click Save to reconnect to this bucket.

Note

Here, you can change the bucket name, but you must ensure it remains on the same platform. For example, if the previous setting was in the Singapore region of Amazon S3, the newly created bucket must also be in the Singapore region of Amazon S3.

After re-associating the file system with the storage bucket, you can return to the normal destroy process described in the previous section of this article.