Bug 150112

Summary: Can't copy from Netapp .snapshot directory to normal filesystem
Product: Red Hat Enterprise Linux 3 Reporter: Mark Hoover <hooverma>
Component: coreutilsAssignee: Pete Graner <pgraner>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: laroche, mwesley, shillman
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-19 19:06:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mark Hoover 2005-03-02 16:13:54 UTC
Description of problem:
Netapp solution id: ntapcs5964 

Cause of this problem: 
If a file in a snapshot has the same inode number as the corresponding file in 
the active file system, some UNIX programs may consider the two files to be 
the same although the file content is different. Typing 'ls -lai' shows that 
the file in the .snapshot and the active file system have the same inode 
number. Errors are caused by the the version of cp and it's inability to cross 
filesystems in a single mount point. 
 

Solution:  
Snapshot files carry the same permissions and inode numbers as the original 
files, keeping the integrity of the security system intact. Inodes are data 
structures that hold information (including permissions information) about 
files on the filer. There is an inode for each file and a file is uniquely 
identified by the file system on which it resides and its inode number on that 
system. 

The inode number for a file in a snapshot is the same as the inode number for 
the corresponding file in the active file system. As a result, some programs 
on UNIX clients consider the two files to be the same. For example, if you use 
the GNU diff program to compare the two files, it does not find any 
differences between them. In some cases, if you try to restore a file from a 
snapshot, you might see the following error message: 

cp:.snapshot/xxx and xxx are identical.
 

Version-Release number of selected component (if applicable):
coreutils-4.5.3-26

How reproducible:
Occurs whenever the inodes match.

Steps to Reproduce:
1. 
cp /db01/.snapshot/hourly.0/oradata/spsrepx/sps_idx1.dbf /db01/oradata/spsrepx/
sps_idx1.dbf
  
Actual results:
cp: `/db01/.snapshot/hourly.0/oradata/spsrepx/sps_idx1.dbf' and 
`/db01/oradata/spsrepx/sps_idx1.dbf' are the same file

Expected results:
File should have copied.

Additional info:
Works under Solaris 8/9

Comment 1 Mark Hoover 2005-03-02 16:21:20 UTC
We also tried using the -f and --remove-destination cp options.

Comment 2 Tim Waugh 2005-03-07 11:26:20 UTC
What filesystem provides the snapshot?

Comment 3 Tim Waugh 2005-03-07 11:26:47 UTC
Oh, it's a Netapp.  Sorry, missed that.

Comment 7 Suzanne Hillman 2005-04-04 21:21:35 UTC
If there is any urgency for this, you would be best off going through support:

http://www.redhat.com/support
or call 800-REDHAT1

Comment 8 RHEL Program Management 2007-10-19 19:06:46 UTC
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.