How to add new disk to FreeBSD

We currently migrate all our projects to linux, but sometimes old FreeBSD issues occure.
Today I spend a couple of time, removing hotspare disk from LSI Megaraid and adding it to FBSD as additional disk.
We need quick solution to enhance disk space for couple of weeks for migration.
It was possible to skip failover and use disk without RAID.
So, Read more 🙂

LSI get information:

ms2#MegaCli -EncInfo -aALL
Number of Dedicated Hot Spares: 1
    0 : EnclId - 32 SlotId - 4
Exit Code: 0x00
ms2# MegaCli -LDInfo -Lall -aALL

Remove hot spare, Create Raid0, with only one disk

ms2# MegaCli -PDHSP -Rmv -PhysDrv \[32:4\] -a0                                    
Adapter: 0: Remove Physical Drive at EnclId-32 SlotId-4 as Hot Spare Success.
Exit Code: 0x00
ms2#
ms2# MegaCli -CfgLdAdd -r0\[32:4\] -a0

And Partition disk

dd if=/dev/zero of=/dev/mfid2 bs=512 count=1 #Clear partition table on entire disk.
glabel label -v hd2 /dev/ad4 #to creates a label called "mfid2"
newfs -U /dev/label/mfid2
mkdir /mnt/mfid2
mount /dev/label/mfid2 /mnt/mfid2

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>