public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-manager master v1 1/2] fix #6652: ceph: osd: enable autoactivation for OSD LVs on creation
Date: Wed, 13 Aug 2025 09:48:51 +0200	[thread overview]
Message-ID: <1755071263.mdzx9t83o2.astroid@yuna.none> (raw)
In-Reply-To: <20250812164631.428424-2-m.carrara@proxmox.com>

On August 12, 2025 6:46 pm, Max R. Carrara wrote:
> ... by directly calling lvcreate instead of using the LVM storage
> plugin's helper sub.
> 
> Autoactivation is required for LVs used by Ceph OSDs, as Ceph
> otherwise doesn't activate them by itself.
> 
> This is a regression from f296ffc4e4d in pve-storage [0].
> 
> [0]: https://git.proxmox.com/?p=pve-storage.git;a=commitdiff;h=f296ffc4e4d64b574c3001dc7cc6af3da1406441
> 
> Fixes: #6652
> Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
> ---
>  PVE/API2/Ceph/OSD.pm | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
> index 23e187ce..4801f8dd 100644
> --- a/PVE/API2/Ceph/OSD.pm
> +++ b/PVE/API2/Ceph/OSD.pm
> @@ -443,7 +443,25 @@ __PACKAGE__->register_method({
>                  my $lv = $type . "-" . UUID::uuid();
>  
>                  PVE::Storage::LVMPlugin::lvm_create_volume_group($dev->{devpath}, $vg);
> -                PVE::Storage::LVMPlugin::lvcreate($vg, $lv, "${size}k");
> +
> +                my $cmd = [
> +                    '/sbin/lvcreate',
> +                    '-aly',
> +                    '-Wy',
> +                    '--yes',
> +                    '--size',
> +                    # size in kilobytes
> +                    $size . "k",
> +                    '--name',
> +                    $lv,
> +                    # explicitly enable autoactivation,
> +                    # otherwise ceph-volume cannot bring the LV online
> +                    '--setautoactivation',
> +                    'y',
> +                    $vg,
> +                ];
> +
> +                run_command($cmd, errmsg => "lvcreate '$vg/$lv' error");

there's a second call to PVE::Storage::LVMPlugin::lvcreate a few lines
below, is that not also problematic?

>  
>                  if (PVE::Diskmanage::is_partition($dev->{devpath})) {
>                      eval { PVE::Diskmanage::change_parttype($dev->{devpath}, '8E00'); };
> -- 
> 2.47.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2025-08-13  7:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-12 16:46 [pve-devel] [PATCH pve-manager master v1 0/2] Fix #6652: LVM Autoactivation Missing for Ceph OSD LVs Max R. Carrara
2025-08-12 16:46 ` [pve-devel] [PATCH pve-manager master v1 1/2] fix #6652: ceph: osd: enable autoactivation for OSD LVs on creation Max R. Carrara
2025-08-13  7:48   ` Fabian Grünbichler [this message]
2025-08-13  8:28     ` Max R. Carrara
2025-08-12 16:46 ` [pve-devel] [PATCH pve-manager master v1 2/2] fix #6652: d/postinst: enable autoactivation for Ceph OSD LVs Max R. Carrara
2025-08-13  7:52   ` Fabian Grünbichler
2025-08-13  8:50     ` Max R. Carrara
2025-08-13  9:01       ` Friedrich Weber
2025-08-13  9:02       ` Fabian Grünbichler
2025-08-13  9:40         ` Max R. Carrara
2025-08-13 10:05           ` Fabian Grünbichler
2025-08-13 13:43 ` [pve-devel] superseded: [PATCH pve-manager master v1 0/2] Fix #6652: LVM Autoactivation Missing " Max R. Carrara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1755071263.mdzx9t83o2.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal