A computer components & hardware forum. HardwareBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » HardwareBanter forum » General Hardware & Peripherals » Storage & Hardrives
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Solaris only supports raw partitions vs. raw disk ?



 
 
Thread Tools Display Modes
  #1  
Old November 19th 04, 04:57 PM
Arne Joris
external usenet poster
 
Posts: n/a
Default Solaris only supports raw partitions vs. raw disk ?

I am looking for a way to use an entire scsi disk as a raw device.
Solaris 8 claims to support raw devices, but really it only seems to
support raw partitions : block 0 (the first 512 bytes) is reserved for
the disk label containing the partition table; there are no devices
corresponding to disks, only partitions.

Yes you can make a partition starting at block 0, but writing to block 0
causes all kinds of havoc since Solaris tries to read it and interpret
it as the partition table.

Is there a way to access an entire scsi disk without having a label
on it ? Could I "encapsulate" my disk by writing it's label in memory or
on another disk, so that I can still use my disk's block 0 ?

Thanks !

Arne Joris
  #2  
Old November 20th 04, 01:05 AM
Don Khan
external usenet poster
 
Posts: n/a
Default

"Arne Joris" wrote in message
news:ZBpnd.276162$nl.155347@pd7tw3no...
I am looking for a way to use an entire scsi disk as a raw device.
Solaris 8 claims to support raw devices, but really it only seems to
support raw partitions : block 0 (the first 512 bytes) is reserved for
the disk label containing the partition table; there are no devices
corresponding to disks, only partitions.

Yes you can make a partition starting at block 0, but writing to block 0
causes all kinds of havoc since Solaris tries to read it and interpret
it as the partition table.

Is there a way to access an entire scsi disk without having a label
on it ? Could I "encapsulate" my disk by writing it's label in memory or
on another disk, so that I can still use my disk's block 0 ?

Thanks !

Arne Joris



You do not have to have a disk label. If your application is writing to the
entire disk then it is assumed that your application knows what it is doing.
If you are using the entire disk then you do not need more than one
partition. Normally the s2 slice covers the entire partition. Writing over
block 0 is not a problem if your application is allowed to use the entire
disk.

You could also make a partition at block 1 to the end of the disk and use
that. Will one block really make a difference in your situation? Ideally
create the partition from cylinder 1 as some disks and arrays optimize IO on
cylinder boundaries.


  #3  
Old November 20th 04, 01:17 PM
Maxim S. Shatskih
external usenet poster
 
Posts: n/a
Default

create the partition from cylinder 1 as some disks and arrays optimize IO on
cylinder boundaries.


From what I know, the notion of "cylinder" is long ago fake for at least 10
years now.

Windows still carries this for backward compat with DOS legacy, but I'm
surprised that Solaris, being absolutely free from DOS legacy, still carries
this notion.

More so. Both Windows (2000) and Linux (kernel 2.2) - even these older
versions - work fine with deliberately wrong CHS values in the partition table.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation

http://www.storagecraft.com


  #4  
Old November 21st 04, 04:59 AM
Don Khan
external usenet poster
 
Posts: n/a
Default

"Maxim S. Shatskih" wrote in message
...
create the partition from cylinder 1 as some disks and arrays optimize IO
on
cylinder boundaries.


From what I know, the notion of "cylinder" is long ago fake for at least
10
years now.

Windows still carries this for backward compat with DOS legacy, but I'm
surprised that Solaris, being absolutely free from DOS legacy, still
carries
this notion.

More so. Both Windows (2000) and Linux (kernel 2.2) - even these older
versions - work fine with deliberately wrong CHS values in the partition
table.


I am not talking about the host IO pattern or the host's view of the disk
(CHS values). Some arrays, even enterprise arrays do their internal IO on
certain cylinder/track boundaries. This is a problem no matter what the
operating system. Some arrays tend to optimize IO if the IO is done on
boudaries of its internal track/cylinder sizes. The operating systems will
still work fine but performace can be impacted.


  #5  
Old November 22nd 04, 05:14 PM
Arne Joris
external usenet poster
 
Posts: n/a
Default

Don Khan wrote:
You do not have to have a disk label. If your application is writing to the
entire disk then it is assumed that your application knows what it is doing.
If you are using the entire disk then you do not need more than one
partition. Normally the s2 slice covers the entire partition. Writing over
block 0 is not a problem if your application is allowed to use the entire
disk.


No if you write to block 0, you over-write the label and the device
refuses to do any more I/O :

sun189-bash-2.03# dd if=/dev/zero of=/dev/rdsk/c2t2d0s2 seek=0 count=1
bs=512
1+0 records in
1+0 records out

sun189-bash-2.03# dd if=/dev/zero of=/dev/rdsk/c2t2d0s2 seek=0 count=1
bs=512
dd: /dev/rdsk/c2t2d0s2: open: I/O erroro

dmesg
....
Nov 22 10:08:36 sun189 scsi: [ID 107833 kern.warning] WARNING:
/pci@1f,2000/QLGC,qla@1/sd@2,0 (sd32):
Nov 22 10:08:36 sun189 corrupt label - wrong magic number
sun189-bash-2.03#

You could also make a partition at block 1 to the end of the disk and use
that. Will one block really make a difference in your situation? Ideally
create the partition from cylinder 1 as some disks and arrays optimize IO on
cylinder boundaries.


Yes that works ofcourse. But I'm trying to manipulate raw disk blocks
here and yes, I need to write to block 0. Imagine using Solaris to dump
a raw disk image (NOT solaris) onto a set of disks and then using normal
read and write commands from a user program to modify the image.

Arne Joris
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk Management - New Partition option Greyed Out Tapas Das Dell Computers 3 March 23rd 05 03:58 PM
my new mobo o/c's great rockerrock Overclocking AMD Processors 9 June 30th 04 08:17 PM
RAID card for my PC?? TANKIE General 5 May 22nd 04 01:09 AM
My machine has been ATI born again!! Dunny Rummy Ati Videocards 21 November 28th 03 04:13 PM
Problem booting from SATA disk with GA-8KNXP motherboard (like many others) Eric Janvier Gigabyte Motherboards 9 November 22nd 03 01:56 AM


All times are GMT +1. The time now is 06:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.