I would like to migrate a virtual machine's filesystem onto a smaller virtual disk using dump(8).
I have tried both using the 12.1-RELEASE installer in live CD mode, and also attaching the disks to a separate VM running 12.0-RELEASE, but dump(8) keeps failing on me with "unknown file system".
I try to follow the steps mentioned in the disk FAQ here: https://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#idp48962936
Both filesystems are created using
The source partition (/mnt/old) seems to be mounted correctly:
However, I keep getting this error:
Adding
What am I doing wrong? I'm pretty sure I have used dump(8) for this purpose in the past, but I might be wrong.
Should I be using dump(8) on the unmounted raw partition (i.e. /dev/vtbd1p2) instead?
I have tried both using the 12.1-RELEASE installer in live CD mode, and also attaching the disks to a separate VM running 12.0-RELEASE, but dump(8) keeps failing on me with "unknown file system".
I try to follow the steps mentioned in the disk FAQ here: https://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#idp48962936
Both filesystems are created using
newfs -U
, i.e. soft-updates without journaling (I have double-checked using tunefs(8)), and I mount them onto mountpoints under /mnt with the options rw,noatime
:
Code:
# mount -t ufs -o rw,noatime /dev/vtbd1p2 /mnt/old
# mount -t ufs -o rw,noatime /dev/vtbd2p2 /mnt/new
The source partition (/mnt/old) seems to be mounted correctly:
Code:
# df -h /mnt/old
Filesystem Size Used Avail Capacity Mounted on
/dev/vtbd1p2 54G 22G 28G 43% /mnt/old
Code:
# mount | grep old
/dev/vtbd1p2 on /mnt/old (ufs, local, noatime, soft-updates)
However, I keep getting this error:
Code:
# cd /mnt/new
# dump 0af - /mnt/old/ | restore rf -
dump: /mnt/old/: unknown file system
Tape is not a dump tape
Adding
-L
does not make a difference, it just tells me that it cannot be used on an unmounted filesystem:
Code:
# dump 0aLf - /mnt/old/ | restore rf -
DUMP: WARNING: Cannot use -L on an unmounted filesystem.
dump: /mnt/old/: unknown file system
Tape is not a dump tape
What am I doing wrong? I'm pretty sure I have used dump(8) for this purpose in the past, but I might be wrong.
Should I be using dump(8) on the unmounted raw partition (i.e. /dev/vtbd1p2) instead?