Thanks Kamil. Good call on the using qemu to try this out somewhere safer. On Fri, Apr 29, 2016, 04:13 Kamil Cholewiński <harry6...@gmail.com> wrote:
> On Fri, 29 Apr 2016, Benton Lam <benton.hw....@gmail.com> wrote: > > Hi, > > > > I currently have a 5.7 box, with 2 disk RAID1 (comprise of sd1a and sd2a) > > > > Suppose I upgrade / install to 5.9. Is it possible for me to do the > following: > > > > bioctl -O /dev/sd2a sd3 # degrade the raid1 (sd3) > > bioctl -c 5 -l /dev/sd1a,/dev/sd2a,/dev/sd4a -O /dev/sd1a softraid0 # > > create a raid 5 with sd1a, sd2a and sd4a, but sd1a is degraded, > > suppose that creates sd5 > > > > <copy stuff from RAID1 to RAID5> > > bioctl -d sd3 > > bioctl -R /dev/sd1a sd5 # swap the sd1a back into the raid5 > > > > Is that possible? or should I be finding another 3TB drive, copy the > > stuff onto that temporary drive and create the RAID5? > > > > Thanks, > > Benton Lam > > 1. Try it in Qemu. Really, nothing like a playground where you can try > things without unnecessary risk. I run my lab like this: > > > #!/bin/sh > > exec qemu-system-x86_64 -m 512 -no-fd-bootchk \ > > -device virtio-net,netdev=mynet0 -netdev user,id=mynet0 \ > > -cpu host -enable-kvm \ > > -serial mon:stdio \ > > -drive if=virtio,index=0,file=$HOME/vm/raidlab-0.img \ > > -drive if=virtio,index=1,file=$HOME/vm/raidlab-1.img \ > > -drive if=virtio,index=2,file=$HOME/vm/raidlab-2.img \ > > ... [ continue adding drives here ] ... \ > > -cdrom ~/iso/OpenBSD/amd64/install59.iso \ > > $@ > > To get more disks, dd if=/dev/zero of=raidlab-$i.img bs=1M count=1024 > > The host is on Linux, but I think you only need to drop the kvm flag for > other host OS's to work. > > You need -boot d to start from CD, and -nographic to use your terminal > as the console after installation. You may also want to add: > > /etc/boot.conf: > > set tty com0 > > stty com0 115200 > /etc/ttys: > > tty00 "/usr/libexec/getty std.115200" vt220 on secure > > 2. For live data, if you care about it at all, this sounds like a really > bad idea. Ensure you have good backups before you do anything > destructive. Consider whether another drive's cost really means more to > you than your data. You can keep the extra drives as spares for later. > Better safe than sorry. > > K.