LFS-UNLINK_FOREIGN(1)

NAME
lfs-unlink_foreign - remove foreign files or directories

SYNOPSIS
lfs unlink_foreign FILE [FILE ...]

DESCRIPTION
Remove files or directories with foreign layouts (LOV/LMV) that are normally prevented from being removed using regular unlink(2) or rmdir(2) system calls. This command also works for regular files and directories.

Foreign files and directories are special Lustre objects that reference external data or metadata not stored in the Lustre filesystem. They are typically used for:

•   Symlink-like references to external storage systems

•   Integration with external data management systems

•   Placeholder objects for data stored elsewhere

Some foreign types are protected from normal removal operations to preserve references to external objects. The lfs unlink_foreign command bypasses this protection and allows removal of these objects.

OPTIONS
This command takes no options other than the file or directory paths to remove.

EXAMPLES
Remove a single foreign file:
        $ lfs unlink_foreign /mnt/lustre/foreign_file

Remove multiple foreign files and directories:
        $ lfs unlink_foreign /mnt/lustre/foreign1 /mnt/lustre/foreign_dir

NOTES
This command can also remove regular (non-foreign) files and directories, though using standard rm(1) or rmdir(1) commands is preferred for regular files.

Foreign files and directories are created using the llapi_file_create_foreign(3) and llapi_dir_create_foreign(3) library functions.

AVAILABILITY
The lfs unlink_foreign command is part of the lustre(7) filesystem package.

SEE ALSO
lfs(1), llapi_dir_create_foreign(3), llapi_file_create_foreign(3), llapi_unlink_foreign(3), rm(1), rmdir(1)