I am used to working with partitions in Linux/EXT4 where this would be no problem, but I know under FreeBSD/ZFS things can be a bit different so I wanted to check. Hopefully one of the FreeBSD gurus here let me know if this is OK or not.
I want to remove the swap partitions from a pool, but I don't want to lose the data and/or have to recreate the pool.
(In another thread not having a swap partition was recommended as the best way to permanently control swap.)
Is the following procedure OK, and will I be able to re-import the pool into FreeNAS afterwards?
Procedure:
(This pool is very old and was created under v8.x and has been upgraded over the years which is why it looks a bit different than pools created today, but the sway is still the first partition and 2.0G)
I want to remove the swap partitions from a pool, but I don't want to lose the data and/or have to recreate the pool.
(In another thread not having a swap partition was recommended as the best way to permanently control swap.)
Is the following procedure OK, and will I be able to re-import the pool into FreeNAS afterwards?
Procedure:
- Export the pool from the GUI (pool was created using the GUI and currently in use)
- gpart delete -i 1 ada0
- gpart delete -i 1 ada1
- Import the pool using the GUI (Free space at beginning of drives is now just over 2G)
(This pool is very old and was created under v8.x and has been upgraded over the years which is why it looks a bit different than pools created today, but the sway is still the first partition and 2.0G)
Code:
#>zpool status SCRATCH #>gpart show -l ada0 => 34 7814037101 ada0 GPT (3.6T) 34 94 - free - (47K) 128 4194304 1 (null) (2.0G) 4194432 7809842696 2 (null) (3.6T) 7814037128 7 - free - (3.5K) #>gpart show -l ada1 => 34 7814037101 ada1 GPT (3.6T) 34 94 - free - (47K) 128 4194304 1 (null) (2.0G) 4194432 7809842696 2 (null) (3.6T) 7814037128 7 - free - (3.5K) pool: SCRATCH state: ONLINE scan: scrub repaired 0 in 0 days 15:54:54 with 0 errors on Thu Jan 3 22:14:11 2019 config: NAME STATE READ WRITE CKSUM SCRATCH ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 gptid/eb2ee48c-a398-11e2-bc5c-c860006d863b ONLINE 0 0 0 gptid/ec0615be-a398-11e2-bc5c-c860006d863b ONLINE 0 0 0