IN THIS ARTICLE
Outlines how to close an open SMB file on your Qumulo cluster
REQUIREMENTS
- Cluster running Qumulo Core 3.0.3 or above
- Administrator or Data Administrator Role
- Path to an open SMB file
- Command line (CLI) tools installed via API & Tools in the Web UI
PROCESS
- Determine the file number by specifying the file path of the open SMB file in the following command:
qq fs_file_get_attr --path /file1
{
"blocks": "1",
"change_time": "2020-03-02T22:21:55.402147962Z",
"child_count": 0,
"creation_time": "2020-03-02T22:21:55.402147962Z",
"datablocks": "0",
"directory_entry_hash_policy": null,
"extended_attributes": {
"archive": true,
"compressed": false,
"hidden": false,
"not_content_indexed": false,
"read_only": false,
"sparse_file": false,
"system": false,
"temporary": false
},
"file_number": "4",
"group": "513",
"group_details": {
"id_type": "LOCAL_GROUP",
"id_value": "Users"
},
"id": "4",
"major_minor_numbers": {
"major": 0,
"minor": 0
},
"metablocks": "1",
"mode": "0644",
"modification_time": "2020-03-02T22:21:55.402147962Z",
"name": "file1",
"num_links": 1,
"owner": "500",
"owner_details": {
"id_type": "LOCAL_USER",
"id_value": "admin"
},
"path": "/file1",
"size": "0",
"symlink_target_type": "FS_FILE_TYPE_UNKNOWN",
"type": "FS_FILE_TYPE_FILE"
} - Use the file number to list the SMB file handles with the following command:
qq smb_list_file_handles | jq '.file_handles[] | select(.file_number=="4")'
- Locate the file handle(s) by matching the file number and noting the location inside the handle_info in the output:
qq smb_list_file_handles |
TIP! You may have numerous matching file numbers if the SMB file is opened multiple times. Use jq or grep to filter by the file number like the example above.
jq '.file_handles[] | select(.file_number=="4")'
{
"file_number": "4",
"handle_info": {
"access_mask": [
"MS_ACCESS_GENERIC_READ"
],
"location": "2.4.2",
"num_byte_range_locks": 0,
"owner": "500",
"version": 4294967295
}
} - Close the file handle(s) by specifying the location in the following command:
qq smb_close_file_handle --location 2.4.2
RESOLUTION
You should now be able to successfully close an open SMB file on your Qumulo cluster
ADDITIONAL RESOURCES
Manage File Shares with Shared Folders MMC Snap-in
Like what you see? Share this article with your network!
Comments
0 comments