|
Home > Archive > Unix administration > June 2006 > Copying filesystems on AIX (need Help)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Copying filesystems on AIX (need Help)
|
|
| kenhensleys@yahoo.com 2006-06-12, 7:26 am |
| I used to work on Solaris and usually when I have to transfer the
content of a FS to another FS,
I'm using this :
ufsdump -f - /dev/rdsk/c0t0d0s0 | ( cd /newfs; ufsrestore rf -)
Now I'm working on AIX and
I have to copy File Systems on an AIX machine,so my question is
how can I do it ?
Any suggestions should be welcome.
Ken
| |
| Dan Foster 2006-06-12, 7:26 am |
| In article <1150105537.316429.134660@u72g2000cwu.googlegroups.com>,
kenhensleys@yahoo.com <kenhensleys@yahoo.com> wrote:
> I used to work on Solaris and usually when I have to transfer the
> content of a FS to another FS, I'm using this :
>
> ufsdump -f - /dev/rdsk/c0t0d0s0 | ( cd /newfs; ufsrestore rf -)
>
> Now I'm working on AIX and I have to copy File Systems on an AIX
> machine,so my question is how can I do it ?
# cd /src-fs
# tar cpf - . | ( cd /dest-fs ; tar xpf - )
-Dan
| |
| Andreas Schulze 2006-06-12, 7:26 am |
|
kenhensleys@yahoo.com schrieb:
> I used to work on Solaris and usually when I have to transfer the
> content of a FS to another FS,
> I'm using this :
>
> ufsdump -f - /dev/rdsk/c0t0d0s0 | ( cd /newfs; ufsrestore rf -)
>
>
> Now I'm working on AIX and
> I have to copy File Systems on an AIX machine,so my question is
> how can I do it ?
> Any suggestions should be welcome.
>
> Ken
man pax and/or man backup
both programs support files even bigger than 2GB.
regards,
andreas
| |
| kenhensleys@yahoo.com 2006-06-12, 7:26 am |
| But tar is not the best way to copy files I think.
For example there are problems tarring files bigger than 2G .
Isn't there another way of copying FS?
Dan Foster wrote:
> In article <1150105537.316429.134660@u72g2000cwu.googlegroups.com>,
> kenhensleys@yahoo.com <kenhensleys@yahoo.com> wrote:
>
> # cd /src-fs
> # tar cpf - . | ( cd /dest-fs ; tar xpf - )
>
> -Dan
| |
| Jurjen Oskam 2006-06-12, 1:25 pm |
| On 2006-06-12, kenhensleys@yahoo.com <kenhensleys@yahoo.com> wrote:
> ufsdump -f - /dev/rdsk/c0t0d0s0 | ( cd /newfs; ufsrestore rf -)
>
> Now I'm working on AIX and
> I have to copy File Systems on an AIX machine,so my question is
> how can I do it ?
With the backup and restore command. You can do it exactly the same
way as you show above, just read the manpages for backup and restore
for the exact options.
One caveat though: when using JFS2 filesystems and restoring from
standard input, you might encounter a bug in restore. It'll hang,
and entering Ctrl-D will cause it to exit with an error. What happens:
"restore" reads the first few bytes of input (from stdin), determines
that this is a JFS2 filesystem, and then invokes either
/sbin/helpers/jfs2/restbyinode or /sbin/helpers/jfs2/restbyname. The
problem is that "restore" closes stdin before it invokes the helper,
so the helper blocks reading stdin (now connected to your terminal).
The workaround is simple: instead of invoking "restore" invoke the
appropriate helper directly.
--
Jurjen Oskam
Savage's Law of Expediency:
You want it bad, you'll get it bad.
| |
| Hajo Ehlers 2006-06-12, 1:25 pm |
|
kenhensleys@yahoo.com wrote:
> But tar is not the best way to copy files I think.
> For example there are problems tarring files bigger than 2G .
> Isn't there another way of copying FS?
>
man cplv
man backup ( close to ufsdump )
or do a copy with backup by file name and restore
# Striped example from the backup man page
$ cd /MyDir
$ find . -print | backup -ivqf - | ( cd Targetdir ; restore -xvqf - )
Replace the -x in restores parameter list with -T in case you would
like to see what would be copied
hth
Hajo
| |
| 0xDEADABE 2006-06-13, 1:32 am |
| kenhensleys@yahoo.com wrote:
> I used to work on Solaris and usually when I have to transfer the
> content of a FS to another FS,
> I'm using this :
>
> ufsdump -f - /dev/rdsk/c0t0d0s0 | ( cd /newfs; ufsrestore rf -)
>
>
> Now I'm working on AIX and
> I have to copy File Systems on an AIX machine,so my question is
> how can I do it ?
> Any suggestions should be welcome.
>
> Ken
>
I have been using cpio with the -p option, and it works just fine.
Example:
cd /srcdir
cpio -pvdmu /destdir
(edit /etc/filesystems to point to new file system)
umount /srcdir
mount /srcdir (now using the new file system)
This cat can be skinned 100 ways. This just happens to be my favorite,
because it is portable.
| |
| Andreas Schulze 2006-06-13, 7:31 am |
| 0xDEADABE schrieb:
> kenhensleys@yahoo.com wrote:
> I have been using cpio with the -p option, and it works just fine.
> [...]
>
afaik AIX cpio does not support files bigger than 2GB also. Furthermore
it cannot handle sparse files. Thus it might not be your first choice
with AIX.
| |
| 0xDEADABE 2006-06-14, 1:28 am |
| Andreas Schulze wrote:
> 0xDEADABE schrieb:
>
>
>
>
> afaik AIX cpio does not support files bigger than 2GB also. Furthermore
> it cannot handle sparse files. Thus it might not be your first choice
> with AIX.
>
Not being spiteful, but using the -p option is "passthru"; just copying
files from one location to another, preserving ownership and
permissions. I just copied a couple of 400GB filesystems about a month
ago with it (converting JFS to JFS2). I wasn't backing up to tape or
file, just copying from one location to another. I learned it on NCR,
and it works on Solaris, SCO (excuse the profanity), linux, the bsd's,
and AIX. Yeah, I could have done it with each OS's special way, but
cpio has always done it for me in this situation, and I have never had
problems.
| |
| kenhensleys@yahoo.com 2006-06-15, 7:26 am |
| there is someting wrong with your cpio command
it doesn't work.
0xDEADABE wrote:
> kenhensleys@yahoo.com wrote:
> I have been using cpio with the -p option, and it works just fine.
>
> Example:
>
> cd /srcdir
> cpio -pvdmu /destdir
> (edit /etc/filesystems to point to new file system)
> umount /srcdir
> mount /srcdir (now using the new file system)
>
> This cat can be skinned 100 ways. This just happens to be my favorite,
> because it is portable.
| |
| 0xDEADABE 2006-06-15, 7:26 am |
| kenhensleys@yahoo.com wrote:
> there is someting wrong with your cpio command
> it doesn't work.
>
>
>
>
> 0xDEADABE wrote:
>
>
>
I am sorry, you are right. You need to pipe the output of the "find"
command into cpio. My instructions are modified as:
cd /srcdir
find . | cpio -pvdmu /destdir
(edit /etc/filesystems to point to new file system)
umount /srcdir (Make sure nothing is using the file system, or else it
won't unmount)
mount /srcdir (was the old destdir)
cpio needs input to work, my bad.
|
|
|
|
|