* Low-level reformat with different sector size: ?
@ 2007-06-29 15:34 Matthias Urlichs
2007-06-29 15:50 ` James Bottomley
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Matthias Urlichs @ 2007-06-29 15:34 UTC (permalink / raw)
To: linux-scsi
Hello,
Yesterday I managed to buy a couple of SCA disks with a sector size of ...
*drumroll* ... 524.
What's the easiest way to re-format these to use 512 bytes?
Preferably without screwing up anything else on these things?
I tried sformat, which reported some rather broken
data:
# sformat
sformat SCSI format/analysis/repair utilities
Release 3.4, Copyright J. Schilling
scsibus0:
0,0,0 0) *
0,1,0 1) *
0,2,0 2) 'S330L !' 'C0
P' '' Disk
0,3,0 3) *
0,4,0 4) 'S330L !' 'C0' 'P?' Disk
0,5,0 5) 'S330L !' 'C0`P# ' '?' Disk
0,6,0 6) *
0,7,0 7) *
Select target -1 (2 - 5)/<cr>:2
scsibus0 target 2:
0,2,0 0) 'S330L !' 'C0
P' '' Disk
0,2,1 1) *
0,2,2 2) *
0,2,3 3) *
0,2,4 4) *
0,2,5 5) *
0,2,6 6) *
0,2,7 7) *
Select lun -1 (0 - 0)/<cr>:0
scsibus0 target 2 lun 0
Device type : Disk
Version : 7
Response Format: 1
Vendor_info : 'S330L !'
Identifikation : 'C0
P'
Revision : ''
Device seems to be: Generic CCS Disk.
sformat: PANIC Sectorsize.
#
... Oops?
Kernel: 2.6.22 (Ubuntu development)
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
- -
I have seen the Great Pretender and he is not what he seems.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Low-level reformat with different sector size: ?
2007-06-29 15:34 Low-level reformat with different sector size: ? Matthias Urlichs
@ 2007-06-29 15:50 ` James Bottomley
2007-06-30 2:04 ` Douglas Gilbert
2007-06-30 1:47 ` Douglas Gilbert
2007-06-30 1:50 ` Douglas Gilbert
2 siblings, 1 reply; 6+ messages in thread
From: James Bottomley @ 2007-06-29 15:50 UTC (permalink / raw)
To: Matthias Urlichs; +Cc: linux-scsi
On Fri, 2007-06-29 at 15:34 +0000, Matthias Urlichs wrote:
> Yesterday I managed to buy a couple of SCA disks with a sector size of ...
> *drumroll* ... 524.
>
> What's the easiest way to re-format these to use 512 bytes?
> Preferably without screwing up anything else on these things?
We use this program go reformat 520 sector size disks back to 512:
http://parisc-linux.org/~jejb/blk512-linux.c
It should work for your device as well. Beware it requires a complete
low level format to achieve this, which can take a very long time.
James
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Low-level reformat with different sector size: ?
2007-06-29 15:34 Low-level reformat with different sector size: ? Matthias Urlichs
2007-06-29 15:50 ` James Bottomley
@ 2007-06-30 1:47 ` Douglas Gilbert
2007-06-30 1:50 ` Douglas Gilbert
2 siblings, 0 replies; 6+ messages in thread
From: Douglas Gilbert @ 2007-06-30 1:47 UTC (permalink / raw)
To: Matthias Urlichs; +Cc: linux-scsi
Matthias Urlichs wrote:
> Hello,
>
> Yesterday I managed to buy a couple of SCA disks with a sector size of ...
> *drumroll* ... 524.
>
> What's the easiest way to re-format these to use 512 bytes?
> Preferably without screwing up anything else on these things?
>
> I tried sformat, which reported some rather broken
> data:
>
> # sformat
> sformat SCSI format/analysis/repair utilities
> Release 3.4, Copyright J. Schilling
>
> scsibus0:
> 0,0,0 0) *
> 0,1,0 1) *
> 0,2,0 2) 'S330L !' 'C0
> P' '' Disk
> 0,3,0 3) *
> 0,4,0 4) 'S330L !' 'C0' 'P?' Disk
> 0,5,0 5) 'S330L !' 'C0`P# ' '?' Disk
> 0,6,0 6) *
> 0,7,0 7) *
> Select target -1 (2 - 5)/<cr>:2
> scsibus0 target 2:
> 0,2,0 0) 'S330L !' 'C0
> P' '' Disk
> 0,2,1 1) *
> 0,2,2 2) *
> 0,2,3 3) *
> 0,2,4 4) *
> 0,2,5 5) *
> 0,2,6 6) *
> 0,2,7 7) *
> Select lun -1 (0 - 0)/<cr>:0
> scsibus0 target 2 lun 0
> Device type : Disk
> Version : 7
> Response Format: 1
> Vendor_info : 'S330L !'
> Identifikation : 'C0
> P'
> Revision : ''
> Device seems to be: Generic CCS Disk.
> sformat: PANIC Sectorsize.
> #
>
> ... Oops?
>
> Kernel: 2.6.22 (Ubuntu development)
Matthias,
Have a look at sg_format in the sg3_utils package.
Assuming you want to reformat /dev/sdc to 512 byte sector
size the you could use:
sg_format --format --size=512 /dev/sdc
See sg_format's man page for more information.
Doug Gilbert
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Low-level reformat with different sector size: ?
2007-06-29 15:34 Low-level reformat with different sector size: ? Matthias Urlichs
2007-06-29 15:50 ` James Bottomley
2007-06-30 1:47 ` Douglas Gilbert
@ 2007-06-30 1:50 ` Douglas Gilbert
2007-06-30 15:30 ` Matthias Urlichs
2 siblings, 1 reply; 6+ messages in thread
From: Douglas Gilbert @ 2007-06-30 1:50 UTC (permalink / raw)
To: Matthias Urlichs; +Cc: linux-scsi
Matthias Urlichs wrote:
> Hello,
>
> Yesterday I managed to buy a couple of SCA disks with a sector size of ...
> *drumroll* ... 524.
>
> What's the easiest way to re-format these to use 512 bytes?
> Preferably without screwing up anything else on these things?
Umm, I hope you don't consider losing all the previous data
on the disks when a re-format is performed as "screwing up"?
Doug Gilbert
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Low-level reformat with different sector size: ?
2007-06-29 15:50 ` James Bottomley
@ 2007-06-30 2:04 ` Douglas Gilbert
0 siblings, 0 replies; 6+ messages in thread
From: Douglas Gilbert @ 2007-06-30 2:04 UTC (permalink / raw)
To: James Bottomley; +Cc: Matthias Urlichs, linux-scsi
James Bottomley wrote:
> On Fri, 2007-06-29 at 15:34 +0000, Matthias Urlichs wrote:
>> Yesterday I managed to buy a couple of SCA disks with a sector size of ...
>> *drumroll* ... 524.
>>
>> What's the easiest way to re-format these to use 512 bytes?
>> Preferably without screwing up anything else on these things?
>
> We use this program go reformat 520 sector size disks back to 512:
>
> http://parisc-linux.org/~jejb/blk512-linux.c
>
> It should work for your device as well. Beware it requires a complete
> low level format to achieve this, which can take a very long time.
I might mention at this point that sg_format is derived
from blk512-linux.c . Both should be able to format recent
SCSI disks (e.g. manufactured in this millennium). sformat
is an older program. All of them invoke the SCSI FORMAT
command. If the SCSI FORMAT command is examined in SCSI-2,
SBC, SBC-2 and SBC-3 then it can be seen as quite complex.
Over the 15 year period spanned by those standards (SBC-3 is
still a draft) it has become more complex and changed
somewhat.
The first terabyte SCSI disk was announced this week. I
wonder how long it takes to format.
Doug Gilbert
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Low-level reformat with different sector size: ?
2007-06-30 1:50 ` Douglas Gilbert
@ 2007-06-30 15:30 ` Matthias Urlichs
0 siblings, 0 replies; 6+ messages in thread
From: Matthias Urlichs @ 2007-06-30 15:30 UTC (permalink / raw)
To: linux-scsi
On Fri, 29 Jun 2007 21:50:29 -0400, Douglas Gilbert wrote:
> Umm, I hope you don't consider losing all the previous data
> on the disks when a re-format is performed as "screwing up"?
*Giggle* As I just got the disk, have no idea what's on it, and can't read
it in any case (OK, so I could use /dev/sg*...), that would be rather
silly.
No, I consider "reformat it in such a way that the disk now reports 512
bytes instead of 70 GBytes, total" or "brick it" to be screw-ups. Anything
else I can live with. If nothing else, German consumer code happily
gives me 14-day return rights, so if nothing else works I can send the
things back.
Right now, though, it looks like there's something else broken.
*This* does not look normal at all:
# sg_format --format --size=512 --count=-1 --verbose /dev/sg1
inquiry cdb: 12 00 00 00 24 00
inquiry: requested 36 bytes but got 18 bytes
S330L ! C0 peripheral_type: disk [0x0]
PROTECT=1
<< supports 'protection information'>>
mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
mode sense (10): requested 252 bytes but got 14 bytes
Mode sense (block descriptor) data, prior to changes:
Number of blocks=2177429504 [0x81c8f000]
Block size=2615479 [0x27e8b7]
Need to perform MODE SELECT (to change number or blocks or block length)
but (single) block descriptor not found in earlier MODE SENSE
#
This happens on all three disks, so it seems that either the OS or the
controller are screwing things up royally. :-/
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
- -
Accuracy:
Exploded concept. Foolish, Platonic notion that we can get our facts
straight.
-- Fashionable Dictionary (www.butterfliesandwheels.com)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-06-30 15:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-29 15:34 Low-level reformat with different sector size: ? Matthias Urlichs
2007-06-29 15:50 ` James Bottomley
2007-06-30 2:04 ` Douglas Gilbert
2007-06-30 1:47 ` Douglas Gilbert
2007-06-30 1:50 ` Douglas Gilbert
2007-06-30 15:30 ` Matthias Urlichs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).