unable to ufsrestore ufsdump due to broken pipe

Posted on 2005-05-10
Last Modified: 2013-12-27
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.
Question by:melcock
    LVL 10

    Expert Comment

    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
    LVL 20

    Expert Comment

    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
    LVL 38

    Expert Comment

    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:
    LVL 16

    Accepted Solution

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    Title # Comments Views Activity
    sed -- search an replace multiple pattern 11 43
    Solaris 10.  Nmap installation fails 2 17
    Sed question 2 25
    MarkLogic 1 24
    My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (, discussed installing the Solaris Operating S…
    I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Video by: Phil
    This video goes over how to configure and start a jail in FreeBSD.  This video is meant to supplement the article included with this course.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now