<div dir="ltr">Just adding a hard drive and formatting for use is easy.  Add the hard drive to the system and find the serial number it attached as.  The 'dmesg' output should give you a fairly good overview.<div><br></div><div>dmesg | egrep 'da|nvme'</div><div><br></div><div>A SATA drive attaches as da0, da1, etc.  A nvme drive attaches as nvme0, nvme1, etc.  So for example, lets say the new hard drive is this:</div><div><br></div><div>da1: Serial Number 2105E4F03879<br></div><div>nvme1: Model Samsung_SSD_960_EVO_250GB BaseSerial S3ESNX0J219064Y nscount=1<br>nvme1: Disk nvme0 ns=1 blksize=512 lbacnt=488397168 cap=232GB serno=S3ESNX0J219064Y-1<br></div><div><br></div><div>Being very careful not to mistake your existing drives, find the device of the new drive and also remember the serial number for later.  In this example the serial number would be 2105E4F03879 on da1, or S3ESNX0J219064Y-1 on nvme1, depending.</div><div><br></div><div>To format the drive with gpt, non-bootable:</div><div><br></div><div>gpt init -f /dev/nvme1</div><div>(for bootable, gpt init -f -B /dev/nvme1)</div><div><br></div><div>The gpt init -f will also create an empty disklabel on /dev/nvme1s1 which you can edit:</div><div><br></div><div>disklabel -e nvme1s1</div><div><br></div><div>To create a data-only partition, usually an entry like this suffices.  We use 'd' by convention.  'a' is typically used for /boot, 'b' for swap, 'c' is typically not used (it had a legacy meaning in prior decades), 'd' is typically root, and 'e', 'f', 'g', etc etc are additional drives.   This is by convention only, you can use whatever partition labels you like.  But to avoid confusion when examining drives in the future it is good to stick to convention.</div><div><br></div><div>e: * * HAMMER2</div><div><br></div><div>Save the disklabel and newfs_hammer2 the filesystem:</div><div><br></div><div>newfs_hammer2 /dev/nvme1s1e</div><div><br></div><div>Ok, now for mounting purposes it is best to reference the device by its serial number instead of via the raw device, because device numberings can change.  An example entry in your /etc/fstab would be:</div><div><br></div><div>serno/S3ESNX0J219064Y-1.s1e      /data    hammer2   rw    1 1</div><div><br></div><div>Where you would mkdir /data on your root partition to mount it on.   That's it.   'mount /data' and it should mount.</div><div><br></div><div>--</div><div><br></div><div>If you want to make the drive bootable you would gpt init -f -B /dev/nvme1 instead of just gpt init -f /dev/nvme1 above, and you would partition the drive differently.  Typically for a bootable drive, a 1G /boot partition is created on 'a', with UFS as the filesystem, a swap partition is created on 'b', and the root partition is created on 'd'.  You would also need a configuration line in /boot/loader.conf to tell it where the root mount is e.g. vfs.root.mountfrom="hammer2:serno/blahblah.s1d"</div><div><br></div><div>But creating multiple bootable drives can create confusion in the BIOS, so generally speaking you don't do that for additional drives.  Still, you can.   You can also partition the drive however you want.  Rather than adding just a single 'e' partition.  But it is good to stick to convention to reduce confusion.   What examining a drive's disklabel, seeing a single 'e' partition tells you immediately that it is strictly a data drive.</div><div><br></div><div>-Matt</div></div>