I am trying to set up gmirror on my recently updated FreeBSD 9.1 system according to the documentation in part 20.4.3 of the FreeBSD Handbook, but I am having problems when I attempt to restore the partition table to the second drive (ada1).
My partition table on ada0 looks as follows:
As there is no free space at the end of ada0, I do what the documentation says, and reduce the size of the slice and last partition by one.
The problem is with restoring the slice information. The partition table restores fine, but I get 'Invalid argument' when restoring the slice:
I'm pretty much stuck at this point, and could use some pointer as to which way to go. I've tried reducing the values by more than 1, but I still get the Invalid argument message.
Thanks in advance.
My partition table on ada0 looks as follows:
Code:
: 2/root@cornix:~# gpart show ada0
=> 63 1465149105 ada0 MBR (698G)
63 1465149105 1 freebsd [active] (698G)
: 2/root@cornix:~# gpart backup ada0 > table.ada0
: 2/root@cornix:~# gpart backup ada0s1 > table.ada0s1
: 2/root@cornix:~# cat table.ada0
MBR 4
1 freebsd 63 1465149105 [active]
: 2/root@cornix:~# cat table.ada0s1
BSD 8
1 freebsd-ufs 0 4194304
2 freebsd-swap 4194304 50331648
4 freebsd-ufs 54525952 4194304
5 freebsd-ufs 58720256 67108864
6 freebsd-ufs 125829120 67108864
7 freebsd-ufs 192937984 1272211121
As there is no free space at the end of ada0, I do what the documentation says, and reduce the size of the slice and last partition by one.
Code:
: 2/root@cornix:~# cat table.ada0
MBR 4
1 freebsd 63 1465149105 [active]
: 2/root@cornix:~# cat table.ada0s1
BSD 8
1 freebsd-ufs 0 4194304
2 freebsd-swap 4194304 50331648
4 freebsd-ufs 54525952 4194304
5 freebsd-ufs 58720256 67108864
6 freebsd-ufs 125829120 67108864
7 freebsd-ufs 192937984 1272211121
The problem is with restoring the slice information. The partition table restores fine, but I get 'Invalid argument' when restoring the slice:
Code:
: 2/root@cornix:~# gpart restore mirror/gm0 < table.ada0
: 2/root@cornix:~# gpart restore mirror/gm0s1 < table.ada0s1
gpart: size '1272211120': Invalid argument
I'm pretty much stuck at this point, and could use some pointer as to which way to go. I've tried reducing the values by more than 1, but I still get the Invalid argument message.
Thanks in advance.