2020-03-20

ehowton: (Canon S2)


◾ Tags:
ehowton: (truck)
To install OpenBSD on a softraid mirror:

Boot from CD then drop to a shell (s)

# sysctl hw.disknames

(sd0 for SCSI devices, wd0 for IDE devices)

# cd /dev/
# sh MAKEDEV sd0 (or wd0)
# sh MAKEDEV sd1 (or wd1)

# fdisk -iy sd0 (or wd0)
# fdisk -iy sd1 (or wd1)


# disklabel -E wd0

Label editor (enter '?' for help at any prompt)
[s,w]d0> a <-- select partition a
partition [a]
offset: [64]
size: [16771796]
FS type: [4.2BSD] raid <-- enter fs type raid
> q
Write new label?: [y]

# disklabel [s,w]d0 > dumplabel
# disklabel -R [s,w]d1 dumplabel

# bioctl -c 1 -l [s,w]d0a,[s,w]d1a softraid0
<-- -c 1 for RAID1, -c 0 for RAID0
sd0 at scsibus1 targ 1 lun 0: SCSI2 0/direct fixed
sd0: 10236MB, 512 bytes/sector, 20964233 sectors
softraid0: SR RAID 1 volume attached as (sd0 for IDE devices, sd2 for SCSI devices)

# bioctl -h sd[0,2] <-- for status

CTRL-D to exit ^D

Then (I)nstall to your new RAID device [s,w]d0!

TO REPLACE A FAILED DRIVE:

Insert new disk
vopenbsd# bioctl -h sd0                                                                                                         
Volume      Status               Size Device  
softraid0 0 Degraded             8.0G sd0     RAID1 
          0 Online               8.0G 0:0.0   noencl 
          1 Offline                0B 0:1.0   noencl <>

# sysctl hw.disknames

# cd /dev/

# sh MAKEDEV sd2

# fdisk -iy sd2

# disklabel sd1 > dumplabel
# disklabel -R sd2 dumplabel


bioctl -R /dev/sd2a sd0
softraid0: rebuild of sd0 started on wd0a
vopenbsd# bioctl -h sd0                                                                                                         
Volume      Status               Size Device  
softraid0 0 Degraded             8.0G sd0     RAID1 
          0 Online               8.0G 0:0.0   noencl 
          1 Rebuild              8.0G 0:1.0   noencl 




Thanks to Claud Computing
◾ Tags:

July 2025

S M T W T F S
   1234 5
6 7 89101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Expand Cut Tags

No cut tags