Hello all!
I've been using FreeBSD for some time now and I love it, but when it comes to ZFS I am a total n00b and I don't want to risk
losing all my work, so here is my question:
What is the most hassle-free and safe way to migrate my current data from 1TB HDD (ada0) to a smaller sized SSD I just bought,
attached to the same machine on another SATA port, using ZFS commands (not via dd or external cloning software)?
What I really mean is to transfer all data from HDD to the SSD and then remove the HDD from the PC (maybe reusing it to store snapshots and backups only) and
have the SSD as my shiny new ada0.
I am using FreeBSD 12.0-RELEASE-p7 and the zpool is the default RootOnZFS from FreeBSD installation, as follows:
Currently using only 14% of the disk, so 480GB available on the SSD is enough to transfer all the data:
And I guess TRIM is enable by default when using ZFS, right?
Well, any step-by-step help would be very much appreciated, thank you guys!
I've been using FreeBSD for some time now and I love it, but when it comes to ZFS I am a total n00b and I don't want to risk
losing all my work, so here is my question:
What is the most hassle-free and safe way to migrate my current data from 1TB HDD (ada0) to a smaller sized SSD I just bought,
attached to the same machine on another SATA port, using ZFS commands (not via dd or external cloning software)?
What I really mean is to transfer all data from HDD to the SSD and then remove the HDD from the PC (maybe reusing it to store snapshots and backups only) and
have the SSD as my shiny new ada0.
I am using FreeBSD 12.0-RELEASE-p7 and the zpool is the default RootOnZFS from FreeBSD installation, as follows:
Code:
:~ % zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot-alpha 259G 632G 96K /zroot-alpha
zroot-alpha/ROOT 105G 632G 96K none
zroot-alpha/ROOT/default 105G 632G 105G /
zroot-alpha/tmp 15.1M 632G 15.1M /tmp
zroot-alpha/usr 153G 632G 96K /usr
zroot-alpha/usr/home 119G 632G 119G /usr/home
zroot-alpha/usr/ports 33.7G 632G 33.7G /usr/ports
zroot-alpha/usr/src 96K 632G 96K none
zroot-alpha/var 594M 632G 96K /var
zroot-alpha/var/audit 96K 632G 96K /var/audit
zroot-alpha/var/crash 96K 632G 96K /var/crash
zroot-alpha/var/log 15M 632G 15M /var/log
zroot-alpha/var/mail 144K 632G 144K /var/mail
zroot-alpha/var/tmp 578M 632G 578M /var/tmp
Code:
:~ % gpart show
=> 40 1953525088 ada0 GPT (932G)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 16777216 2 freebsd-swap (8.0G)
16779264 1936744448 3 freebsd-zfs (924G)
1953523712 1416 - free - (708K)
Currently using only 14% of the disk, so 480GB available on the SSD is enough to transfer all the data:
Code:
df -h
Filesystem Size Used Avail Capacity Mounted on
zroot-alpha/ROOT/default 737G 105G 632G 14% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ada2p1 144G 25G 107G 19% /BKP-DISK
procfs 4.0K 4.0K 0B 100% /proc
zroot-alpha/tmp 632G 15M 632G 0% /tmp
zroot-alpha/usr/home 751G 119G 632G 16% /usr/home
zroot-alpha/usr/ports 666G 34G 632G 5% /usr/ports
zroot-alpha/var/audit 632G 96K 632G 0% /var/audit
zroot-alpha/var/crash 632G 96K 632G 0% /var/crash
zroot-alpha/var/log 632G 15M 632G 0% /var/log
zroot-alpha/var/mail 632G 144K 632G 0% /var/mail
zroot-alpha/var/tmp 632G 578M 632G 0% /var/tmp
zroot-alpha 632G 96K 632G 0% /zroot-alpha
fdescfs 1.0K 1.0K 0B 100% /dev/fd
/dev/fuse 0B 0B 0B 100% /var/run/user/1001/gvfs
And I guess TRIM is enable by default when using ZFS, right?
Well, any step-by-step help would be very much appreciated, thank you guys!