Hello,

I have a 2 disk RAID 1 softraid volume on top of which I have created
a CRYPTO softraid volume.

The combination appears to be working correctly when mounted manually,
however I don't know how to automatically mount the CRYPTO volume at
boot.

The problem is that the nested CRYPTO device is not created
automatically and as such cannot be mounted. After boot I have to
manually create the CRYPTO softraid device and then manually mount.

I don't believe I can place the bioctl commands in /etc/rc.securelevel
because that comes too late in the rc sequence.

Advice would be much appreciated.

Regards,
Laurence.

Setup is as follows:


# disklabel -p g sd2
# /dev/rsd2c:
type: SCSI
disk: SCSI disk
label: WDC WD4003FZEX-0
duid: 3d3e76ba2d573434
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 486401
total sectors: 7814037168 # total bytes: 3726.0G
boundstart: 0
boundend: 7814037168
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:          3726.0G                0    RAID
  c:          3726.0G                0  unused
# disklabel -p g sd3
# /dev/rsd3c:
type: SCSI
disk: SCSI disk
label: WDC WD4003FZEX-0
duid: aaece5cd6deaeec4
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 486401
total sectors: 7814037168 # total bytes: 3726.0G
boundstart: 0
boundend: 7814037168
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:          3726.0G                0    RAID
  c:          3726.0G                0  unused
# bioctl sd5
Volume      Status               Size Device
softraid0 1 Online      4000786759680 sd5     RAID1
          0 Online      4000786759680 1:0.0   noencl <sd2a>
          1 Online      4000786759680 1:1.0   noencl <sd3a>
# disklabel -p g sd5
# /dev/rsd5c:
type: SCSI
disk: SCSI disk
label: SR RAID 1
duid: e558e8bc049bc24e
flags:
bytes/sector: 512
sectors/track: 255
tracks/cylinder: 511
sectors/cylinder: 130305
cylinders: 59967
total sectors: 7814036640 # total bytes: 3726.0G
boundstart: 0
boundend: 7814036640
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:          3726.0G                0    RAID
  c:          3726.0G                0  unused
# bioctl -c C -l /dev/sd5a softraid0
Passphrase:
softraid0: CRYPTO volume attached as sd6
# disklabel sd6
# /dev/rsd6c:
type: SCSI
disk: SCSI disk
label: SR CRYPTO
duid: 2d0dc34cedc55185
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 486401
total sectors: 7814036112
boundstart: 0
boundend: 7814036112
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:       7814036096                0  4.2BSD   8192 65536    1 # /nas
  c:       7814036112                0  unused
#
#
#
#
# dmesg
OpenBSD 5.5 (GENERIC.MP) #315: Wed Mar  5 09:37:46 MST 2014
    dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3990814720 (3805MB)
