Hi guys,
I'm in the process of moving a ZFS installation onto another hdd due to the fact that the current swap partition (4GB) is too small.
ATM, I have a mirror ZFSonRoot (poolname: zroot):
and the goal is to increase the swap to 32 gigs (space allocated from recreating the freebsd-zfs partition smaller by 28 GB and extending partition2 (the swap)).
I tried some stuff but ran into a wall after the following steps (all done in VBox):
Basically, I have the same instalation on both hdd's. So, I go ahead and reboot, the system goes well, but I get "cannot mount from ZFSroot zroot". This is the point I don;t understand since it is not supposed to happen. In theory, the hdd's should be the same and therefore, boot. In reality, something didn;t go as planned.
Ideas ?
I'm in the process of moving a ZFS installation onto another hdd due to the fact that the current swap partition (4GB) is too small.
ATM, I have a mirror ZFSonRoot (poolname: zroot):
Code:
=> 34 3905945533 mfid0 GPT (1.8T)
34 128 1 freebsd-boot (64k)
162 8388608 2 freebsd-swap (4.0G)
8388770 3897556797 3 freebsd-zfs (1.8T)
=> 34 3905945533 mfid1 GPT (1.8T)
34 128 1 freebsd-boot (64k)
162 8388608 2 freebsd-swap (4.0G)
8388770 3897556797 3 freebsd-zfs (1.8T)
I tried some stuff but ran into a wall after the following steps (all done in VBox):
Code:
# backup
zfs snapshot -r zroot@1
# Resize the swap partition
0) ls -la /dev/gpt # get the GPT labels
1) ls -la /dev/label/ # get the Glabels
2) swapoff -a
3) gmirror remove swap swapmfid1
4) zpool offline zroot gpt/mfid1
5) zpool detach zroot gpt/mfid1
6) gpart delete -i 3 mfid1 # leave partition 1 alone
7) gpart resize -s 32G -i 2 mfid1
8) gpart add -t freebsd-zfs -l mfid1 mfid1
# Create zfs datasets on the "new" hdd
- zpool create zroot1 /dev/gpt/mfid1
- zfs send -R zroot@1 | zfs receive -F -d zroot1
- zpool export zroot1 && zpool import zroot1
Ideas ?