HP StoreAll Storage User Manual

Page 211

Advertising
background image

In this instance newcontainer is the container containing the hash reference.

7.

Enter the following command to list the contents of newcontainer.

[root@bv07-07 newcontainer]# ls -l

total 4 drwxrwxrwx 3 jsmith objectapi_group 4096 Dec 7 15:49 45

In this instance 45 is the first-level directory created from the 11th to 20th least significant bits
of the 40-byte hexadecimal value that was created when the file was uploaded or created on
the share.

8.

Go to the first-level directory, named 45:

[root@bv07-07 newcontainer]# cd 45

9.

List the contents for 45 directory by entering the following command:

[root@bv07-07 45]# ls -l

total 4

drwxrwxrwx 2 jsmith objectapi_group 4096 Dec 7 15:49 3ca

In this instance, the 3ca hash reference refers to the second-level directory created from the
10 least significant bits of the 40-byte hexadecimal value that was created when the file was
uploaded or created on the share.

10. Go to the second–level directory, named 3ca:

[root@bv07-07 45]cd 3ca

11. List the contents of the 3ca directory by entering the following command:

[root@bv07-07 3ca]# ls -l

The following is displayed.

-rwx------ 1 jsmith objectapi_group 0 Dec 7 15:49

c9abd2747714446e9190da1389b1f8bc901117ca

In this instance, c9abd2747714446e9190da1389b1f8bc901117ca is the corresponding
40–byte hash reference of the object ID string.

12. To obtain the corresponding file for the hash name, enter the following command:

NOTE:

Enter the following command on one line.

getfattr -n "user.bucket_mode_key" c9abd2747

714446e9190da1389b1f8bc901117ca

In this instance, c9abd2747714446e9190da1389b1f8bc901117ca is the hash name for
the corresponding file.

The command displays the following:

#file: c9abd2747714446e9190da1389b1f8bc901117ca

user.bucket_mode_key="file1.txt"

In this instance, file1.txt is the object ID string assigned by the user when the object was
created or uploaded.

Finding the corresponding hash name from an object ID

When you upload a file or create a file in a container, a 40–byte long SHA-1 hash code value is
calculated for the object. The hash code provides a pointer to where the object is stored. When
the system stores all objects in a two-level directory structure within each container directory, it
uses the 10 least significant bits of the hash code as the second-level directory name, and the next
10 least significant bits as the first-level directory name. The object's filename in this 2-level directory
is the hexadecimal value of the entire hash code.

Finding the corresponding hash name from an object ID

211

Advertising