avail mem = 3875966976 (3696MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf0100 (45 entries)
bios0: vendor Award Software International, Inc. version "F1" date 06/12/2012
bios0: Gigabyte Technology Co., Ltd. GA-E350N
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP MSDM HPET MCFG MATS APIC SSDT
acpi0: wakeup devices USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3)
USB5(S3) USB6(S3) SBAZ(S4) PEX0(S5) PEX1(S5) PEX2(S5) PEX3(S5)
P2P_(S5) PCE2(S4) PCE3(S4) PCE4(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD E-350 Processor, 1596.79 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 16-way L2 cache
cpu0: 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, C-substates=0.0.0.0.0, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD E-350 Processor, 1596.61 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 16-way L2 cache
cpu1: 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 21, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (PEX0)
acpiprt2 at acpi0: bus 3 (PEX1)
acpiprt3 at acpi0: bus -1 (PEX2)
acpiprt4 at acpi0: bus -1 (PEX3)
acpiprt5 at acpi0: bus 1 (P2P_)
acpiprt6 at acpi0: bus -1 (PCE2)
acpiprt7 at acpi0: bus -1 (PCE3)
acpiprt8 at acpi0: bus -1 (PCE4)
acpiprt9 at acpi0: bus -1 (PCE5)
acpiprt10 at acpi0: bus -1 (PCE6)
acpiprt11 at acpi0: bus -1 (PCE7)
acpiprt12 at acpi0: bus -1 (PCE9)
acpiprt13 at acpi0: bus -1 (PCEA)
acpiprt14 at acpi0: bus -1 (PCEB)
acpiprt15 at acpi0: bus -1 (PCEC)
acpiprt16 at acpi0: bus -1 (AGP_)
acpicpu0 at acpi0: C2, PSS
acpicpu1 at acpi0: C2, PSS
acpibtn0 at acpi0: PWRB
cpu0: 1596 MHz: speeds: 1600 1280 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 14h Host" rev 0x00
radeondrm0 at pci0 dev 1 function 0 "ATI Radeon HD 6310" rev 0x00
drm0 at radeondrm0
radeondrm0: msi
azalia0 at pci0 dev 1 function 1 "ATI Radeon HD 6310 HD Audio" rev 0x00: msi
azalia0: no supported codecs
ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x40: apic 2 int
19, AHCI 1.2
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: <ATA, TOSHIBA MK1032GS, AS02> SCSI3
0/direct fixed t10.ATA_TOSHIBA_MK1032GSX_762G2643T
sd0: 95396MB, 512 bytes/sector, 195371568 sectors
sd1 at scsibus0 targ 1 lun 0: <ATA, Hitachi HTS72201, DCDO> SCSI3
0/direct fixed naa.5000cca53dc49db2
sd1: 152627MB, 512 bytes/sector, 312581808 sectors
sd2 at scsibus0 targ 2 lun 0: <ATA, WDC WD4003FZEX-0, 01.0> SCSI3
0/direct fixed naa.50014ee2b559e9be
sd2: 3815447MB, 512 bytes/sector, 7814037168 sectors
sd3 at scsibus0 targ 3 lun 0: <ATA, WDC WD4003FZEX-0, 01.0> SCSI3
0/direct fixed naa.50014ee2087713d3
sd3: 3815447MB, 512 bytes/sector, 7814037168 sectors
ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 2 int
18, version 1.0, legacy support
ehci0 at pci0 dev 18 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "ATI EHCI root hub" rev 2.00/1.00 addr 1
ohci1 at pci0 dev 19 function 0 "ATI SB700 USB" rev 0x00: apic 2 int
18, version 1.0, legacy support
ehci1 at pci0 dev 19 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "ATI EHCI root hub" rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 "ATI SBx00 SMBus" rev 0x42: polling
iic0 at piixpm0
"eeprom" at iic0 addr 0x50 not configured
pciide0 at pci0 dev 20 function 1 "ATI SB700 IDE" rev 0x40: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
azalia1 at pci0 dev 20 function 2 "ATI SBx00 HD Audio" rev 0x40: apic 2 int 16
azalia1: codecs: Realtek/0x0887
audio0 at azalia1
pcib0 at pci0 dev 20 function 3 "ATI SB700 ISA" rev 0x40
ppb0 at pci0 dev 20 function 4 "ATI SB600 PCI" rev 0x40
pci1 at ppb0 bus 1
ohci2 at pci0 dev 20 function 5 "ATI SB700 USB" rev 0x00: apic 2 int
18, version 1.0, legacy support
ppb1 at pci0 dev 21 function 0 "ATI SB800 PCIE" rev 0x00: msi
pci2 at ppb1 bus 2
re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x06:
RTL8168E/8111E-VL (0x2c80), msi, address 90:2b:34:52:22:95
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 5
ppb2 at pci0 dev 21 function 1 "ATI SB800 PCIE" rev 0x00: msi
pci3 at ppb2 bus 3
ohci3 at pci0 dev 22 function 0 "ATI SB700 USB" rev 0x00: apic 2 int
18, version 1.0, legacy support
ehci2 at pci0 dev 22 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17
usb2 at ehci2: USB revision 2.0
uhub2 at usb2 "ATI EHCI root hub" rev 2.00/1.00 addr 1
pchb1 at pci0 dev 24 function 0 "AMD AMD64 14h Link Cfg" rev 0x43
pchb2 at pci0 dev 24 function 1 "AMD AMD64 14h Address Map" rev 0x00
pchb3 at pci0 dev 24 function 2 "AMD AMD64 14h DRAM Cfg" rev 0x00
km0 at pci0 dev 24 function 3 "AMD AMD64 14h Misc Cfg" rev 0x00
pchb4 at pci0 dev 24 function 4 "AMD AMD64 14h CPU Power" rev 0x00
pchb5 at pci0 dev 24 function 5 "AMD AMD64 14h Reserved" rev 0x00
pchb6 at pci0 dev 24 function 6 "AMD AMD64 14h NB Power" rev 0x00
pchb7 at pci0 dev 24 function 7 "AMD AMD64 14h Reserved" rev 0x00
usb3 at ohci0: USB revision 1.0
uhub3 at usb3 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb4 at ohci1: USB revision 1.0
uhub4 at usb4 "ATI OHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
it0 at isa0 port 0x2e/2: IT8728F rev 1, EC port 0x228
usb5 at ohci2: USB revision 1.0
uhub5 at usb5 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb6 at ohci3: USB revision 1.0
uhub6 at usb6 "ATI OHCI root hub" rev 1.00/1.00 addr 1
uhub7 at uhub3 port 3 "Fujitsu Component product 0x100e" rev 2.00/1.04 addr 2
uhidev0 at uhub7 port 4 configuration 1 interface 0 "Fujitsu Component
Type 7 Keyboard" rev 2.00/1.04 addr 3
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes, country code 32
wskbd0 at ukbd0: console keyboard
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
sd4 at scsibus2 targ 1 lun 0: <OPENBSD, SR RAID 1, 005> SCSI2 0/direct fixed
sd4: 95393MB, 512 bytes/sector, 195365873 sectors
sd5 at scsibus2 targ 2 lun 0: <OPENBSD, SR RAID 1, 005> SCSI2 0/direct fixed
sd5: 3815447MB, 512 bytes/sector, 7814036640 sectors
root on sd4a (2198e90933e94b6b.a) swap on sd4b dump on sd4b
drm: initializing kernel modesetting (PALM 0x1002:0x9802 0x1458:0xD000).
radeondrm0: VRAM: 256M 0x0000000000000000 - 0x000000000FFFFFFF (256M used)
radeondrm0: GTT: 512M 0x0000000010000000 - 0x000000002FFFFFFF
drm: PCIE GART of 512M enabled (table at 0x0000000000040000).
drm: Internal thermal controller without fan control
radeondrm0: 1920x1080
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
acpi0: PM1 stuck (en 0x121 st 0x1), clearing
sd6 at scsibus2 targ 3 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd6: 3815447MB, 512 bytes/sector, 7814036112 sectors

Reply via email to