Typically, you create hard links by using clients (like NFS) that have existing commands to manipulate links. This section explains how to create a hard link in a volume by mounting the volume with NFS, then using the Link (ln) command to create a hard link. For help with syntax and options, refer to the Link Manual Page from a Linux client. At a terminal console, enter
Creating a hard link to a file does not copy the contents of the file to the new location; it simply makes a new name by which the file can be known, in addition to the file’s existing name or names. All of the names are equally real, and no one of them is preferred to the others except regarding access control and directory space quotas. For information, see Section 25.1, Understanding Hard Links.
The actual content of the file is maintained in only the original file. Users in different directories can use hard links to access and share the same file. A single user can use hard links to access a file from different directories.
The NSS volume must be upgraded to use the new metadata structure. For information, see Upgrading the NSS Media Format.
The Hard Links attribute must be enabled for the volume. For information, see Section 25.3, Enabling or Disabling the Hard Links Attribute.
Mount the volume with NFS.
To create a hard link, use the Link (ln) command from a Linux client.
At a terminal console, enter
ln /path/filename /linkpath/linkfilename
Replace /path/filename with the pathname for the original file. Replace /linkpath/linkfilename with the pathname for the hard linked filename.
For example, to link the file /tmp/timetest to /tmp/t1, enter
ln /media/nss/VOL1/timetest /media/nss/VOL1/t1
The file can now be referred to by either name. You can delete the original name or any link name, but the contents of the file are not removed until the final name is deleted.