- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- copy a filesystem best solution (local host or re...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2011 07:09 AM
тАО05-17-2011 07:09 AM
Re: copy a filesystem best solution (local host or remote host)
thx, i added to my checks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2011 07:16 AM
тАО05-17-2011 07:16 AM
Re: copy a filesystem best solution (local host or remote host)
are those commands ok for remote copy ?
cd /old_fs
local :
pax -r -w -pe . /new_fs
remote : ?
pax -w . | ssh server " ( cd /new_fs ; pax -r -pe )"
local :
vxdump 0f - /old_fs | (cd /new_fs ; vxrestore xf -)
remote : ?
vxdump 0f - /old_fs | ssh server "(cd /new_fs ; vxrestore xf -) "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2011 07:30 AM
тАО05-17-2011 07:30 AM
Re: copy a filesystem best solution (local host or remote host)
vxvm with diskgroup split and join, thin provisioning luns and smartmove functionality, should beat the dd time easily.
and cost shouldnt be an issue as the tests were done on a xp10k. ;)
Greetz,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2011 11:27 AM
тАО05-17-2011 11:27 AM
Re: copy a filesystem best solution (local host or remote host)
-or-
cp -p -r /source /dest
-then-
df -i /source /dest
The df -k command is just like bdf - you get a report in bytes utilized.
When you write a script counting files and sub directories you are in essence counting inodes. So use the df -i command which does the counting for you and verify success when the /source inode total = the /dest inode total.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2011 12:51 AM
тАО05-18-2011 12:51 AM
Re: copy a filesystem best solution (local host or remote host)
first command doesn't work,
second comand point out errors, but works ....
cd /old_fs
/usr/sbin/vxdump -0f - /old_fs | ssh host '( cd /new_fs ; /usr/sbin/vxrestore -xf - )'
vxfs vxdump: Date of this level 0 dump: Wed May 18 10:42:49 2011
vxfs vxdump: Date of last level 0 dump: the epoch
Dumping /dev/vgfs/rold_fs to stdout
vxfs vxdump: mapping (Pass I) [regular files]
UX:vxfs vxrestore: ERROR: V-3-20068: cannot open /dev/tty: No such device or address
vxfs vxdump: mapping (Pass II) [directories]
vxfs vxdump: estimated 1948264 blocks (951.30MB) on 6.33 tape(s).
cd /old_fs
/usr/sbin/vxdump -0 -f - -s 1000000 -b 16 /old_fs | ssh host '(cd /new_fs; /usr/sbin/vxrestore -rf -) '
UX:vxfs vxrestore: ERROR: V-3-20068: cannot open /dev/tty: No such device or address
vxfs vxdump: Date of this level 0 dump: Wed May 18 10:45:29 2011
vxfs vxdump: Date of last level 0 dump: the epoch
Dumping o stdout
vxfs vxdump: mapping (Pass I) [regular files]
vxfs vxdump: mapping (Pass II) [directories]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2011 07:33 AM
тАО05-18-2011 07:33 AM
Re: copy a filesystem best solution (local host or remote host)
@ OK - The count of files and subdirs looks OK - Still, just do a df -i.
1) i got an input : is md5sum a way to check two filesystems ?
i tested it and it seems ok:
/usr/bin/md5sum /old_fs
b0292b7e9f9439d25be786f99b22587d /old_fs
/usr/bin/md5sum /io_dst_test
b0292b7e9f9439d25be786f99b22587d /new_fs
when i made a change, the fingerprint changes !
2) when i want to log for example "cpio" output in another logfile in a shell script, this is the only way ?
exec 3>> /tmp/logfile
find . ! -path ./lost+found -depth -print | cpio -padlmuv 1>&3 2>&3 >&3
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2011 05:00 PM
тАО05-18-2011 05:00 PM
Re: copy a filesystem best solution (local host or remote host)
> i tested it and it seems ok:
> /usr/bin/md5sum /old_fs
b0292b7e9f9439d25be786f99b22587d /old_fs
> /usr/bin/md5sum /io_dst_test
b0292b7e9f9439d25be786f99b22587d /new_fs
> when i made a change, the fingerprint changes !
What you are doing is creating a unique number (a checksum) from the information in the directory. The directory has a list of pointers to inodes and a set of names. Add, delete or change a file in the old_fs directory and the checksum will change. But add, delete or change a file in a subdirectory (/old_fs/testing direcory) and the top level directory (/old_fs) is the same.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2011 03:20 AM
тАО05-19-2011 03:20 AM
Re: copy a filesystem best solution (local host or remote host)
There seems to be a gap in you knowledge about inodes; there are always 4 - 0, 1, 2,and a pointer to the disk address. 0, 1 and 2 are also known as STDIN, STDOUT and STDERR.
When you do a :
exec 3 > /tmp/file
You are over riding the OS and manually assigning STDOUT. When you want to do this I'm sure its fine but also unnecessary and confusing to the next person who comes along and maintains your work after you leave.
The standard in the industry is STDOUT = 1. For example, I'm sure you've seen this:
cat file > logfile 2>%1
What does this mean?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2011 10:30 AM
тАО05-19-2011 10:30 AM
Re: copy a filesystem best solution (local host or remote host)
Did you mean 2>&1 ?
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2011 04:56 PM
тАО05-19-2011 04:56 PM
Re: copy a filesystem best solution (local host or remote host)
Yes, thanks!