Copying filesystems on AIX (need Help)
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > Copying filesystems on AIX (need Help)




Pages (2): [1] 2 »   Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Copying filesystems on AIX (need Help)  
kenhensleys@yahoo.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-12-06 12:26 PM

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






[ Post a follow-up to this message ]



    Re: Copying filesystems on AIX (need Help)  
Dan Foster


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-12-06 12:26 PM

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





[ Post a follow-up to this message ]



    Re: Copying filesystems on AIX (need Help)  
Andreas Schulze


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-12-06 12:26 PM


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






[ Post a follow-up to this message ]



    Re: Copying filesystems on AIX (need Help)  
kenhensleys@yahoo.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-12-06 12:26 PM

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






[ Post a follow-up to this message ]



    Re: Copying filesystems on AIX (need Help)  
Jurjen Oskam


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-12-06 06: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.





[ Post a follow-up to this message ]



    Re: Copying filesystems on AIX (need Help)  
Hajo Ehlers


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-12-06 06: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






[ Post a follow-up to this message ]



    Re: Copying filesystems on AIX (need Help)  
0xDEADABE


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 06: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.





[ Post a follow-up to this message ]



    Re: Copying filesystems on AIX (need Help)  
Andreas Schulze


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-13-06 12:31 PM

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.






[ Post a follow-up to this message ]



    Re: Copying filesystems on AIX (need Help)  
0xDEADABE


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-14-06 06: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.





[ Post a follow-up to this message ]



    Re: Copying filesystems on AIX (need Help)  
kenhensleys@yahoo.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-15-06 12:26 PM

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.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:14 PM.      Post New Thread    Post A Reply      
Pages (2): [1] 2 »   Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register