Question:
Env:
AIX 3.2.5 also true at AIX 4.2
RISC 591
Problem:
Customer has a hard link of a directory to another
directory using this method:
link \ \
This creates a hardlink between the two directories
When the customer restores the system the hardlinks
are not restored, but the data is copied. So now the
customer has two copies of the data, where before they
did not.
Example (testcase)
Creating the hardlink directories
1. cd /tmp
2. mkdir dir
3. link dir dir1
4. cd dir
5. touch file
touch file1
touch file2
6. ls -idl dir*
2050 drwxr-xr-x 3 root system 512 Jun 24 14:58 dir
2050 drwxr-xr-x 3 root system 512 Jun 24 14:58 dir1
7. ls -dl dir*
dir:
total 0
2051 -rw-r--r-- 1 root system 0 Jun 24 14:58 file
2052 -rw-r--r-- 1 root system 0 Jun 24 14:58 file1
2053 -rw-r--r-- 1 root system 0 Jun 24 14:58 file2
dir1:
total 0
2051 -rw-r--r-- 1 root system 0 Jun 24 14:58 file
2052 -rw-r--r-- 1 root system 0 Jun 24 14:58 file1
2053 -rw-r--r-- 1 root system 0 Jun 24 14:58 file2
8. find /tmp -print | backup -ivqf /dev/rmt0
9. unlink dir1
rm -r dir
10. restore -xvqf /dev/rmt0
11. ls -ild dir*
2058 drwxr-xr-x 2 root system 512 Jun 24 15:02 dir
2062 drwxr-xr-x 2 root system 512 Jun 24 15:02 dir1
12. ls -il dir*
dir:
total 0
2059 -rw-r--r-- 1 root system 0 Jun 24 14:58 file
2060 -rw-r--r-- 1 root system 0 Jun 24 14:58 file1
2061 -rw-r--r-- 1 root system 0 Jun 24 14:58 file2
dir1:
total 0
2063 -rw-r--r-- 1 root system 0 Jun 24 14:58 file
2064 -rw-r--r-- 1 root system 0 Jun 24 14:58 file1
2065 -rw-r--r-- 1 root system 0 Jun 24 14:58 file2
This occurs on both AIX 3.2, 4.1 and 4.2.
I am not sure if the backbyname command should work in this
manner or if a user can link a directory together. Because
you cannot do a "ln" to another directory.
PROBLEM: customer has directories that are hard linked.
When he archives the linked directories using backbyname
[actually sysback] and restores the directories, they
each have their own inode instead of being linked to the
same inode.
.
Received information from developer.
Will pass on to customer that this IS working as designed.
Will recommend that he use soft links instead. If a DCR is
requested, he will need to contact 1-800-IBM-4YOU
[1-800-426-4968].
ACTION TAKEN: Infomed the customer that the backup command
is working as designed. The developer has informed me that
hard links are not supported with the backup / restore commands.
Suggestions:
1. Contact your software vendor. Customer had stated that his
software was shipped to them with the hardlinks. Maybe the
vendor does not know that this is a problem -- because mksysb
and sysback both use the backup command to create system archives.
2. Contact your marketing rep or 1-800-426-4968 to request a
design change request (DCR). The request being that the backup
and restore command support hard links.
Support Line: backup is not restoring hard links correctly ITEM: DD3261L
Dated: June 1997 Category: N/A
This HTML file was generated 99/06/24~13:30:16
Comments or suggestions?
Contact us