unable to ufsrestore ufsdump due to broken pipe

I have been happily been using the following script to duplicate my file systems on c0t0d0 to a spare disk c0t2d0.  This is how I orginally set-up c0t0d0.

I have set the partition map is exactly the same for c0t0d0 and c0t2d0.  Previously I tried to restore s0 to a larger partition, and ever since then I get broken pipe errors, even when ufsdumping to disk and ufsrestoring in seperate operations.

Any ideas???

# date
# newfs /dev/rdsk/c0t2d0s0
# newfs /dev/rdsk/c0t2d0s7
# mount /dev/dsk/c0t2d0s0 /mnt
# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    2248183 1671442  531778    76%    /
/proc                      0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
fd                         0       0       0     0%    /dev/fd
swap                 2093032      16 2093016     1%    /var/run
swap                 2093016       0 2093016     0%    /tmp
/dev/dsk/c0t0d0s7    35403765 2387358 32662370     7%    /export/home
/dev/dsk/c0t2d0s0    2248183       9 2203211     1%    /mnt
bash-2.05# /usr/sbin/ufsdump 0cf - / | (cd /mnt; ufsrestore rf -)
  DUMP: Date of this level 0 dump: Tue May 10 09:26:04 2005
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rdsk/c0t0d0s0 (mars8:/) to standard output.
  DUMP: Mapping (Pass I) [regular files]
  DUMP: Mapping (Pass II) [directories]
  DUMP: Writing 63 Kilobyte records
  DUMP: Estimated 3438648 blocks (1679.03MB).
  DUMP: Dumping (Pass III) [directories]
  DUMP: Broken pipe
  DUMP: The ENTIRE dump is aborted.
melcockAsked:
Who is Participating?
 
Hanno P.S.Connect With a Mentor IT Consultant and Infrastructure ArchitectCommented:
You should instruct ufsdump to read the raw-device
 cd /mnt
 ufsdump 0f - /dev/rdsk/c0t0d0s0 | ufsrestore xf -
This works with different fs-sizes as well. Running this on a "live" system, you may want to use fssnap to create a snapshot to read from:
 ufsdump 0fN - `fssnap -F ufs -o raw,bs=/tmp/scratch,unlink,maxsize=200m /dev/rdsk/c0t0d0s0` | ( cd /mnt ; ufsrestore xf - )

See fssnap_ufs(1M) for further details and examples
0
 
neteducationCommented:
i could imagine it's a problem of 2gig's limit in stdio

you could use cpio instead:

find / -depth -print | grep -v "^/mnt" | cpio -pdlmv /mnt
0
 
tfewsterCommented:
I don't understand why you're using the "c" (cartridge) option to ufsdump. Could that cause a problem?
[or the "r" (recursive) option to ufsrestore, unless it is needed to override absolute pathnames?]

You mentioned "broken pipe errors, even when ufsdumping to disk and ufsrestoring in seperate operations." - Is that on the dump or the restore? e.g.
ufsdump 0f /export/home/dumpfile /
cd /mnt
ufsrestore rf /export/home/dumpfile
0
 
yuzhCommented:
I have use:
    ufsdump 0f - fs | ( cd /mydir ; ufsrestore rf -)

for filesystem >2GB without problem.

Which version of Solaris are you using, you might need to apply the latest recommended
(at least the ufsdump/ufsrestore patch), download it from:
http://sunsolve.sun.com/pub-cgi/show.pl?target=patchpage
0
All Courses

From novice to tech pro — start learning today.