From owner-freebsd-hackers@freebsd.org Sat Apr 20 20:31:55 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8243157521F for ; Sat, 20 Apr 2019 20:31:55 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3146670D7E for ; Sat, 20 Apr 2019 20:31:53 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from [188.174.55.23] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1hHweH-0004Bd-Gb for freebsd-hackers@freebsd.org; Sat, 20 Apr 2019 22:31:45 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.unixarea.de (8.15.2/8.14.9) with ESMTPS id x3KKViOS003495 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Sat, 20 Apr 2019 22:31:44 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.15.2/8.14.9/Submit) id x3KKVi58003494 for freebsd-hackers@freebsd.org; Sat, 20 Apr 2019 22:31:44 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Sat, 20 Apr 2019 22:31:44 +0200 From: Matthias Apitz To: freebsd-hackers@freebsd.org Subject: Re: bhyve VM stopped to boot after moving virtio disks Message-ID: <20190420203144.GA3390@c720-r342378> Reply-To: Matthias Apitz Mail-Followup-To: freebsd-hackers@freebsd.org References: <2006ff8da153bbe5e7f620da9260ee1518bd248f.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 13.0-CURRENT r342378 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. User-Agent: Mutt/1.11.1 (2018-12-01) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.55.23 X-Rspamd-Queue-Id: 3146670D7E X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.71 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[guru@unixarea.de]; HAS_XOIP(0.00)[]; IP_SCORE(-3.10)[ip: (-8.94), ipnet: 178.254.0.0/19(-3.65), asn: 42730(-2.90), country: DE(-0.01)]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[mail.unixarea.de]; NEURAL_HAM_SHORT(-0.91)[-0.906,0]; RECEIVED_SPAMHAUS_PBL(0.00)[23.55.174.188.zen.spamhaus.org : 127.0.0.10]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:42730, ipnet:178.254.0.0/19, country:DE]; RCVD_IN_DNSWL_LOW(-0.10)[101.4.254.178.list.dnswl.org : 127.0.5.1]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[unixarea.de]; R_SPF_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Apr 2019 20:31:56 -0000 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@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