Hello!
I've had a little mishap
So far nothing bad happened.
The initial situation:
I have the following hard drives installed in my PC.
2 TB NVMe (EFI boot partition and the rest Windows)
1 TB NVMe (NTFS formatted, data grave)
2 TB SATA SSD (FreeBSD-ZFS and FreeBSD-Swap)
1 TB SATA SSD (NTFS, games)
500GB SSD (Linux and Windows Games)
Windows, FreeBSD and Linux all share the EFI boot partition.
Works great so far.
I previously had the partition for zfs on 128GB on the 2 TB SATA where I have FreeBSD on it.
Since it was getting tight (I still had free space, but 70% full) I thought I'd increase it to 256 or 512.
Unfortunately, I forgot the -s option in the gpart resize command and, as you can imagine, FreeBSD grabbed the whole 2TB (except for the few gb from swap).
Now I would like to reduce the size again, but that doesn't work quite so easily with ZFS.
I've read up on it, but wanted to check again whether these steps are the right ones I've taken.
My procedure would look like this:
`zfs snap zroot/ROOT@today` take a snapshot of the pool/dataset
I would then write the snapshot to a file and compress it with gzip
`zfs send -R zroot/ROOT@today > gzip /tmp/backup.gz`
Then destroy the zpool, resize the partition and create a new zpool. Then restore the snapshot of the file
`zcat /tmp/backup.gz | zfs recv -F zroot/ROOT@backup`
and make a rollback to this snapshot
`zfs rollback zroot/ROOT@backup`
Would that work?
I would have to do the whole thing from a boot stick, right? Because in single-user mode it doesn't help me because I'm on the installation and if I destroy the zpool it's stupid if I'm on there. So I would have to go into the boot stick and mount a Linux partition on /mnt, where I can then store my snapshot file. When I have created the zpool again, simply mount it again and pull down the snapshot.
Should actually work, shouldn't it?
I've had a little mishap
So far nothing bad happened.
The initial situation:
I have the following hard drives installed in my PC.
2 TB NVMe (EFI boot partition and the rest Windows)
1 TB NVMe (NTFS formatted, data grave)
2 TB SATA SSD (FreeBSD-ZFS and FreeBSD-Swap)
1 TB SATA SSD (NTFS, games)
500GB SSD (Linux and Windows Games)
Windows, FreeBSD and Linux all share the EFI boot partition.
Works great so far.
I previously had the partition for zfs on 128GB on the 2 TB SATA where I have FreeBSD on it.
Since it was getting tight (I still had free space, but 70% full) I thought I'd increase it to 256 or 512.
Unfortunately, I forgot the -s option in the gpart resize command and, as you can imagine, FreeBSD grabbed the whole 2TB (except for the few gb from swap).
Now I would like to reduce the size again, but that doesn't work quite so easily with ZFS.
I've read up on it, but wanted to check again whether these steps are the right ones I've taken.
My procedure would look like this:
`zfs snap zroot/ROOT@today` take a snapshot of the pool/dataset
I would then write the snapshot to a file and compress it with gzip
`zfs send -R zroot/ROOT@today > gzip /tmp/backup.gz`
Then destroy the zpool, resize the partition and create a new zpool. Then restore the snapshot of the file
`zcat /tmp/backup.gz | zfs recv -F zroot/ROOT@backup`
and make a rollback to this snapshot
`zfs rollback zroot/ROOT@backup`
Would that work?
I would have to do the whole thing from a boot stick, right? Because in single-user mode it doesn't help me because I'm on the installation and if I destroy the zpool it's stupid if I'm on there. So I would have to go into the boot stick and mount a Linux partition on /mnt, where I can then store my snapshot file. When I have created the zpool again, simply mount it again and pull down the snapshot.
Should actually work, shouldn't it?