How to safely copy full filesystems with large files (10Gb files)


 
Thread Tools Search this Thread
Operating Systems Solaris How to safely copy full filesystems with large files (10Gb files)
# 1  
Old 09-27-2010
Data How to safely copy full filesystems with large files (10Gb files)

Hello everyone. Need some help copying a filesystem. The situation is this: I have an oracle DB mounted on /u01 and need to copy it to /u02. /u01 is 500 Gb and /u02 is 300 Gb. The size used on /u01 is 187 Gb. This is running on solaris 9 and both filesystems are UFS.

I have tried to do it using:
Code:
# cd /u01
# find . -depth -print | cpio -pdumv /u02

But when the command finishes I end up with 207 Gb copied on /u02!!!!, my question is... why Smilie!!!???, where did the extra 20 Gb come from???

Any ideas on why this happens and how I can safely copy from /u01 to /u02?, I have to be sure since this is a production DB.

PD: The /u01 has files that are 10 Gb large... could this be the problem?, can cpio handle large files? (I thought it could!, I've used it before to copy 2GB files without problems...)

Thanks in advance!

Last edited by Neo; 09-27-2010 at 04:04 PM.. Reason: code taggies
# 2  
Old 09-27-2010
What was the original size of /u02 ?

Are there any symbolic links in /u01 to other file systems?
# 3  
Old 09-27-2010
Any sparse files may also change size when copied(blocks not stored in the input become stored blocks full of zeroes in the output), though the content remains identical.
# 4  
Old 09-27-2010
Hi Neo.

The /u02 is a new volume and filesystem, it had nothing on it... empty.

There are some sym links on /u01... but all the sym links go from / to the same filesystem. Example:

lrwxrwxrwx 1 user dba 41 May 21 2009 /u01/ppp.txt -> /u01/prueba/ppplink.txt
# 5  
Old 09-27-2010
Like Corona says, I there might be sparse files, perhaps temporary table space?. In that case dropping your temporary table space on the target file system and recreating it may turn it back into a sparse file...

Last edited by Scrutinizer; 09-27-2010 at 04:39 PM..
# 6  
Old 09-27-2010
It may be Corona688, but... I can not lose 20 Gb just because... I'm sure there has to be other way to do it without that disk space...
# 7  
Old 09-27-2010
Quote:
Originally Posted by dragonov7
It may be Corona688, but... I can not lose 20 Gb just because... I'm sure there has to be other way to do it without that disk space...
When sparse files are copied by programs that do not take sparse files into account they get turned into dense files on the target file system and take up much more disk space...
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Safely Remove Files with Special Chars

Hey Guys, I'm swamped writing code for the forums: Could someone write a script or command line to safely delete files with special chars in filenames from a directory: Example: -rw-r--r-- 1 root root 148 Apr 30 23:00 ?xA?? -rw-r--r-- 1 root root 148... (8 Replies)
Discussion started by: Neo
8 Replies

2. Shell Programming and Scripting

Rsync - how to copy hidden folder or hidden files when using full path

Hello. I use this command : rsync -av --include=".*" --dry-run "$A_FULL_PATH_S" "$A_FULL_PATH_D"The data comes from the output of a find command. And no full source directories are in use, only some files. Source example... (2 Replies)
Discussion started by: jcdole
2 Replies

3. Red Hat

Can all files under /tmp be safely removed

I wanted to know whether all files under /tmp can be safely removed. I guess that /tmp may also have temporary files for applications currently being worked on, so at the most those applications may just shut down. I hope that my question is clear whether all files under /tmp can be safely... (5 Replies)
Discussion started by: RHCE
5 Replies

4. Shell Programming and Scripting

Copy down remote files and rename them to include the server name with full path

I need to pull down a good bit of files for another support team for an upgrade project. I have a server.list with all of the server names. I need to do two parts: FIRST: I have this example, but it does not list the server name in front of each line. #! /bin/bash for server in $(<... (10 Replies)
Discussion started by: asnatlas
10 Replies

5. Red Hat

Advice regarding filesystems handling large number of files

Hi All, I have a CentOS operating system installed. I work with really huge number of files which are not only huge in number but some of them really huge in size. Minimum number of files could be 1 million to 2 million in one directory itself. Some of the files are even several Gigabytes in... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies

6. Shell Programming and Scripting

How to safely rm/mv files/directory

Hi all, Am writing a script that does a rm/mv if a file exist, however, in one scenario, one of the variables which is supposed to a variable for a directory is undefined/blank so instead of the variable resolving to /tmp/logfile.dmp, it resolves instead to / so the rm translates to a rm /... (2 Replies)
Discussion started by: newbie_01
2 Replies

7. Shell Programming and Scripting

Divide large data files into smaller files

Hello everyone! I have 2 types of files in the following format: 1) *.fa >1234 ...some text... >2345 ...some text... >3456 ...some text... . . . . 2) *.info >1234 (7 Replies)
Discussion started by: ad23
7 Replies

8. UNIX for Dummies Questions & Answers

Finding hidden files under mounted filesystems

I have never heard of this before but someone at work here says there is a command to find files that are under currently mounted filesystems. Does anyone know what this command is and is it available on HP-UX? (3 Replies)
Discussion started by: keelba
3 Replies

9. Answers to Frequently Asked Questions

32 or 64 bit filesystems/files/OS's/CPU's

Determining if an OS is using 32 or 64 bits This may be our number one question. Sadly I have not been able to find a definitive answer for Linux. If you have a Linux solution, please post it in our Linux forum. I will edit this post to include it. 32 / 64 bit (Solaris) hp-ux ... (0 Replies)
Discussion started by: Perderabo
0 Replies
Login or Register to Ask a Question