Last active
December 26, 2021 14:37
-
-
Save D4rk4/826bd3fd10d8fcb222824754361532ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deb http://hwraid.le-vert.net/debian stretch main | |
#install dirmgr | |
apt-get install dirmngr | |
#add key | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6005210E23B3D3B4 | |
apt-get update && apt-get install -y megacli | |
#turn on JBOD | |
megacli -AdpSetProp EnableJBOD 1 -a0 | |
#detach disk | |
zpool detach rpool /dev/sdb2 | |
#backup disk structure | |
sgdisk --backup=disk /dev/sdb | |
#remove drive 1 | |
megacli -CfgLdDel -L1 -a0 | |
#create JBOD device | |
megacli -PDMakeJBOD -PhysDrv[252:1] -a0 | |
#load disk structure | |
sgdisk --load-backup=disk /dev/sdb | |
sgdisk -G /dev/sdb | |
#copy EFI | |
dd if=/dev/sda1 of=/dev/sdb1 bs=512 | |
#or copy MBR | |
dd if=/dev/sda of=/dev/sdb bs=512 count=1 | |
#attach disk to mirror | |
zpool attach rpool /dev/sda2 /dev/disk/by-id/wwn-aaaaa-part2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment