bhyve VM stopped to boot after moving virtio disks

Matthias Apitz guru at unixarea.de
Sat Apr 20 20:31:56 UTC 2019


El día sábado, abril 20, 2019 a las 10:56:45a. m. -0600, Ian Lepore escribió:

> > no it wasn't. but dd doesn't truncate last block. checked - it got
> > copied 
> > till the end - i see second copy of GPT partition table that was
> > present 
> > in VM.
> > 
> 
> dd absolutely will fail to copy the last block of the source if it
> isn't exactly the blocksize and you didn't specify conv=sync, and it
> will return a zero status when doing so.  It appears you've convinced
> yourself otherwise, but for anyone else reading this thread, be aware:
> conv=sync is required to copy the last part of the source if it's
> smaller than the blocksize.

Writing to a plain file or char device, will write the last block in the
available size of bytes:

$ truss dd if=backupKDE-20190419.tgz of=/dev/null bs=8m
...
read(3,"\M^_\M^_\M^Wi\M-F\^?\n\M-J\M-%T"...,8388608) = 8388608 (0x800000)
write(4,"\M^_\M^_\M^Wi\M-F\^?\n\M-J\M-%T"...,8388608) = 8388608 (0x800000)
read(3,"%\M-b\M^Y!\M^Ud\M^B\\\M^BA \^^"...,8388608) = 8169189 (0x7ca6e5)
                                                      ^^^^^^^
read(3,0x8015cb065,8388608)			 = 0 (0x0)
write(4,"%\M-b\M^Y!\M^Ud\M^B\\\M^BA \^^"...,8169189) = 8169189 (0x7ca6e5)
                                                       ^^^^^^^
close(4)					 = 0 (0x0)
clock_getres(0x4,0x7fffffffe3c8)		 = 0 (0x0)
20+1 records in
20+1 records out
write(2,"20+1 records in\n20+1 records ou"...,33) = 33 (0x21)


	matthias
-- 
Matthias Apitz, ✉ guru at unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
N € I N zur EU!
"Gegen das EU-Europa der Banken, Konzerne und Kriegstreiber.
Für ein soziales und friedliches Europa der Völker." DKP


More information about the freebsd-hackers mailing list