Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2305578F4A for ; Thu, 13 Mar 2025 06:31:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741847494; cv=none; b=blnwSn72s0X/eF9ohCZ2xsbFPCF19ld4KB0z9PSTDQMG74QFxQxGhAqyzdurP+ISUWzTkDkc6HM8XD0gomTPr/ZAwCtCksVf6n3cl+W3MVTWLVXyuMw+0uUXjWLh/WKyqlJrFe8szim/dXweUx66eoTRneyAe4uo6Z/f/OM5BrM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741847494; c=relaxed/simple; bh=1xLpcIggQSo7bqaqVLehj+hI2B8yYRYjrST7ktFUSS8=; h=References:From:To:Cc:Subject:Date:In-reply-to:Message-ID: MIME-Version:Content-Type; b=lDS5A2kZ45pEWNM7+S+AurNe1zKJUT4jJjAKFscjsGJm/JvKY69mQ0hu55x+LfEipTdqEmYXmasmH5CdTteISMabtK3BZsQiee4PVkylo0AqbV3xaZeOgvZDAxxTZrITIN9Kdo7rEKvPIffcqHwkYZXbyYqv9coDTKtFcPEQrac= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OVEIkc6j; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OVEIkc6j" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20087C4CEDD; Thu, 13 Mar 2025 06:31:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741847493; bh=1xLpcIggQSo7bqaqVLehj+hI2B8yYRYjrST7ktFUSS8=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=OVEIkc6jKyrtsq4h7lKXGBYwQ/LNVN1OROXwC0XaoPr7+QwzsEIesCTDdPdN+t2JY 1J+QPMp1HptVFKc4mnl/2099fVi8Dh6TZP9unympdGHzxXcrPb0rUeCkDP/BN6YMDU ggLeadDWTt2At4YqHHL7Mhjuxgy9fda8G+I4dzQW0tRTLwHOgJQBT2sq2mc9BCRJUK fdvI/iEB4EhN73273iUPUe4naC2GOOt6O9Lilc3rMckCXkkA+PrNhHmEfoyQvTBvy+ ivPSL41c5kt0svpqN0J1CYzZ0RphoeNskFNOdWguRojm82W4QtLqbIF4g2wyT9WXMN TRaRHXRbHsP6g== References: <20250310141813.969325-1-cel@kernel.org> <20250310141813.969325-13-cel@kernel.org> User-agent: mu4e 1.10.8; emacs 29.2 From: Chandan Babu R To: cel@kernel.org Cc: Luis Chamberlain , Jeff Layton , kdevops@lists.linux.dev, Chuck Lever Subject: Re: [PATCH v1 12/13] volume_group: Create a volume group on OCI nodes Date: Thu, 13 Mar 2025 11:59:31 +0530 In-reply-to: <20250310141813.969325-13-cel@kernel.org> Message-ID: <875xkd7876.fsf@debian-BULLSEYE-live-builder-AMD64> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, Mar 10, 2025 at 10:18:12 AM -0400, cel@kernel.org wrote: > From: Chuck Lever > > On storage nodes (eg., nfsd, iscsi, smbd), pick up the extra block > volumes, avoiding the root and data devices, and toss them into an > volume group to use for shared storage. Looks good to me. Reviewed-by: Chandan Babu R > > Signed-off-by: Chuck Lever > --- > .../volume_group/tasks/terraform/oci.yml | 38 +++++++++++++++++++ > 1 file changed, 38 insertions(+) > create mode 100644 playbooks/roles/volume_group/tasks/terraform/oci.yml > > diff --git a/playbooks/roles/volume_group/tasks/terraform/oci.yml b/playbooks/roles/volume_group/tasks/terraform/oci.yml > new file mode 100644 > index 000000000000..219e3d7edbfd > --- /dev/null > +++ b/playbooks/roles/volume_group/tasks/terraform/oci.yml > @@ -0,0 +1,38 @@ > +--- > +# > +# To guarantee idempotency, these steps have to generate the exact > +# same physical_volumes list every time they are run. > +# > +# Skip the block device on which the root filesystem resides, and > +# skip the device that is to be used for /data. These devices all > +# show up under /dev/oracleoci/ . > +# > + > +- name: Detect the root device > + ansible.builtin.stat: > + path: "/dev/oracleoci/oraclevda" > + register: stat_output > + > +- name: Save the name of the root device > + ansible.builtin.set_fact: > + instance_root_device: "{{ stat_output.stat.lnk_source.split('/dev/').1 }}" > + > +- name: Detect the data device > + ansible.builtin.stat: > + path: "{{ data_device }}" > + register: stat_output > + > +- name: Save the name of the data device > + ansible.builtin.set_fact: > + instance_data_device: "{{ stat_output.stat.lnk_source.split('/dev/').1 }}" > + > +- name: Add unused extra volumes to the volume list > + ansible.builtin.set_fact: > + physical_volumes: "{{ physical_volumes + ['/dev/' + item.key] }}" > + when: > + - item.value.model == "BlockVolume" > + - item.key != instance_root_device > + - item.key != instance_data_device > + loop_control: > + label: "Adding block device: /dev/{{ item.key }}" > + with_dict: "{{ ansible_devices }}" -- Chandan