From owner-freebsd-xen@freebsd.org Tue Mar 1 10:38:13 2016 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2591FABEECE for ; Tue, 1 Mar 2016 10:38:13 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB96D1A04 for ; Tue, 1 Mar 2016 10:38:12 +0000 (UTC) (envelope-from gustau.perez@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id l68so27049371wml.1 for ; Tue, 01 Mar 2016 02:38:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=ZgAe9iXn95GoG3DsLxHgg7hptbQnCXxwHKMNGru4Sv0=; b=IERSUo5JzZdGV3Ox8/walzeCQyvJfebgUcUVlxXV3u+m1zSjyZFMNniEepPA1NpKwF GpWeIWZYtkRC9CPGPuELNt8e2P1w9BCCjHHcbirxG1jDdEpAnfAGHhfSXPM6RzpUFHy3 TR75WXo+m70bStDtdUXe6SbDHHXdRJIvKtKkTzJirBqgfMqpn6VDD3I56xz0KvV26I/q Beee/M51QVn/lAAQ8N4LqmjG/8QgcYSszOKk54neS/C+MCj+E3+J7g5WTLUgxW7JKs97 sJ/eaxXGUSD+gNzzUucWG9UnQjZM1XVlODnQPe4UMZm2jbC50r94HaM7fhBzPQCL+T6K tjbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ZgAe9iXn95GoG3DsLxHgg7hptbQnCXxwHKMNGru4Sv0=; b=EkBHVs9hZp9VunZh8r5R2hRnD6fbMGmO4/S62ZLpF3njP+hfLVfJTWfV53ql8sBjoQ Uwx6PZ6oAVc8uRyYmRuTq+aFcUKCR/fCHAZ8rQCYWHwUiE/i2VCc5F/u1N2fD+diYSi/ XGP10NMLqQ7zLjUog9BuzUgo8Y7oFaGxt4SViI2exR5o7P/gEtybfFkQZYeQeE+RHPMh wpY3NGLXKZ27YbHM193OmdQzlKNWnNFA20t76cWdpaw7fsELlc9R93LwpiJlDSr7lSHM fEcH3galqpwLaA2dd0pRssP4lZHPBG29YqO/2qTRBqvk38fJnUf1p8mjnuk8CmrzSIyl 07Nw== X-Gm-Message-State: AD7BkJIrUS8su/19m0mZGnrr75cz9v6EqFJmwUm3memOdREUMnYgKNT+BN85TQ/Ai7uyQA== X-Received: by 10.28.130.6 with SMTP id e6mr2948865wmd.71.1456828691140; Tue, 01 Mar 2016 02:38:11 -0800 (PST) Received: from [10.0.2.151] ([147.83.40.10]) by smtp.googlemail.com with ESMTPSA id n131sm20671901wmf.9.2016.03.01.02.38.09 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Mar 2016 02:38:10 -0800 (PST) Subject: Re: Porting the block-iscsi hotplug script To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , FreeBSD XEN References: <553DEB97.5000300@entel.upc.edu> <5540A053.4080409@entel.upc.edu> <5540F3FC.80606@citrix.com> <5541FC8A.8080009@citrix.com> <5542365D.10403@entel.upc.edu> <55423ECD.6000404@citrix.com> <5556F21D.2050005@entel.upc.edu> <555EEFBA.5080902@citrix.com> <555EF542.3090002@citrix.com> <555F9B3F.1000600@entel.upc.edu> <55602512.1090702@citrix.com> <56C6FA2F.8040900@gmail.com> <56CAC8CB.8030107@gmail.com> <56CADEDA.4050007@citrix.com> <56CB0057.1060509@gmail.com> <56CB041E.1020009@citrix.com> <56CB2D90.5080809@gmail.com> <56CB34BA.6060809@citrix.com> <56CC24BD.6050609@gmail.com> <56CC32E5.5010101@citrix.com> <56CC7637.3080408@gmail.com> <56CF5668.6090605@citrix.com> <56D0091F.80408@gmail.com> <56D02863.7040100@citrix.com> <56D03D95.9090509@gmail.com> <56D04E5F.8070901@citrix.com> <56D42A28.8050701@gmail.com> <56D434FC.8030905@citrix.com> From: =?UTF-8?Q?Gustau_P=c3=a9rez?= X-Enigmail-Draft-Status: N1110 Message-ID: <56D57110.2060406@gmail.com> Date: Tue, 1 Mar 2016 11:38:09 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D434FC.8030905@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2016 10:38:13 -0000 El 29/02/16 a les 13:09, Roger Pau Monné ha escrit: > As we spoke previously, HVM domains don't support hotplug scripts. Or > are you trying to get them to work? (ie: you have performed other > changes in order to enable this?) You're completely right about the HVM domain support for hotpluging. The thing, when I first tried xen to see if it was stable, I did the test with an HVM domain and xen complained about the block script not being available. So I assumed that even the domain was an HVM, the hotplug was being called. >> * I see the device has a type (phy, file, iscsi) in the definition of >> the domain, but I'm not sure how to check its type in the block >> script (I can check if the file is a block device or a regular file, >> but what about iscsi?, check if the target param is set?) > This is confusing, and refers to the backend that's used to handle the > disk. In your case backend in always 'phy', which means blkback. The > 'phy' backend is the only one that supports hotplug scripts. > > In the past, some prefixes (like iscsi) where shortcuts for block > scripts, so the line: > > iscsi: > > Was equivalent to: > > script=block-iscsi,target= > > This is not recommended anymore, so just forget about the prefixes. Thank you for the explanation. I would said to me this may some some love, but perhaps I'm wrong. >> * Also. I have a domain defined with two disks. In the block script I >> try to execute xenstore-ls and I'd expect to see two disks there, >> but there's only the first one. I assume this is because the block >> script is called for each disk in the domain definition > Yes, the block script is called for each disk, the first argument (the > xenstore backend path) is going to be different for each invocation. I'd assume this would lead to two different branches (or paths) in the xenstore tree. > >> Finally, I ended having a disk defined in the xenstore >> (/var/db/xenstore) which I can't remove. I removed xen-tools and removed >> /var/db/xen{store} but it keeps complaining. I'd have expected that the >> store was under /var/db/ but perhaps I'm missing something. > Weird, you should be able to remove the disk entries in xenstore by > using xenstore-rm . Rebooting the host will also > completely clear the xenstore database. Can you paste the error message > that you are seeing? > I tried deleting the xen-tools package and then deleting /var/db/xen*. After that I rebooted (there was two xenstore processes, I'd say one is the kernel side process and the other the user space process, whose binary is installed by the xen-tools port). Finally I installed the xen-tools. But the error remains. The error can be found at [1]. I know this is an HVM domain, but I would say those are two completely unrelated problems. Thanks for your support, Gustau [1] http://pastebin.com/2xa2g0wx