dd - imaging drives. Oh boy!


 
Thread Tools Search this Thread
Operating Systems Solaris dd - imaging drives. Oh boy!
# 1  
Old 02-17-2010
dd - imaging drives. Oh boy!

Hello,

Yes, it's me again. Running around getting this done! My current problem is I'm trying to image one drive 0 (/dev/dsk/c1t0d0s0) to drive 1 (/dev/dsk/c1t1d0s0). I know that drive1 came out of a Sun Server and it is a Sun drive. Solaris 10 recognized drive1 after the devfsadm command. The commands "dd" and "mount" both react the same.

Code:
# mount /dev/dsk/c1t1d0s0 /a
mount: I/O error
mount: Cannot mount /dev/dsk/c1t1d0s0
 
# dd if=/dev/rdsk/c1t0d0s0 bs=1024 of=/dev/rdsk/c1t1d0s0
dd: /dev/rdsk/c1t1d0s0: open: I/O error
 
I attempted to prepare a list of answers to possible questions:
 
# echo | format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@0,0
       1. c1t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@1,0
Specify disk (enter its number): Specify disk (enter its number):

# df -k | grep c1t1d0
#

 
 

AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@0,0
       1. c1t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@1,0
Specify disk (enter its number): 1
selecting c1t1d0
[disk formatted]
 
FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> format> label
Ready to label disk, continue? y
format> save
Saving new disk and partition definitions
Enter file name["./format.dat"]:
format> quit

Thank you in advance. I love the community here. Smilie

Last edited by adelsin; 02-24-2010 at 04:03 AM.. Reason: code tags, please...
# 2  
Old 02-17-2010
c1t0d0s0 isn't a drive but a slice (i.e. partition).
Have you copied the label from the source to the destination drive (prtvtoc/fmthard) ?
Why are you using dd and not ufsdump/ufsrestore if your goal is really to copy a file system as it seems ?
# 3  
Old 02-17-2010
Normally on a Sun drive slice 2 is the whole disk. Did you use the wm subcommand to make the disk writeable and mountable? What is the output from the print subcommand?
# 4  
Old 02-18-2010
One step further....

First of all, the purpose of using "dd" is to completely image the drive, directly from one to another without the use of single user mode or an interim media.

Thanks to jlliagre, I was able to make it mountable. I'm currently waiting on the dd command to finish up. It's been running for awhile. What time should I expect on an otherwise idle server?


dd stays at about .27% of use. Not too much of a variant.

Sidebar: I plan on using ufsdump/restore in the future when I have an interim media (SAN) to store the fssnap's and when there's a need for incremental backups. I heard there's a way to do it in single-user mode to do it using stdout and two commands seperated with a semicolon. Is it as simple as that?
# 5  
Old 02-18-2010
Quote:
What time should I expect on an otherwise idle server?
With a 72G disk, typically a dd of the disk in single user mode would only take 10-15 minutes.
# 6  
Old 02-18-2010
Quote:
Originally Posted by adelsin
First of all, the purpose of using "dd" is to completely image the drive, directly from one to another without the use of single user mode or an interim media.
What do you mean without single user mode ? Is the source drive mounted and in use ?
Quote:
Thanks to jlliagre, I was able to make it mountable. I'm currently waiting on the dd command to finish up. It's been running for awhile. What time should I expect on an otherwise idle server?
That obviously depends on the disk size and the i/o performance.
Quote:
dd stays at about .27% of use. Not too much of a variant.
??
Quote:
Sidebar: I plan on using ufsdump/restore in the future when I have an interim media (SAN) to store the fssnap's and when there's a need for incremental backups.
Ufsdum can do full backups.
Quote:
I heard there's a way to do it in single-user mode to do it using stdout and two commands seperated with a semicolon. Is it as simple as that?
Likely.
# 7  
Old 02-18-2010
I solved my problem. Just gave it some time.

Quote:
Quote:
Originally Posted by adelsin Image
First of all, the purpose of using "dd" is to completely image the drive, directly from one to another without the use of single user mode or an interim media.

What do you mean without single user mode ? Is the source drive mounted and in use ?
Yes. The source drive is indeed mounted and in use. As it was the acting operating system.

Quote:
Quote:
Thanks to jlliagre, I was able to make it mountable. I'm currently waiting on the dd command to finish up. It's been running for awhile. What time should I expect on an otherwise idle server?
That obviously depends on the disk size and the i/o performance.
It was about 1-2 hours on a V210 with 2Gb of RAM and 4g swap.

Quote:
Quote:
dd stays at about .27% of use. Not too much of a variant.
??
That was Total Percentage of processor consumption based on the application "top"

Quote:
Quote:
Sidebar: I plan on using ufsdump/restore in the future when I have an interim media (SAN) to store the fssnap's and when there's a need for incremental backups.
Ufsdum can do full backups.
Yes I know. But after this image, I would need only incredmental backups.


Thanks for all of your help and I hope that this assists others in the future.

-Adel
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. What is on Your Mind?

Boy, is the shell powerful.

Reading replies to questions, as an amateur, I have learnt a lot from you pros on here. The shell in any of its guises is serioulsy poweful. With so many transient and resident commands at one's disposal is there anything, non-GUI, that cannot be done inside a default shell and terminal? ... (12 Replies)
Discussion started by: wisecracker
12 Replies

2. Red Hat

Imaging solution?

Can anyone recommend an imaging solution for RedHat Linux that would allow base imaging with the ability to do incremental updates and encryption? I know Acronis has a version available, but it is rather pricey. Thanks. (0 Replies)
Discussion started by: here2learn
0 Replies

3. Shell Programming and Scripting

how floppy disks, CDs and flash drives (pen drives) are accessed in UNIX

hi how floppy disks, CDs and flash drives (pen drives) are accessed in UNIX? thanks (0 Replies)
Discussion started by: nokia1100
0 Replies

4. UNIX for Advanced & Expert Users

Unix Imaging for Redundancy

I'm trying to come up with an "imaging" type solution (a.k.a. Norton Ghost, Imagecast) with standard unix utils. I'd like to just image one of our FreeBSD servers so I can use the hot swap HD's. If one fails, I could slide in an exact duplicate HD and the server would be back up. I've tried just... (4 Replies)
Discussion started by: mstevenson
4 Replies
Login or Register to Ask a Question