D
Deleted member 63539
Guest
I spend the whole disk for FreeBSD and keep the FreeBSD installer's default swap size, 2G. Now I want to increase swap and found that swap is a fixed partition but not part of the zpool (the zpool is on another fixed partition, so indeed the whole disk is partitioned but not used entirely by the zpool). It seemed re-install (re-partition) is the only solution, and I don't want to do that.
On OpenIndiana, they have the swap inside the zpool. So resizing the swap volume is very easy. Could I add a ZFS volume and use it as swap? I ask before actually try because I think there must be technical problem so it's not do that way by default. If it's possible and has no drawbacks at all I really wonder why the FreeBSD installer doesn't put swap inside the zpool by default. It's much more convenient and reasonable to do so.
Please help me. Thanks.
Code:
gpart list ada0
Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 234441607
first: 40
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
Mediasize: 209715200 (200M)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 20480
Mode: r0w0e0
efimedia: HD(1,GPT,96cf85cb-d194-11ea-ba3f-d8cb8a370b18,0x28,0x64000)
rawuuid: 96cf85cb-d194-11ea-ba3f-d8cb8a370b18
rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
label: efiboot0
length: 209715200
offset: 20480
type: efi
index: 1
end: 409639
start: 40
2. Name: ada0p2
Mediasize: 524288 (512K)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 209735680
Mode: r0w0e0
efimedia: HD(2,GPT,96da25cd-d194-11ea-ba3f-d8cb8a370b18,0x64028,0x400)
rawuuid: 96da25cd-d194-11ea-ba3f-d8cb8a370b18
rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
label: gptboot0
length: 524288
offset: 209735680
type: freebsd-boot
index: 2
end: 410663
start: 409640
3. Name: ada0p3
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 210259968
Mode: r1w1e0
efimedia: HD(3,GPT,96e2cd9a-d194-11ea-ba3f-d8cb8a370b18,0x64428,0x400000)
rawuuid: 96e2cd9a-d194-11ea-ba3f-d8cb8a370b18
rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
label: swap0
length: 2147483648
offset: 210259968
type: freebsd-swap
index: 3
end: 4604967
start: 410664
4. Name: ada0p4
Mediasize: 117676359680 (110G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 2357743616
Mode: r1w1e1
efimedia: HD(4,GPT,96e8ac07-d194-11ea-ba3f-d8cb8a370b18,0x464428,0xdb30760)
rawuuid: 96e8ac07-d194-11ea-ba3f-d8cb8a370b18
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: zfs0
length: 117676359680
offset: 2357743616
type: freebsd-zfs
index: 4
end: 234441607
start: 4604968
Consumers:
1. Name: ada0
Mediasize: 120034123776 (112G)
Sectorsize: 512
Mode: r2w2e3
On OpenIndiana, they have the swap inside the zpool. So resizing the swap volume is very easy. Could I add a ZFS volume and use it as swap? I ask before actually try because I think there must be technical problem so it's not do that way by default. If it's possible and has no drawbacks at all I really wonder why the FreeBSD installer doesn't put swap inside the zpool by default. It's much more convenient and reasonable to do so.
Please help me. Thanks.