Other Shrinking ada0 backup partition table to set up mirroring

I have a machine with two 120GB SSDs that I would like to set up as mirrors, as per these docs ("Creating a Mirror with an Existing Drive"). I've used all 120GB of ada0 to install FreeBSD, but I'm having some trouble restoring the modified version of the partition table onto ada1. The original contents of table.ada0 are below:

Code:
MBR 4
1 freebsd        63 234441585   [active]

I then reduced the partition size by 1, as the docs say:

Code:
MBR 4
1 freebsd        63 234441584   [active]

However, after running gpart restore mirror/gm0 < table.ada0 the output of gpart show mirror/gm0 still shows the following:

Code:
=>       63  234441584  mirror/gm0  MBR  (112G)
         63  234441584           1  freebsd  [active]  (112G)

As you can see, there is no free space at the end despite the change to the partition table. Did I edit table.ada0 incorrectly, or restore it incorrectly? I tried reducing the partition size in table.ada0 more drastically and restoring it a second time, but I'm not sure how to remove the existing mirror/gm0.
 
Hei,

but I'm not sure how to remove the existing mirror/gm0
According to the gmirror(8) manpage gmirror clear [I]provider[/I] should remove the gmirror metadata.

But...if it isn't to much of a hassle for you, I'd consider a fresh install, using GPT partitioning and a proper 4k alignment for your SSDs.
If the installer supports to setup a gmirror during install, and you have the possibility to back up your data from /dev/ada0, that would be the easiest way
to archieve your goal. (but I'm not sure if the installer supports to do that)
 
Back
Top