Visit Our UNIX and Linux User Community


Reading raw disk on Solaris


 
Thread Tools Search this Thread
Operating Systems Solaris Reading raw disk on Solaris
# 1  
Old 07-31-2007
Reading raw disk on Solaris

Hello

I wonder if someone could help me in reading a raw (non-Solaris) disk on a Solaris system...

I have an IDE HDD in my Sun Blade and would like to read it (using C). It appears on the system and with the format command shows up as c0t1d0.

I use the dd command to read the disk as such:

rhino# dd if=/dev/dsk/c0t1d0s0 bs=1 skip=0 count=1024
dd: /dev/dsk/c0t1d0s0: open: I/O error
rhino# dd if=/dev/dsk/c0t1d0s2 bs=1 skip=0 count=1024
dd: /dev/dsk/c0t1d0s2: open: I/O error

but as you can see I get an error.

How do I read a raw, unformatted, non-Solaris disk in my Solaris box?

Any ideas appreciated...
# 2  
Old 07-31-2007
try "/dev/rdsk/c0t1d0s0"?

There are two forms of disk devices, block and raw.
# 3  
Old 07-31-2007
Quote:
Originally Posted by porter
try "/dev/rdsk/c0t1d0s0"?

There are two forms of disk devices, block and raw.
Sorry forgot to say I tried that as well, and no, that doesn't work either.
# 4  
Old 07-31-2007
Try a block size (bs) that matches the drives block size. With a disk it should be multiples of 512.
# 5  
Old 07-31-2007
I haven't tried it, but the point is that it is a raw disk - i.e. FS unknown... so things such as 'blocksize' does not exist or unknown...

I just need to open the device... in a C program... like in Linux the HDD devices are /dev/sda, /dev/hda, etc...
# 6  
Old 07-31-2007
Quote:
Originally Posted by son_t
Hello

I wonder if someone could help me in reading a raw (non-Solaris) disk on a Solaris system...

I have an IDE HDD in my Sun Blade and would like to read it (using C). It appears on the system and with the format command shows up as c0t1d0.

I use the dd command to read the disk as such:

rhino# dd if=/dev/dsk/c0t1d0s0 bs=1 skip=0 count=1024
dd: /dev/dsk/c0t1d0s0: open: I/O error
rhino# dd if=/dev/dsk/c0t1d0s2 bs=1 skip=0 count=1024
dd: /dev/dsk/c0t1d0s2: open: I/O error

but as you can see I get an error.

How do I read a raw, unformatted, non-Solaris disk in my Solaris box?

Any ideas appreciated...
If you are on a sparc box and you want to read a disk you use the backup slice (s2) - this is as opposed to a raw slice.

Also you need to be root to do this.
# 7  
Old 07-31-2007
Yup (from above) doing this:

rhino# dd if=/dev/dsk/c0t1d0s0 bs=1 skip=0 count=1024
dd: /dev/dsk/c0t1d0s0: open: I/O error
rhino# dd if=/dev/dsk/c0t1d0s2 bs=1 skip=0 count=1024
dd: /dev/dsk/c0t1d0s2: open: I/O error


The same with /dev/rdsk result in the same error, and yes I am root...

Previous Thread | Next Thread
Test Your Knowledge in Computers #689
Difficulty: Medium
The HP-35, the world's first handheld scientific calculator, introduced the classical two-level RPN in 1972.
True or False?

10 More Discussions You Might Find Interesting

1. Red Hat

linux 8e vs raw disk

Hi All, Hope someone can help me with this. I have noticed that on some of the servers i am currently administering there is a difference in the setup of some of the LVM disks. Some of the disks have been created by SN disk allocated, disk partitioned using type 8e over the entire disk,... (2 Replies)
Discussion started by: Tommyk
2 Replies

2. Solaris

Persistent ownership of raw disk during reboots

Hi, I'm in process of creating oracle RAC using Solaris 10 in VirtualBox. I want to know how can I change the ownership of device e.g /dev/rdsk/c0t3d0s0 and keep it persistent during rebbots. When I enter chown grid:install /dev/rdsk/c0t3d0s0 ls -l still shows root:root. Thanks ... (2 Replies)
Discussion started by: jia786
2 Replies

3. Solaris

Convert from raw disk to solaris volume manager disk

I have a solaris 10 system configured using NetApp as its storage, and the file systems are already configured as you can see from the example below: root@moneta # df -h Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 9.8G 513M 9.3G 6% /... (4 Replies)
Discussion started by: fretagi
4 Replies

4. Solaris

Convert from raw disk to solaris volume manager disk

I have a solaris 10 system configured using NetApp as its storage, and the file systems are already configured as you can see from the example below: root@moneta # df -h Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 9.8G 513M 9.3G 6% / ... (0 Replies)
Discussion started by: fretagi
0 Replies

5. Solaris

sparc, raw splice on end of disk

I noticed we have a small splice on end of disk that is not mounted. What could that be and how do we move it few sectors? Thanks. (7 Replies)
Discussion started by: orange47
7 Replies

6. Solaris

Command to format Oracle ASM raw disk

Hi, Can any one please provide the command to format an Oracle Raw Disk in Solaris 10. I have been used the following commands: dd if=/dev/zero of=<raw disk path> Thanks ---------- Post updated at 12:20 PM ---------- Previous update was at 10:11 AM ---------- Well this didn't give... (0 Replies)
Discussion started by: Mack1982
0 Replies

7. Solaris

Mounting a Raw Disk

I am using Solaris 10. I have a raw device attached to my system which is /dev/md/rdsk/d91 I want to mount this as a disk with file system on a mount point /u05. Actually this raw device was earlier part of Oracle ASM. Now I have removed this disk from ASM, and want to use it as normal... (3 Replies)
Discussion started by: fahdmirza
3 Replies

8. Solaris

How to create new partitions in solaris,from the raw disk?

Hi all, I would like to know how to make new partitions.... I currently have allocated 60G for various slices (I have totally used 4 out of 7 available slices... I am running only solaris on my box. My plan is to have entire disk dedicated to solaris and run other OS from within... (19 Replies)
Discussion started by: wrapster
19 Replies

9. UNIX for Dummies Questions & Answers

raw disk

What do u mean by raw and cooked disk? What are the advantages of having raw disk? Thanks n regards, (1 Reply)
Discussion started by: kingsto88
1 Replies

10. UNIX for Advanced & Expert Users

copying oracle tables from raw disk

I have been tasked with archiving Oracle tables. The data is on raw devices, and possibly will span multiple logical volumes. Has anyone ever had to do this? How did you accomplish it? Any references to accomplish this would be greatly appreciated. Thanks, (2 Replies)
Discussion started by: isenhart
2 Replies

Featured Tech Videos