Re: How to partition magneto-optical disks with sectors of 2048 bytes?

2011-03-07 Thread Jens A. Griepentrog
On 03/06/2011 05:10 PM, Joachim Schipper wrote:
 On Sun, Mar 06, 2011 at 04:14:33PM +0100, Jens A. Griepentrog wrote:
 On 03/06/11 02:25, Matthew Dempsky wrote:
 [...] Jens A. Griepentrog griep...@wias-berlin.de wrote:
 What went wrong? The procedure works for usual hard disks and memory
 sticks with sectors of 512 bytes. I would be grateful for any hint.
 (As a final aim I would like to have some bootable magneto-optical
 disk with root partition a: and two more partitions d: and e: ...)

 When you say The procedure works for usual hard disks and memory
 sticks [...], do you mean it works on this same system when attached
 to the same ahc(4) controller? E.g., if you replace this sd0 with a
 standard SCSI disk, will the same set of fdisk/disklabel/newfs
 commands work correctly?

 Thanks, Matthew, I just checked this again with some 16-year old SCSI
 disk to give a rigorous proof of my above statement:

 ...
 ahc0 at pci6 dev 2 function 0 vendor Adaptec,
 unknown product 0x0082 rev 0x02: apic 7 int 21 (irq 3)
 scsibus0 at ahc0: 8 targets, initiator 7
 sd0 at scsibus0 targ 4 lun 0: QUANTUM, FIREBALL1080S, 1Q09
 SCSI2 0/direct fixed
 sd0: 1042MB, 512 bytes/sec, 2134305 sec total
 ...

 a e
 offset: [64]
 ^^

 That was 32 in your earlier example. Did you try some
 appropriately-large offsets? (AFAIK, that shouldn't help, but maybe the
 first sectors are magical or maybe the disk barfs on unaligned
 access?)

 Joachim


Thanks, Joachim, I tried different larger multiples of 32
as offsets but it does not help.

Jens

[demime 1.01d removed an attachment of type APPLICATION/DEFANGED which had a 
name of griepent.18083DEFANGED-vcf]



Re: How to partition magneto-optical disks with sectors of 2048 bytes?

2011-03-06 Thread Jens A. Griepentrog

 On 03/06/11 02:25, Matthew Dempsky wrote:

On Sat, Mar 5, 2011 at 7:20 AM, Jens A. Griepentrog
griep...@wias-berlin.de wrote:

What went wrong? The procedure works for usual hard disks and memory
sticks with sectors of 512 bytes. I would be grateful for any hint.
(As a final aim I would like to have some bootable magneto-optical
disk with root partition a: and two more partitions d: and e: ...)


When you say The procedure works for usual hard disks and memory
sticks [...], do you mean it works on this same system when attached
to the same ahc(4) controller? E.g., if you replace this sd0 with a
standard SCSI disk, will the same set of fdisk/disklabel/newfs
commands work correctly?


Thanks, Matthew, I just checked this again with some 16-year old SCSI
disk to give a rigorous proof of my above statement:

...
ahc0 at pci6 dev 2 function 0 vendor Adaptec,
unknown product 0x0082 rev 0x02: apic 7 int 21 (irq 3)
scsibus0 at ahc0: 8 targets, initiator 7
sd0 at scsibus0 targ 4 lun 0: QUANTUM, FIREBALL1080S, 1Q09
SCSI2 0/direct fixed
sd0: 1042MB, 512 bytes/sec, 2134305 sec total
...

Here, the same set of commands works successfully:

# fdisk sd0
Disk: sd0   geometry: 132/255/63 [2134305 Sectors]
Offset: 0   Signature: 0xAA55
Starting Ending LBA Info:
 #: id  C   H   S -  C   H   S [   start:size ]
---
 0: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
 1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
 2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
 3: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
# fdisk -i sd0
Do you wish to write new MBR and partition table? [n] y
Writing MBR at offset 0.
# fdisk sd0
Disk: sd0   geometry: 132/255/63 [2134305 Sectors]
Offset: 0   Signature: 0xAA55
Starting Ending LBA Info:
 #: id  C   H   S -  C   H   S [   start:size ]
---
 0: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
 1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
 2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
*3: A6  0   1   2 -131 254  63 [  64: 2120516 ] OpenBSD
# disklabel -E sd0
Label editor (enter '?' for help at any prompt)
 p
OpenBSD area: 64-2120580; size: 2120516; free: 2120516
#size   offset  fstype [fsize bsize  cpg]
  c:  21343050  unused
 a e
offset: [64]
size: [2120516]
FS type: [4.2BSD]
 w
 q
No label changes.
# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: FIREBALL1080S
uid: 6e33f59301aa59ca
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 132
total sectors: 2134305
boundstart: 64
boundend: 2120580
drivedata: 0

16 partitions:
#size   offset  fstype [fsize bsize  cpg]
  c:  21343050  unused
  e:  2120512   64  4.2BSD   2048 163841
# newfs /dev/rsd0e
/dev/rsd0e: 1035.4MB in 2120512 sectors of 512 bytes
6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
super-block backups (for fsck -b #) at:
 32, 414688, 829344, 1244000, 1658656, 2073312,
# mount /dev/sd0e /mnt
# mount
/dev/sd1a on / type ffs (local)
/dev/sd1d on /home type ffs (local, nodev, nosuid, softdep)
mfs:12008 on /tmp type mfs (asynchronous, local, nodev, nosuid, 
size=2097152 512-blocks)

/dev/sd2d on /usr type ffs (local, nodev, softdep)
/dev/sd2e on /var type ffs (local, nodev, nosuid, softdep)
/dev/sd0e on /mnt type ffs (local)
# umount /mnt

By the way, I also tried to add the sector-size option -S 2048
to the newfs command on the MO disk but without any success.

Jens



Re: How to partition magneto-optical disks with sectors of 2048 bytes?

2011-03-06 Thread Joachim Schipper
On Sun, Mar 06, 2011 at 04:14:33PM +0100, Jens A. Griepentrog wrote:
  On 03/06/11 02:25, Matthew Dempsky wrote:
  [...] Jens A. Griepentrog griep...@wias-berlin.de wrote:
 What went wrong? The procedure works for usual hard disks and memory
 sticks with sectors of 512 bytes. I would be grateful for any hint.
 (As a final aim I would like to have some bootable magneto-optical
 disk with root partition a: and two more partitions d: and e: ...)
 
 When you say The procedure works for usual hard disks and memory
 sticks [...], do you mean it works on this same system when attached
 to the same ahc(4) controller? E.g., if you replace this sd0 with a
 standard SCSI disk, will the same set of fdisk/disklabel/newfs
 commands work correctly?
 
 Thanks, Matthew, I just checked this again with some 16-year old SCSI
 disk to give a rigorous proof of my above statement:
 
 ...
 ahc0 at pci6 dev 2 function 0 vendor Adaptec,
 unknown product 0x0082 rev 0x02: apic 7 int 21 (irq 3)
 scsibus0 at ahc0: 8 targets, initiator 7
 sd0 at scsibus0 targ 4 lun 0: QUANTUM, FIREBALL1080S, 1Q09
 SCSI2 0/direct fixed
 sd0: 1042MB, 512 bytes/sec, 2134305 sec total
 ...

  a e
 offset: [64]
   ^^

That was 32 in your earlier example. Did you try some
appropriately-large offsets? (AFAIK, that shouldn't help, but maybe the
first sectors are magical or maybe the disk barfs on unaligned
access?)

Joachim



How to partition magneto-optical disks with sectors of 2048 bytes?

2011-03-05 Thread Jens A. Griepentrog
  Dear OpenBSD community,

I have got some SCSI magneto-optical drive together with a new
2.3GB removable MO disk. My system has configured it as follows:

OpenBSD 4.8 (GENERIC.MP) #335: Mon Aug 16 09:09:20 MDT 2010
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
...
sd0 at scsibus0 targ 3 lun 0: FUJITSU, MCJ3230SS, 0010
SCSI2 0/direct removable
sd0: 2076MB, 2048 bytes/sec, 1063146 sec total
...

(You will find a full dmesg.boot listing attached to this message.)

In any case I want to use the whole disk for OpenBSD FFS.
I could install some raw filesystem

# newfs -N /dev/rsd0c
/dev/rsd0c: 2076.5MB in 4252584 sectors of 2048 bytes
11 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
super-block backups (for fsck -b #) at:
  32, 414688, 829344, 1244000, 1658656, 2073312, 2487968, 2902624,
  3317280, 3731936, 4146592,

but this is not recommended in FAQ (Chapter 14) and also not my
intention. So I tried to format and label the whole disk to get
at a first attempt some OpenBSD partition e:

# fdisk -u sd0
Do you wish to write new MBR? [n] y
Writing MBR at offset 0.
# fdisk sd0
Disk: sd0   geometry: 519/64/32 [1063146 2048-byte Sectors]
Offset: 0   Signature: 0xAA55
 Starting Ending LBA Info:
  #: id  C   H   S -  C   H   S [   start:size ]
 

  0: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
  1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
  2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
*3: A6  0   1   1 -518  63  32 [  32: 1062880 ] OpenBSD
# disklabel -E sd0
Label editor (enter '?' for help at any prompt)
  a e
offset: [32]
size: [1062880]
FS type: [4.2BSD]
  p
OpenBSD area: 32-1062912; size: 1062880; free: 0
#size   offset  fstype [fsize bsize  cpg]
   c:  10631460  unused
   e:  1062880   32  4.2BSD   2048 163841
  w
  q
No label changes.
#

But the disk label seems to be unchanged:

# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: MCJ3230SS
uid: 
flags:
bytes/sector: 2048
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 519
total sectors: 1063146
boundstart: 32
boundend: 1062912
drivedata: 0

16 partitions:
#size   offset  fstype [fsize bsize  cpg]
   c:  10631460  unused
# newfs -N /dev/rsd0e
newfs: /dev/rsd0e: Device not configured
# eject sd0

What went wrong? The procedure works for usual hard disks or memory
sticks with sectors of 512 bytes. I would be grateful for any hint.
(As a final aim I would like to have some bootable magneto-optical
disk with root partition a: and two more partitions d: and e: ...)

Thank you in advance,
Jens
OpenBSD 4.8 (GENERIC.MP) #335: Mon Aug 16 09:09:20 MDT 2010
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3211198464 (3062MB)
avail mem = 3111899136 (2967MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf06f0 (62 entries)
bios0: vendor American Megatrends Inc. version 0705 date 06/29/2010
bios0: ASUSTeK Computer INC. P7F-M WS
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET SSDT
acpi0: wakeup devices BR1E(S4) UAR1(S4) PS2K(S4) PS2M(S4) EUSB(S4) USB0(S4) 
USB1(S4) USB2(S4) USB3(S4) USBE(S4) USB4(S4) USB5(S4) USB6(S4) BR21(S4) 
BR22(S4) BR23(S4) P0P1(S4) P0P3(S4) P0P4(S4) P0P5(S4) P0P6(S4) USB8(S4) 
BR20(S4) BR24(S4) BR25(S4) BR26(S4) BR27(S4) PWRB(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU L3426 @ 1.87GHz, 1867.04 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 133MHz
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU L3426 @ 1.87GHz, 1866.73 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG
cpu1: 256KB 64b/line 8-way L2 cache
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU L3426 @ 1.87GHz, 1866.73 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG
cpu2: 256KB 64b/line 8-way L2 cache
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU L3426 @ 1.87GHz, 1866.73 MHz
cpu3: 

How to partition magneto-optical disks with sectors of 2048 bytes?

2011-03-05 Thread Jens A. Griepentrog

 Dear OpenBSD community,

I have got some SCSI magneto-optical drive together with a new
2.3GB removable MO disk. My system has configured it as follows:

OpenBSD 4.8 (GENERIC.MP) #335: Mon Aug 16 09:09:20 MDT 2010
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
...
sd0 at scsibus0 targ 3 lun 0: FUJITSU, MCJ3230SS, 0010
SCSI2 0/direct removable
sd0: 2076MB, 2048 bytes/sec, 1063146 sec total
...

In any case I want to use the whole disk for OpenBSD FFS.
I could install some raw filesystem

# newfs -N /dev/rsd0c
/dev/rsd0c: 2076.5MB in 4252584 sectors of 2048 bytes
11 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
super-block backups (for fsck -b #) at:
 32, 414688, 829344, 1244000, 1658656, 2073312, 2487968, 2902624,
 3317280, 3731936, 4146592,

but this is not recommended in FAQ (Chapter 14) and also not my
intention. So I tried to format and label the whole disk to get
at a first attempt some OpenBSD partition e:

# fdisk -u sd0
Do you wish to write new MBR? [n] y
Writing MBR at offset 0.
# fdisk sd0
Disk: sd0   geometry: 519/64/32 [1063146 2048-byte Sectors]
Offset: 0   Signature: 0xAA55
Starting Ending LBA Info:
 #: id  C   H   S -  C   H   S [   start:size ]
 


 0: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
 1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
 2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
*3: A6  0   1   1 -518  63  32 [  32: 1062880 ] OpenBSD
# disklabel -E sd0
Label editor (enter '?' for help at any prompt)
 a e
offset: [32]
size: [1062880]
FS type: [4.2BSD]
 p
OpenBSD area: 32-1062912; size: 1062880; free: 0
#size   offset  fstype [fsize bsize  cpg]
  c:  10631460  unused
  e:  1062880   32  4.2BSD   2048 163841
 w
 q
No label changes.

But the disk label seems to be unchanged:

# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: MCJ3230SS
uid: 
flags:
bytes/sector: 2048
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 519
total sectors: 1063146
boundstart: 32
boundend: 1062912
drivedata: 0

16 partitions:
#size   offset  fstype [fsize bsize  cpg]
  c:  10631460  unused
# newfs -N /dev/rsd0e
newfs: /dev/rsd0e: Device not configured
# eject sd0

What went wrong? The procedure works for usual hard disks and memory
sticks with sectors of 512 bytes. I would be grateful for any hint.
(As a final aim I would like to have some bootable magneto-optical
disk with root partition a: and two more partitions d: and e: ...)

Thank you in advance,
Jens



Re: How to partition magneto-optical disks with sectors of 2048 bytes?

2011-03-05 Thread Matthew Dempsky
On Sat, Mar 5, 2011 at 7:20 AM, Jens A. Griepentrog
griep...@wias-berlin.de wrote:
 What went wrong? The procedure works for usual hard disks and memory
 sticks with sectors of 512 bytes. I would be grateful for any hint.
 (As a final aim I would like to have some bootable magneto-optical
 disk with root partition a: and two more partitions d: and e: ...)

When you say The procedure works for usual hard disks and memory
sticks [...], do you mean it works on this same system when attached
to the same ahc(4) controller?  E.g., if you replace this sd0 with a
standard SCSI disk, will the same set of fdisk/disklabel/newfs
commands work correctly?