I'm having a heck of a time figuring out one of the steps for gmirror(). Here is what I have done so far:
Now this is where I'm stuck. The next step says to "Create file systems on these new partitions".
newfs -U /dev/mirror/???? <--- what do I put here?
The geom-mirror "how-to" doesn't cover single partition/slice installations.
Also, the instructions state "the size of both the slice and the last partition must be reduced by one sector".
What "slice" are they referring to in my situation?
Code:
root@localhost:/home/ken # df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ada0p2 105G 2.2G 94G 2% /
devfs 1.0K 1.0K 0B 100% /dev
fdescfs 1.0K 1.0K 0B 100% /dev/fd
root@localhost:/home/ken # diskinfo -v ada0 | head -n3
ada0
512 # sectorsize
120034123776 # mediasize in bytes (112G)
root@localhost:/home/ken #
root@localhost:/home/ken # geom zero load
root@localhost:/home/ken # gnop create -s 120034123776 gzero
root@localhost:/home/ken # gmirror label -v gm0 gzero.nop ada1
gmirror: Can't store metadata on ada1: Operation not permitted.
root@localhost:/home/ken # sysctl kern.geom.debugflags=16
kern.geom.debugflags: 0 -> 16
root@localhost:/home/ken # gmirror label -v gm0 gzero.nop ada1
Metadata value stored on gzero.nop.
Metadata value stored on ada1.
Done.
root@localhost:/home/ken # gmirror forget gm0
root@localhost:/home/ken # gpart show ada0
=> 34 234441581 ada0 GPT (112G)
34 6 - free - (3.0K)
40 128 1 freebsd-boot (64K)
168 226492280 2 freebsd-ufs (108G)
226492448 7949166 3 freebsd-swap (3.8G)
234441614 1 - free - (512B)
root@localhost:/home/ken # gpart backup ada0 > table.ada0
** I modified table.ada0 so the last partition was reduced by one sector **
root@localhost:/home/ken # more table.ada0
GPT 128
1 freebsd-boot 40 128
2 freebsd-ufs 168 226492280
3 freebsd-swap 226492448 7949165
root@localhost:/home/ken # gpart restore mirror/gm0 < table.ada0
root@localhost:/home/ken # gpart show
=> 34 234441581 ada0 GPT (112G)
34 6 - free - (3.0K)
40 128 1 freebsd-boot (64K)
168 226492280 2 freebsd-ufs (108G)
226492448 7949166 3 freebsd-swap (3.8G)
234441614 1 - free - (512B)
=> 34 234441580 mirror/gm0 GPT (112G)
34 6 - free - (3.0K)
40 128 1 freebsd-boot (64K)
168 226492280 2 freebsd-ufs (108G)
226492448 7949165 3 freebsd-swap (3.8G)
234441613 1 - free - (512B)
=> 34 234441580 ufsid/53eee3d374c3e517 GPT (112G)
34 6 - free - (3.0K)
40 128 1 freebsd-boot (64K)
168 226492280 2 freebsd-ufs (108G)
226492448 7949165 3 freebsd-swap (3.8G)
234441613 1 - free - (512B)
Now this is where I'm stuck. The next step says to "Create file systems on these new partitions".
newfs -U /dev/mirror/???? <--- what do I put here?
The geom-mirror "how-to" doesn't cover single partition/slice installations.
Also, the instructions state "the size of both the slice and the last partition must be reduced by one sector".
What "slice" are they referring to in my situation?