Sponsored Content
Full Discussion: rdsk vs dsk for image drive
Top Forums UNIX for Dummies Questions & Answers rdsk vs dsk for image drive Post 302069250 by Perderabo on Thursday 23rd of March 2006 03:31:58 PM
Old 03-23-2006
character driver (rdsk)
The driver has read and write entry points. The read and write system calls pass this off to the driver. The driver decides if the operation succeeds or not. If it fails, the driver can set any errno value it wants. There are standards, but some driver writers do not follow them. There are rules to follow and they can vary from driver to driver. Typically you must start a read or write on a disk sector boundary. And you must write full sectors. If you try to write a partial sector, and the driver allows it, you will probably garble the rest of the sector. Data moves directly to/from the disk to/from your program. There is no synchronization with data in the buffer cache.

block driver (dsk)
The driver has no read or write entry points. You cannot talk to the driver in a direct manner. The kernel must prepare a buffer header to pass to the driver's strategy entry point. read() and write() should strongly follow the man page. No sector boundary rules. You can write a single byte and it should work. Data must flow to/from the buffer cache and then to/from your program; and thus is in sync with any recent changes.

(Note that the "in sync" implies operations to the same device. If you mount a slice of a disk, then dd the whole disk via another special file, it won't be in sync.)

I would always use rdsk to avoid copying the data around in core. Your 9 hours vs 15 minutes is very extreme. You don't give any particulars of your situation. But it does not take 8 hours and 45 minutes to do the in-core copying of data that can be read in 15 minutes. I don't enough info to guess what happened.
 

10 More Discussions You Might Find Interesting

1. HP-UX

Image My Drive

After a month of searching I've been completely unable to find replacment 10.20 install media. Would anyone be willing to image my drive for me with a fresh install of 10.20? I'd pay for shipping etc. of course. Mine is a 712/80 Thanks in advance. (0 Replies)
Discussion started by: ErikTheHAck
0 Replies

2. UNIX for Advanced & Expert Users

Create an Ignite image on tape from Online IgniteUX image

Hi, (HP-UX 11.11) I need to create a tape image of an igniteUX image created on our igniteUX server. That is to say. I have a "Online" image of the igniteUX of the targeted system but I now need to copy it to a useable TAPE (igniteUX) image so i can build an other server from it that is not... (3 Replies)
Discussion started by: Andrek
3 Replies

3. UNIX for Advanced & Expert Users

.DSK to .IMG ?

Hi, I have a windows emulator that I am wanting to try out, but my Windows 3.1 files are split up over 6 .DSK images, and I need to convert them to an .IMG that I can actually mount on my system (so that the emulator can see it). Is there a way to do this? thanks. -patrick (0 Replies)
Discussion started by: patrick99e99
0 Replies

4. Solaris

anyone can tell me what is /dev/dsk/c3t600A0B80002FA5F50000000000000000d0s0?

Hi all, I just find some strange device (at least to me) on my Sun Blade server, CP3060, like below: bash-3.00# cd /dev/dsk bash-3.00# ls c3* c3t600A0B80002FA5F50000000000000000d0s0 c3t600A0B80002FA60C0000000000000000d0s4 c3t600A0B80002FA5F50000000000000000d0s1 ... (6 Replies)
Discussion started by: sleepy_11
6 Replies

5. Shell Programming and Scripting

Updated drive image utility

#! /bin/bash # name: drive-image.sh, disk image copy script # by: Jan Zumwalt - www.neatinfo.com # ver: Jan 4, 2009 # remarks: # -e = enable interpretation of backslash codes # -n = disable newline at end of line (i.e. user input prompt) # exit 1 = error, exit 0 = success ... (1 Reply)
Discussion started by: jwzumwalt
1 Replies

6. Filesystems, Disks and Memory

Difference DSK RDSK

COuld you please telle me the diffrence between DSK and RDSK with exemple if possible... Thanks a lot in advance. Regards. (7 Replies)
Discussion started by: guillaume35
7 Replies

7. Solaris

jumpstart Can't stat /dev/rdsk/c1t0d0s0 eror

I installed solaris 9u8 and flar image and put on my jumpstart server which is running 10u3. Then I do jumpstart with new image with same hardware. Jumpstart acts like it installs, configures, and looks generally good. However, During the boot process, it reports the following errors. The / file... (4 Replies)
Discussion started by: rushingfish
4 Replies

8. Solaris

Lun remove, stuck in /dev/dsk and /dev/rdsk

So, we removed a LUN from the SAN and the system is refusing to remove the references to it in the /dev folder. I've done the following: devfsadm -Cv powermt -q luxadm -e offline <drive path> luxadm probe All those commands failed to remove the path. The drive stills shows up as <drive... (13 Replies)
Discussion started by: DustinT
13 Replies

9. Linux

Mount reiserfs .dsk image failed: can't read superblock

I have a failed 160 GB Western Digital Netcenter NAS disk and its image after failing in .DSK format. When I connect the disk to my ubuntu machine and typed: # losetup -o 512006144 /dev/loop1 /dev/sdc # mkdir /tmp/sdc # mount -r -t reiserfs /dev/loop1 /tmp/sdc I get my folders and... (0 Replies)
Discussion started by: jalil1408
0 Replies

10. Solaris

How to make an exact image copy of a SCSI hard drive in Solaris 8 OS?

To Solaris 8 Experts, Please let me know what's the best method / procedure as well as the Solaris 8 commands for accomplishing the following tasks on a production Sun Enterprise 250 Server running Sun Solaris 8 Operating System: 1. Make an exact image/copy of the SCSI Hard Drive in the... (3 Replies)
Discussion started by: ssabet
3 Replies
cmdk(7D)							      Devices								  cmdk(7D)

NAME
cmdk - common disk driver SYNOPSIS
cmdk@target, lun : [ partition | slice ] DESCRIPTION
The cmdk device driver is a common interface to various disk devices. The driver supports magnetic fixed disks and magnetic removable disks. The block-files access the disk using the system's normal buffering mechanism and are read and written without regard to physical disk records. There is also a "raw" interface that provides for direct transmission between the disk and the user's read or write buffer. A sin- gle read or write call usually results in one I/O operation; raw I/O is therefore considerably more efficient when many bytes are transmit- ted. The names of the block files are found in /dev/dsk; the names of the raw files are found in /dev/rdsk. I/O requests to the magnetic disk must have an offset and transfer length that is a multiple of 512 bytes or the driver returns an EINVAL error. Slice 0 is normally used for the root file system on a disk, slice 1 as a paging area (for example, swap), and slice 2 for backing up the entire fdisk partition for Solaris software. Other slices may be used for usr file systems or system reserved area. Fdisk partition 0 is to access the entire disk and is generally used by the fdisk(1M) program. FILES
/dev/dsk/cndn[s|p]n block device (IDE) /dev/rdsk/cndn[s|p]n raw device (IDE) where: cn controller n dn lun n (0-7) sn UNIX system slice n (0-15) pn fdisk partition(0) /kernel/drv/cmdk 32-bit kernel module. /kernel/drv/amd64/cmdk 64-bit kernel module. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Architecture |x86 | +-----------------------------+-----------------------------+ SEE ALSO
fdisk(1M), mount(1M), lseek(2), read(2), write(2), readdir(3C), scsi(4), vfstab(4), attributes(5), dkio(7I) SunOS 5.10 9 Oct 2004 cmdk(7D)
All times are GMT -4. The time now is 04:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy