Problem mit cgd auf raid (Achtung lang)

buebo

Well-Known Member
Hallo,
ich habe ein RaidFrame Device und will darauf eine per cgd verschlüsselte Partition erstellen. Das Einrichten funktioniert soweit problemlos anhand der NetBSD Guide. Will ich das cgd Device jedoch wieder aktivieren (cgdconfig -C) funktioniert die Verifizierung anhand des Passwords nicht.

Der Ausgangszustand:

Code:
<root@datenschleuder:~>
zsh/2 514 # fdisk raid3
Disk: /dev/rraid3d
NetBSD disklabel disk geometry:
cylinders: 305245, heads: 16, sectors/track: 384 (6144 sectors/cylinder)
total sectors: 1875426816

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 1875426816

Partition table:
0: NetBSD (sysid 169)
    start 63, size 1875426753 (915736 MB, Cyls 0-116739/234/40)
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.

Code:
<root@datenschleuder:~>
zsh/2 515 # disklabel raid3
# /dev/rraid3d:
type: RAID
disk: raid
label: fictitious
flags:
bytes/sector: 512
sectors/track: 384
tracks/cylinder: 16
sectors/cylinder: 6144
cylinders: 305245
total sectors: 1875426816
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

5 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 c: 1875426753        63     unused      0     0        # (Cyl.      0*- 305245*)
 d: 1875426816         0     unused      0     0        # (Cyl.      0 - 305245*)
 e: 1875426753        63     4.2BSD      0     0     0  # (Cyl.      0*- 305245*)

Nun richte ich das cgd-Device ein, das Scrubbing (wie in der Guide vorgesehen) spare ich mir zu Testzwecken, das sollte aber auch nichts verändern.

Code:
[I]cgd0 Konfigurieren:[/I]
<root@datenschleuder:~>
zsh/2 516 # cgdconfig -g -V disklabel -o /etc/cgd/raid3e aes-cbc 256

<root@datenschleuder:~>
zsh/2 517 # cgdconfig -V re-enter cgd0 /dev/raid3e
/dev/raid3e's passphrase:
re-enter device's passphrase:

[I]fdisk und disklabel[/I]
zsh/2 518 # fdisk -0ua cgd0     
fdisk: primary partition table invalid, no magic in sector 0
Disk: /dev/rcgd0d
NetBSD disklabel disk geometry:
cylinders: 915735, heads: 1, sectors/track: 2048 (2048 sectors/cylinder)
total sectors: 1875426753

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 1875426753

Do you want to change our idea of what BIOS thinks? [n] 

Partition 0:
<UNUSED>
The data for partition 0 is:
<UNUSED>
sysid: [0..255 default: 169] 
start: [0..116740cyl default: 63, 0cyl, 0MB] 
size: [0..116740cyl default: 1875426690, 116740cyl, 915736MB] 
bootmenu: [] 
Do you want to change the active partition? [n] 

We haven't written the MBR back to disk yet.  This is your last chance.
Partition table:
0: NetBSD (sysid 169)
    start 63, size 1875426690 (915736 MB, Cyls 0-116739/233/40)
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
Should we write new partition table? [n] y

zsh/2 520 # disklabel cgd0
# /dev/rcgd0d:
type: cgd
disk: cgd
label: fictitious
flags:
bytes/sector: 512
sectors/track: 2048
tracks/cylinder: 1
sectors/cylinder: 2048
cylinders: 915735
total sectors: 1875426753
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

5 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 c: 1875426690        63     unused      0     0        # (Cyl.      0*- 915735*)
 d: 1875426753         0     unused      0     0        # (Cyl.      0 - 915735*)
 e: 1875426690        63     4.2BSD      0     0     0  # (Cyl.      0*- 915735*)

Nun kann ich das Device problemlos mittels newfs -O 2 /dev/cgd0e mit einem ufs2 Dateisystem versehen und danach mounten. Soweit alles ganz unproblematisch, was nicht mehr klappt ist das Device neu einbinden, meine keyphrase wird nicht akzeptiert. Egal ob die Verification Method auf ffs oder disklabel gesetzt ist. Woran könnte das liegen?

Setze ich Verification Method auf 'none' funktioniert alles problemlos und eine angelegte Testdatei ist auch noch vorhanden. Das ist mir allerdings für den täglichen Gebrauch etwas zu riskant (ein falscher Schlüssel würde das dann alles in Müll verwandeln).

Irgendwie scheinen sich also die Verification Method und das raid-Device zu beissen...

Irgendwer eine Idee was man da machen könnte? Ich bin grade etwas hilflos...
 
kann dir leider nicht helfen, würde dir aber raten es auf der entsprechenden mailingliste zu posten.
 
Zurück
Oben