<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Sysadmin | A DevOps Blog</title><link>https://blog.bsdserver.nl/tag/sysadmin/</link><description>Hands-on DevOps and homelab content: Kubernetes clusters, self-hosted services, CI/CD pipelines and infrastructure as code, by Patrick de Ruiter of We Build Your Cloud.</description><language>en</language><image><url>https://blog.bsdserver.nl/images/app-icon.svg</url><title>A DevOps Blog</title><link>https://blog.bsdserver.nl/</link></image><lastBuildDate>Wed, 18 Nov 2026 09:00:00 +0100</lastBuildDate><atom:link href="https://blog.bsdserver.nl/tag/sysadmin/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title>Mastering Physical Volumes and Volume groups</title><link>https://blog.bsdserver.nl/mastering-physical-volumes-and-volume-groups/</link><guid isPermaLink="false">6a5fb25718bfa60001dd6cbc</guid><dc:creator>Patrick de Ruiter</dc:creator><pubDate>Tue, 21 Jul 2026 17:56:44 +0000</pubDate><description>Running out of space on your Linux VM?</description><category>Linux</category><category>LVM</category><category>Storage</category><category>Sysadmin</category><media:content url="https://blog.bsdserver.nl/content/images/2026/07/mastering-lvm-1.png" medium="image"/><content:encoded><![CDATA[<p>Running out of space on your Linux VM? LVM (Logical Volume Manager) and VMware vSphere make disk resizing straightforward, even when an entire unpartitioned disk is part of a volume group.</p>
<p>This post covers the everyday physical volume (PV) and volume group (VG) tasks: growing a disk, adding one, migrating data to a new disk, backing up VG metadata, and moving, cloning, splitting and checking volume groups. Each scenario says when you need it, then shows the commands.</p>
<h2 id="which-scenario-do-you-need">Which scenario do you need? <a class="anchor" data-pagefind-ignore href="#which-scenario-do-you-need" aria-label="Link to this section">#</a></h2>
<table>
	<thead>
			<tr>
					<th>Scenario</th>
					<th>Use it when</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><a href="#resizing-an-lvm-disk-in-vsphere">Resize a whole-disk PV</a></td>
					<td>You made a VMDK bigger and the PV sits on the raw disk.</td>
			</tr>
			<tr>
					<td><a href="#scenario-expanding-a-partition-backed-pv-with-parted">Resize a partition-backed PV</a></td>
					<td>You made a VMDK bigger and the PV sits on a partition (<code>sdb1</code>).</td>
			</tr>
			<tr>
					<td><a href="#scenario-adding-a-larger-pv-and-migrating-data">Add a larger PV and migrate data</a></td>
					<td>You want to replace old disks with one new disk, online.</td>
			</tr>
			<tr>
					<td><a href="#scenario-backing-up-and-restoring-volume-group-configuration">Back up and restore VG metadata</a></td>
					<td>Before risky changes, or to undo an accidental one.</td>
			</tr>
			<tr>
					<td><a href="#scenario-moving-lvm-pvs-from-one-machine-to-another">Move PVs to another machine</a></td>
					<td>LUNs or disks move to a different server.</td>
			</tr>
			<tr>
					<td><a href="#scenario-using-vgimportclone-for-cloned-volume-groups">vgimportclone</a></td>
					<td>A cloned disk has the same VG name and UUIDs as the original.</td>
			</tr>
			<tr>
					<td><a href="#scenario-using-vgimportdevices-for-importing-volume-groups-from-specific-devices">vgimportdevices</a></td>
					<td>The system uses the LVM devices file and must use a VG&rsquo;s disks.</td>
			</tr>
			<tr>
					<td><a href="#scenario-splitting-a-volume-group-with-vgsplit">vgsplit</a></td>
					<td>Some LVs should become their own VG.</td>
			</tr>
			<tr>
					<td><a href="#scenario-checking-volume-group-metadata-with-vgck">vgck</a></td>
					<td>You suspect damaged VG metadata.</td>
			</tr>
	</tbody>
</table>
<h2 id="whole-disk-or-partition-as-pv">Whole disk or partition as PV? <a class="anchor" data-pagefind-ignore href="#whole-disk-or-partition-as-pv" aria-label="Link to this section">#</a></h2>
<p>You can add either a partition or an entire disk to a VG. Adding the unpartitioned disk skips the partitioning step entirely, which makes growing it simpler.</p>
<table>
	<thead>
			<tr>
					<th></th>
					<th>Whole disk (<code>/dev/sdb</code>)</th>
					<th>Partition (<code>/dev/sdb1</code>)</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Growing</td>
					<td>Rescan + <code>pvresize</code></td>
					<td>Rescan + grow partition + <code>pvresize</code></td>
			</tr>
			<tr>
					<td>Space use</td>
					<td>Whole disk, no partition boundaries</td>
					<td>Up to the partition end</td>
			</tr>
			<tr>
					<td>Portability</td>
					<td>Other systems and tools may not recognise a disk without a partition table</td>
					<td>Recognised everywhere</td>
			</tr>
			<tr>
					<td>Backup/recovery tools</td>
					<td>May expect a partition table</td>
					<td>Work as expected</td>
			</tr>
			<tr>
					<td>OS disk</td>
					<td>Not usable, data disks only</td>
					<td>Usable</td>
			</tr>
	</tbody>
</table>
<h3 id="when-to-use-which">When to use which <a class="anchor" data-pagefind-ignore href="#when-to-use-which" aria-label="Link to this section">#</a></h3>
<ul>
<li><strong>Whole disk</strong>: data disks used only by LVM on servers. Fewest steps.</li>
<li><strong>Partition</strong>: OS disks, or disks shared between purposes or environments.</li>
</ul>
<h2 id="resizing-an-lvm-disk-in-vsphere">Resizing an LVM disk in vSphere <a class="anchor" data-pagefind-ignore href="#resizing-an-lvm-disk-in-vsphere" aria-label="Link to this section">#</a></h2>
<p>The PV sits on the whole disk. After growing the VMDK, Linux and LVM each need to be told about the new size.</p>
<p>The flow: grow VMDK → rescan → <code>pvresize</code> → VG has free space → <code>lvresize -r</code> or <code>lvcreate</code>.</p>
<h3 id="step-1-resize-the-disk-in-vsphere">Step 1: Resize the disk in vSphere <a class="anchor" data-pagefind-ignore href="#step-1-resize-the-disk-in-vsphere" aria-label="Link to this section">#</a></h3>
<p>Increase the size of the disk in the VMware interface:</p>
<ol>
<li>Log in to the vSphere client or vCenter.</li>
<li>Locate the VM you want to resize.</li>
<li>Edit the VM settings and increase the size of the existing virtual disk (e.g., from 100GB to 200GB).</li>
<li>Save your changes.</li>
</ol>
<p>The VM now has a larger disk, but the operating system still needs to recognise and use the new space.</p>
<h3 id="step-2-rescan-the-disk-in-the-vm">Step 2: Rescan the disk in the VM <a class="anchor" data-pagefind-ignore href="#step-2-rescan-the-disk-in-the-vm" aria-label="Link to this section">#</a></h3>
<p>A SCSI rescan makes the kernel re-read the disk size, without a reboot:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="m">1</span> &gt; /sys/class/scsi_device/0:0:0:0/device/rescan
</span></span></code></pre></div><p>Replace <code>0:0:0:0</code> with the identifier (host:channel:target:LUN) of your disk. List them with:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ls /sys/class/scsi_device/
</span></span></code></pre></div><h3 id="step-3-verify-the-disk-size">Step 3: Verify the disk size <a class="anchor" data-pagefind-ignore href="#step-3-verify-the-disk-size" aria-label="Link to this section">#</a></h3>
<p>Check that the VM recognises the new size:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">lsblk
</span></span></code></pre></div><p>The output should show the increased capacity for your disk (e.g., <code>/dev/sdb</code>).</p>
<h3 id="step-4-extend-the-physical-volume-pv">Step 4: Extend the physical volume (PV) <a class="anchor" data-pagefind-ignore href="#step-4-extend-the-physical-volume-pv" aria-label="Link to this section">#</a></h3>
<p><code>pvresize</code> grows the PV to the new disk size, so the VG gets the extra space:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pvresize /dev/sdb
</span></span></code></pre></div><h3 id="step-5-alternative-add-a-brand-new-disk-to-the-volume-group">Step 5: (Alternative) Add a brand-new disk to the volume group <a class="anchor" data-pagefind-ignore href="#step-5-alternative-add-a-brand-new-disk-to-the-volume-group" aria-label="Link to this section">#</a></h3>
<p>If you added a completely new disk instead of growing one, <code>pvresize</code> does not apply. Initialise the new disk as a PV, then add it to the existing VG:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pvcreate /dev/sdb
</span></span><span class="line"><span class="cl">vgextend &lt;vg_name&gt; /dev/sdb
</span></span></code></pre></div><h3 id="step-6-verify-the-volume-group-vg-size">Step 6: Verify the volume group (VG) size <a class="anchor" data-pagefind-ignore href="#step-6-verify-the-volume-group-vg-size" aria-label="Link to this section">#</a></h3>
<p>Check that the extra space is available in the VG:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgdisplay
</span></span></code></pre></div><p>The &ldquo;Free PE / Size&rdquo; field shows the capacity available for allocation.</p>
<h3 id="step-7-expand-your-logical-volume-lv">Step 7: Expand your logical volume (LV) <a class="anchor" data-pagefind-ignore href="#step-7-expand-your-logical-volume-lv" aria-label="Link to this section">#</a></h3>
<p>Use the new space for a new LV, or grow an existing one.</p>
<table>
	<thead>
			<tr>
					<th>Option</th>
					<th>Use it for</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>lvcreate</code> + <code>mkfs</code></td>
					<td>A new filesystem, e.g. a separate mount for data.</td>
			</tr>
			<tr>
					<td><code>lvresize -r</code></td>
					<td>Growing an existing LV and its filesystem in one step.</td>
			</tr>
	</tbody>
</table>
<p><strong>Create a new LV</strong>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">lvcreate -L 100G -n new_lv my_volume_group
</span></span><span class="line"><span class="cl">mkfs.ext4 /dev/my_volume_group/new_lv  <span class="c1"># Formatting with a filesystem</span>
</span></span></code></pre></div><p><strong>Extend an existing LV</strong> (<code>-r</code> resizes the filesystem as well):</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">lvresize -r -L +100G /dev/my_volume_group/my_logical_volume  <span class="c1"># The -r switch automatically resizes the filesystem</span>
</span></span></code></pre></div><h2 id="scenario-expanding-a-partition-backed-pv-with-parted">Scenario: Expanding a partition-backed PV with parted <a class="anchor" data-pagefind-ignore href="#scenario-expanding-a-partition-backed-pv-with-parted" aria-label="Link to this section">#</a></h2>
<p>When the PV sits on a partition such as <code>/dev/sdb1</code>, growing the disk is not enough. LVM can only use the space that the partition exposes, so the partition must grow first.</p>
<ul>
<li>Modern kernels support growing a partition while it is in use, so this also works online without a reboot.</li>
<li>The flow: rescan → <code>parted resizepart</code> → <code>partprobe</code> (if needed) → <code>pvresize /dev/sdb1</code>.</li>
</ul>
<h3 id="step-1-rescan-and-verify-the-new-disk-size">Step 1: Rescan and verify the new disk size <a class="anchor" data-pagefind-ignore href="#step-1-rescan-and-verify-the-new-disk-size" aria-label="Link to this section">#</a></h3>
<p>Rescan the disk exactly as in steps 2 and 3 above. <code>lsblk</code> then shows the mismatch to fix:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">lsblk
</span></span><span class="line"><span class="cl">NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
</span></span><span class="line"><span class="cl">sdb      8:16   <span class="m">0</span>  200G  <span class="m">0</span> disk
</span></span><span class="line"><span class="cl">└─sdb1   8:17   <span class="m">0</span>  100G  <span class="m">0</span> part
</span></span></code></pre></div><p>The disk (<code>sdb</code>) is 200GB, but the partition (<code>sdb1</code>) is still 100GB.</p>
<h3 id="step-2-grow-the-partition-with-parted">Step 2: Grow the partition with parted <a class="anchor" data-pagefind-ignore href="#step-2-grow-the-partition-with-parted" aria-label="Link to this section">#</a></h3>
<p>Start <code>parted</code> on the disk (not the partition):</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">parted /dev/sdb
</span></span><span class="line"><span class="cl"><span class="o">(</span>parted<span class="o">)</span> print
</span></span></code></pre></div><p>If the disk uses GPT, <code>parted</code> may warn that not all of the disk space is in use and offer to fix it. Answer <code>Fix</code>: this moves the backup GPT header to the new end of the disk, which is required before you can extend the partition.</p>
<p>Now resize the partition. <code>resizepart</code> takes the partition number and the new end; <code>100%</code> means &ldquo;up to the end of the disk&rdquo;:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="o">(</span>parted<span class="o">)</span> resizepart <span class="m">1</span> 100%
</span></span><span class="line"><span class="cl"><span class="o">(</span>parted<span class="o">)</span> quit
</span></span></code></pre></div><ul>
<li>Older <code>parted</code> releases ask for confirmation when the partition is in use; answer <code>Yes</code>. Current versions (parted 3.6 on Ubuntu 24.04) grow an in-use partition without asking.</li>
<li>Growing is safe while online: the start of the partition does not move, so the data on it is untouched.</li>
</ul>
<blockquote>
<p><strong>Tip:</strong> If you have <code>cloud-utils</code> installed, <code>growpart /dev/sdb 1</code> does the same thing in a single non-interactive command, which is handy for automation with Ansible or cloud-init.</p>
</blockquote>
<h3 id="step-3-let-the-kernel-re-read-the-partition-table">Step 3: Let the kernel re-read the partition table <a class="anchor" data-pagefind-ignore href="#step-3-let-the-kernel-re-read-the-partition-table" aria-label="Link to this section">#</a></h3>
<p><code>parted</code> usually informs the kernel automatically. If <code>lsblk</code> still shows the old size, force a re-read:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">partprobe /dev/sdb
</span></span></code></pre></div><p><code>lsblk</code> should now show <code>sdb1</code> at the full 200GB.</p>
<h3 id="step-4-resize-the-physical-volume">Step 4: Resize the physical volume <a class="anchor" data-pagefind-ignore href="#step-4-resize-the-physical-volume" aria-label="Link to this section">#</a></h3>
<p>Tell LVM to claim the new space in the partition:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pvresize /dev/sdb1
</span></span></code></pre></div><p>Verify with <code>pvs</code> or <code>vgdisplay</code>: the &ldquo;Free PE / Size&rdquo; of the VG should have grown. Extend your LV as in Step 7 above with <code>lvresize -r</code>.</p>
<h2 id="scenario-adding-a-larger-pv-and-migrating-data">Scenario: Adding a larger PV and migrating data <a class="anchor" data-pagefind-ignore href="#scenario-adding-a-larger-pv-and-migrating-data" aria-label="Link to this section">#</a></h2>
<p><code>pvmove</code> moves the data from old PVs to a new one while the LVs stay in use. Use it to replace several small disks with one large disk, or to retire old disks.</p>
<p>The setup:</p>
<ul>
<li>Two existing PVs (PV1 and PV2), e.g. 100GB each.</li>
<li>A new PV (PV3), larger than PV1 and PV2 together, e.g. 250GB.</li>
<li>Goal: move all data to PV3, then remove PV1 and PV2 from the VG.</li>
</ul>
<p>The flow: <code>pvcreate</code> → <code>vgextend</code> → <code>pvmove</code> (per old PV) → <code>vgreduce</code> → <code>pvremove</code>.</p>
<h3 id="step-1-add-the-new-physical-volume">Step 1: Add the new physical volume <a class="anchor" data-pagefind-ignore href="#step-1-add-the-new-physical-volume" aria-label="Link to this section">#</a></h3>
<p>Add the new disk in vSphere and make it available to your VM. Initialise it as a PV:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pvcreate /dev/sdc  <span class="c1"># Assuming the new disk is /dev/sdc</span>
</span></span></code></pre></div><p>Add it to the volume group:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgextend my_volume_group /dev/sdc
</span></span></code></pre></div><h3 id="step-2-migrate-data-to-the-new-physical-volume">Step 2: Migrate data to the new physical volume <a class="anchor" data-pagefind-ignore href="#step-2-migrate-data-to-the-new-physical-volume" aria-label="Link to this section">#</a></h3>
<p><code>pvmove</code> moves all extents from the first PV to the second. It runs online; the LVs stay mounted:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pvmove /dev/sdb /dev/sdc
</span></span><span class="line"><span class="cl">pvmove /dev/sda /dev/sdc
</span></span></code></pre></div><p>This moves all extents from <code>/dev/sdb</code> and <code>/dev/sda</code> (the smaller PVs) to <code>/dev/sdc</code> (the new, larger PV).</p>
<h3 id="step-3-verify-the-migration">Step 3: Verify the migration <a class="anchor" data-pagefind-ignore href="#step-3-verify-the-migration" aria-label="Link to this section">#</a></h3>
<p>Check where the extents are now:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pvs
</span></span></code></pre></div><p><code>/dev/sdc</code> should now hold all the extents; <code>/dev/sda</code> and <code>/dev/sdb</code> should be empty (PFree equals PSize).</p>
<h3 id="step-4-remove-the-old-physical-volumes">Step 4: Remove the old physical volumes <a class="anchor" data-pagefind-ignore href="#step-4-remove-the-old-physical-volumes" aria-label="Link to this section">#</a></h3>
<p><code>vgreduce</code> removes the empty PVs from the volume group:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgreduce my_volume_group /dev/sda
</span></span><span class="line"><span class="cl">vgreduce my_volume_group /dev/sdb
</span></span></code></pre></div><p><code>pvremove</code> then wipes the LVM label, if you no longer need the disks:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pvremove /dev/sda
</span></span><span class="line"><span class="cl">pvremove /dev/sdb
</span></span></code></pre></div><h2 id="scenario-backing-up-and-restoring-volume-group-configuration">Scenario: Backing up and restoring volume group configuration <a class="anchor" data-pagefind-ignore href="#scenario-backing-up-and-restoring-volume-group-configuration" aria-label="Link to this section">#</a></h2>
<p>VG metadata describes which extents belong to which LV. Back it up before significant changes, such as moving PVs between machines or migrations.</p>
<table>
	<thead>
			<tr>
					<th>Command</th>
					<th>What it does</th>
					<th>When</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>vgcfgrestore</code></td>
					<td>Writes saved metadata back to the PVs</td>
					<td>Metadata damaged, or an unintended change (e.g. <code>lvremove</code>)</td>
			</tr>
			<tr>
					<td><code>vgcfgbackup</code></td>
					<td>Saves the current metadata to a file</td>
					<td>Before major changes</td>
			</tr>
	</tbody>
</table>
<h3 id="restoring-with-vgcfgrestore">Restoring with vgcfgrestore <a class="anchor" data-pagefind-ignore href="#restoring-with-vgcfgrestore" aria-label="Link to this section">#</a></h3>
<p>Deactivate the LVs first, then restore the VG&rsquo;s metadata from its backup file. With active LVs, <code>vgcfgrestore</code> refuses to continue unless you confirm:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgchange -an my_volume_group
</span></span><span class="line"><span class="cl">vgcfgrestore my_volume_group
</span></span></code></pre></div><p>LVM rewrites <code>/etc/lvm/backup/my_volume_group</code> automatically after every metadata change. After an unintended change, that file already contains the new state. Earlier versions are kept in <code>/etc/lvm/archive/</code>: list them and restore the one taken <em>before</em> the change:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgcfgrestore --list my_volume_group
</span></span><span class="line"><span class="cl">vgcfgrestore -f /etc/lvm/archive/my_volume_group_00011-1234567890.vg my_volume_group
</span></span></code></pre></div><h3 id="backing-up-with-vgcfgbackup">Backing up with vgcfgbackup <a class="anchor" data-pagefind-ignore href="#backing-up-with-vgcfgbackup" aria-label="Link to this section">#</a></h3>
<p><code>vgcfgbackup</code> saves the VG&rsquo;s metadata: its structure and the LVs in it. Run it before resizing, migration or removing PVs:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgcfgbackup my_volume_group
</span></span></code></pre></div><p>By default, this creates a backup file in <code>/etc/lvm/backup/</code>. You can also specify a custom path.</p>
<h3 id="best-practices">Best practices <a class="anchor" data-pagefind-ignore href="#best-practices" aria-label="Link to this section">#</a></h3>
<ul>
<li><strong>Back up before major changes</strong>: run <code>vgcfgbackup</code> before <code>pvmove</code>, <code>vgreduce</code> or even adding new PVs.</li>
<li><strong>Store backups off the machine</strong>: a backup on the failed disk does not help.</li>
<li><strong>Test restores</strong>: practise <code>vgcfgrestore</code> in a test environment before you need it in production.</li>
</ul>
<h2 id="scenario-moving-lvm-pvs-from-one-machine-to-another">Scenario: Moving LVM PVs from one machine to another <a class="anchor" data-pagefind-ignore href="#scenario-moving-lvm-pvs-from-one-machine-to-another" aria-label="Link to this section">#</a></h2>
<p>A VG can move to another server with its disks, for example two PVs on iSCSI LUNs. You export the VG on the old server and import it on the new one.</p>
<p>The flow: <code>umount</code> → <code>vgchange -an</code> → <code>vgexport</code> → move LUNs → <code>vgimport</code> → <code>vgchange -ay</code> → <code>mount</code>.</p>
<h3 id="step-1-unmount-the-logical-volumes">Step 1: Unmount the logical volumes <a class="anchor" data-pagefind-ignore href="#step-1-unmount-the-logical-volumes" aria-label="Link to this section">#</a></h3>
<p>Unmount every filesystem on the VG&rsquo;s logical volumes:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">umount /mnt/my_logical_volume
</span></span></code></pre></div><p>Repeat this for each mounted LV.</p>
<h3 id="step-2-deactivate-the-volume-group">Step 2: Deactivate the volume group <a class="anchor" data-pagefind-ignore href="#step-2-deactivate-the-volume-group" aria-label="Link to this section">#</a></h3>
<p>Deactivating removes the LV devices, so nothing can write to them during the move:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgchange -an my_volume_group
</span></span></code></pre></div><h3 id="step-3-export-the-volume-group">Step 3: Export the volume group <a class="anchor" data-pagefind-ignore href="#step-3-export-the-volume-group" aria-label="Link to this section">#</a></h3>
<p><code>vgexport</code> marks the VG as exported, so the old server no longer uses it and the destination can import it:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgexport my_volume_group
</span></span></code></pre></div><h3 id="step-4-move-the-iscsi-luns-to-the-destination-machine">Step 4: Move the iSCSI LUNs to the destination machine <a class="anchor" data-pagefind-ignore href="#step-4-move-the-iscsi-luns-to-the-destination-machine" aria-label="Link to this section">#</a></h3>
<p>Connect the destination machine to the iSCSI LUNs that hold the PVs. This depends on your iSCSI setup, but typically means logging in to the iSCSI target from the destination. See <a href="https://blog.bsdserver.nl/automating-iscsi-initiator-configuration-with-ansible/">Automating iSCSI Initiator Configuration with Ansible</a>.</p>
<h3 id="step-5-import-the-volume-group-on-the-destination-machine">Step 5: Import the volume group on the destination machine <a class="anchor" data-pagefind-ignore href="#step-5-import-the-volume-group-on-the-destination-machine" aria-label="Link to this section">#</a></h3>
<p>Once the LUNs are connected, import the VG:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgimport my_volume_group
</span></span></code></pre></div><h3 id="step-6-activate-the-volume-group">Step 6: Activate the volume group <a class="anchor" data-pagefind-ignore href="#step-6-activate-the-volume-group" aria-label="Link to this section">#</a></h3>
<p>Activation makes the LV devices available:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgchange -ay my_volume_group
</span></span></code></pre></div><h3 id="step-7-mount-the-logical-volumes">Step 7: Mount the logical volumes <a class="anchor" data-pagefind-ignore href="#step-7-mount-the-logical-volumes" aria-label="Link to this section">#</a></h3>
<p>Mount the LVs on their mount points:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mount /dev/my_volume_group/my_logical_volume /mnt/my_logical_volume
</span></span></code></pre></div><p>Repeat this for each LV. Add them to <code>/etc/fstab</code> on the new server if they must mount at boot.</p>
<h2 id="scenario-using-vgimportclone-for-cloned-volume-groups">Scenario: Using vgimportclone for cloned volume groups <a class="anchor" data-pagefind-ignore href="#scenario-using-vgimportclone-for-cloned-volume-groups" aria-label="Link to this section">#</a></h2>
<p>A cloned disk (a storage snapshot or a copied VMDK) has the same VG name and UUIDs as the original. When both are visible on one system, LVM cannot tell them apart. <code>vgimportclone</code> gives the clone new UUIDs and a new name.</p>
<h3 id="step-1-attach-the-cloned-disk">Step 1: Attach the cloned disk <a class="anchor" data-pagefind-ignore href="#step-1-attach-the-cloned-disk" aria-label="Link to this section">#</a></h3>
<p>Attach the cloned disk to the destination machine and check that the operating system recognises it.</p>
<h3 id="step-2-use-vgimportclone">Step 2: Use vgimportclone <a class="anchor" data-pagefind-ignore href="#step-2-use-vgimportclone" aria-label="Link to this section">#</a></h3>
<p>Import the cloned VG under a new name:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgimportclone -n new_volume_group_name /dev/sdX
</span></span></code></pre></div><p>Replace <code>/dev/sdX</code> with the cloned disk and <code>new_volume_group_name</code> with the new VG name.</p>
<h2 id="scenario-using-vgimportdevices-for-importing-volume-groups-from-specific-devices">Scenario: Using vgimportdevices for importing volume groups from specific devices <a class="anchor" data-pagefind-ignore href="#scenario-using-vgimportdevices-for-importing-volume-groups-from-specific-devices" aria-label="Link to this section">#</a></h2>
<p>On systems that use the LVM devices file (<code>/etc/lvm/devices/system.devices</code>, enabled by default on RHEL 9), LVM ignores every device that is not listed in it. <code>vgimportdevices</code> adds the devices of a volume group to that file.</p>
<p>Use it when:</p>
<ul>
<li>A system has multiple disks with different VGs.</li>
<li>LVM should only use the devices of the VGs you choose, to avoid conflicts with other setups.</li>
</ul>
<h3 id="step-1-list-available-devices">Step 1: List available devices <a class="anchor" data-pagefind-ignore href="#step-1-list-available-devices" aria-label="Link to this section">#</a></h3>
<p>See which PVs exist and which VG each belongs to:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pvs
</span></span></code></pre></div><h3 id="step-2-import-the-volume-groups-devices">Step 2: Import the volume group&rsquo;s devices <a class="anchor" data-pagefind-ignore href="#step-2-import-the-volume-groups-devices" aria-label="Link to this section">#</a></h3>
<p><code>vgimportdevices</code> takes VG names, not device names, and adds all PVs of that VG to the devices file:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgimportdevices my_volume_group
</span></span><span class="line"><span class="cl">lvmdevices
</span></span></code></pre></div><ul>
<li><code>lvmdevices</code> shows the resulting list.</li>
<li>Passing device paths (<code>vgimportdevices my_volume_group /dev/sdX</code>) fails with <code>Volume group &quot;sdX&quot; not found</code>.</li>
<li>On Debian and Ubuntu the command is only available as <code>lvm vgimportdevices</code>, and the devices file is disabled there by default (<code>use_devicesfile = 0</code>).</li>
</ul>
<h2 id="scenario-splitting-a-volume-group-with-vgsplit">Scenario: Splitting a volume group with vgsplit <a class="anchor" data-pagefind-ignore href="#scenario-splitting-a-volume-group-with-vgsplit" aria-label="Link to this section">#</a></h2>
<p><code>vgsplit</code> moves part of a VG into a new VG. Use it to prepare some LVs for a move to another machine, or when reorganising storage.</p>
<ul>
<li><code>vgsplit</code> moves whole PVs, so the LVs you split off must live on PVs of their own.</li>
<li>The LVs that move must be inactive.</li>
</ul>
<h3 id="step-1-verify-volume-group-and-logical-volumes">Step 1: Verify volume group and logical volumes <a class="anchor" data-pagefind-ignore href="#step-1-verify-volume-group-and-logical-volumes" aria-label="Link to this section">#</a></h3>
<p>Check the structure of the VG and list all LVs:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgdisplay my_volume_group
</span></span><span class="line"><span class="cl">lvdisplay
</span></span></code></pre></div><h3 id="step-2-split-the-volume-group">Step 2: Split the volume group <a class="anchor" data-pagefind-ignore href="#step-2-split-the-volume-group" aria-label="Link to this section">#</a></h3>
<p>Deactivate the LVs you want to move, then create a new VG from the PV(s) that hold them:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">lvchange -an my_volume_group/lv_name1 my_volume_group/lv_name2
</span></span><span class="line"><span class="cl">vgsplit my_volume_group new_volume_group /dev/sdX
</span></span></code></pre></div><p>Alternatively, name one LV and let <code>vgsplit</code> move the PVs it lives on. Any other LV on those PVs moves along with it:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgsplit -n lv_name1 my_volume_group new_volume_group
</span></span></code></pre></div><ul>
<li>Replace <code>new_volume_group</code> with the new VG name, <code>/dev/sdX</code> with the PV that holds the LVs, and <code>lv_name1</code>, <code>lv_name2</code> with the LVs you want to move.</li>
<li>Listing LV names as plain arguments does not work: <code>vgsplit</code> treats them as PV names and fails with <code>Physical volume lv_name1 not in volume group my_volume_group</code>.</li>
</ul>
<h3 id="step-3-verify-the-split">Step 3: Verify the split <a class="anchor" data-pagefind-ignore href="#step-3-verify-the-split" aria-label="Link to this section">#</a></h3>
<p>Check that both VGs exist and contain the expected LVs:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgdisplay
</span></span></code></pre></div><h2 id="scenario-checking-volume-group-metadata-with-vgck">Scenario: Checking volume group metadata with vgck <a class="anchor" data-pagefind-ignore href="#scenario-checking-volume-group-metadata-with-vgck" aria-label="Link to this section">#</a></h2>
<p><code>vgck</code> checks the consistency of the VG metadata. Use it when you suspect corruption, for example after a crash.</p>
<h3 id="step-1-run-vgck-on-the-volume-group">Step 1: Run vgck on the volume group <a class="anchor" data-pagefind-ignore href="#step-1-run-vgck-on-the-volume-group" aria-label="Link to this section">#</a></h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">vgck my_volume_group
</span></span></code></pre></div><p>Replace <code>my_volume_group</code> with the name of the VG to check.</p>
<h3 id="step-2-review-the-output">Step 2: Review the output <a class="anchor" data-pagefind-ignore href="#step-2-review-the-output" aria-label="Link to this section">#</a></h3>
<p><code>vgck</code> reports any inconsistencies it finds. If it finds problems, you may need <code>vgcfgrestore</code> (see above) or manual repair.</p>
<h3 id="when-to-use-vgck">When to use vgck <a class="anchor" data-pagefind-ignore href="#when-to-use-vgck" aria-label="Link to this section">#</a></h3>
<ul>
<li><strong>After a system crash</strong> or abrupt shutdown: check that the VG metadata is not corrupted.</li>
<li><strong>Before major operations</strong> like <code>pvmove</code> or <code>vgreduce</code>: make sure the VG is healthy first.</li>
</ul>
<h2 id="best-practices-for-disk-resizing-and-migration-in-vsphere">Best practices for disk resizing and migration in vSphere <a class="anchor" data-pagefind-ignore href="#best-practices-for-disk-resizing-and-migration-in-vsphere" aria-label="Link to this section">#</a></h2>
<ul>
<li><strong>Backup before operations</strong>: always have a recent backup before resizing or migrating data.</li>
<li><strong>Monitor performance</strong>: <code>pvmove</code> is I/O-intensive. Watch disk I/O and system performance, especially in production.</li>
<li><strong>Plan for slowdown</strong>: <code>pvmove</code> runs online, but expect reduced performance during the migration.</li>
</ul>
<h2 id="automate-it">Automate it <a class="anchor" data-pagefind-ignore href="#automate-it" aria-label="Link to this section">#</a></h2>
<p>The Ansible roles and Terraform code that build this setup are on GitHub: <a href="https://github.com/pderuiter/blog-lvm-pv-vg" rel="noopener">pderuiter/blog-lvm-pv-vg</a>. It creates a VM with three spare disks on Proxmox and automates the resize (rescan, growpart, pvresize), add-a-disk and pvmove migration scenarios, followed by <code>lvresize -r</code>; run <code>terraform apply</code> and then <code>ansible-playbook site.yml</code>.</p>
<h2 id="conclusion">Conclusion <a class="anchor" data-pagefind-ignore href="#conclusion" aria-label="Link to this section">#</a></h2>
<ul>
<li><strong>Whole-disk PVs</strong> are the simplest to grow: rescan and <code>pvresize</code>. Partitions add a <code>parted</code> or <code>growpart</code> step but are more portable.</li>
<li><strong><code>pvmove</code></strong> replaces disks online.</li>
<li><strong><code>vgexport</code> / <code>vgimport</code></strong> move a VG with its LUNs to another server; <code>vgimportclone</code> handles clones.</li>
<li><strong><code>vgcfgbackup</code>, <code>vgcfgrestore</code> and <code>vgck</code></strong> protect and check the metadata.</li>
</ul>
<p>For the basic add-a-disk procedure, see <a href="https://blog.bsdserver.nl/expanding-disk-space-on-lvm-a-step-by-step-guide/">Expanding Disk Space on LVM: A Step-by-Step Guide</a>.</p>
]]></content:encoded></item><item><title>Expand Disk Space on a VMware Linux VM Without Rebooting</title><link>https://blog.bsdserver.nl/expand-disk-space-on-a-vmware-linux-vm-without-rebooting/</link><guid isPermaLink="false">6981fa80bacee50001395b21</guid><dc:creator>Patrick de Ruiter</dc:creator><pubDate>Tue, 03 Feb 2026 13:50:38 +0000</pubDate><description>Say goodbye to downtime when you need more storage Running out of disk space on a production VM is stressful enough without the added headache of…</description><category>Linux</category><category>VMware</category><category>LVM</category><category>Sysadmin</category><media:content url="https://blog.bsdserver.nl/content/images/2026/02/resize-lvm-vmware.png" medium="image"/><content:encoded><![CDATA[<p>Running out of disk space on a production VM is stressful enough without scheduling a reboot as well. On VMware you can grow the virtual disk while the VM runs, but Linux keeps showing the old size.</p>
<p>This post walks through the whole process without a reboot: expand the VMDK in vSphere, make Linux recognise the new size, then grow the partition, LVM and filesystem.</p>
<h2 id="why-rescan-instead-of-reboot">Why rescan instead of reboot? <a class="anchor" data-pagefind-ignore href="#why-rescan-instead-of-reboot" aria-label="Link to this section">#</a></h2>
<p>When you grow a virtual disk, the hypervisor knows the new size immediately. The Linux guest does not: it still uses the size it read when the SCSI device was detected. A reboot re-reads it, but means downtime.</p>
<p>A SCSI rescan through <code>/sys</code> makes the kernel re-read the size of a running disk:</p>
<ul>
<li><strong>No downtime</strong>: the filesystem stays mounted and in use</li>
<li><strong>Seconds, not a maintenance window</strong></li>
<li><strong>Works for new disks too</strong>: a host rescan finds hot-added disks</li>
</ul>
<h3 id="when-to-use-it">When to use it <a class="anchor" data-pagefind-ignore href="#when-to-use-it" aria-label="Link to this section">#</a></h3>
<ul>
<li><strong>Use it</strong> to grow an existing disk or hot-add a new one on a running Linux VM.</li>
<li><strong>Skip it</strong> for shrinking. That needs different steps and carries more risk.</li>
</ul>
<h3 id="which-rescan">Which rescan? <a class="anchor" data-pagefind-ignore href="#which-rescan" aria-label="Link to this section">#</a></h3>
<table>
	<thead>
			<tr>
					<th>Situation</th>
					<th>What to rescan</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>You made an existing VMDK bigger</td>
					<td>The block device: <code>/sys/block/sdX/device/rescan</code></td>
			</tr>
			<tr>
					<td>You hot-added a new disk</td>
					<td>The SCSI host adapter: <code>/sys/class/scsi_host/hostN/scan</code></td>
			</tr>
	</tbody>
</table>
<h2 id="how-it-works">How it works <a class="anchor" data-pagefind-ignore href="#how-it-works" aria-label="Link to this section">#</a></h2>
<table>
	<thead>
			<tr>
					<th>Layer</th>
					<th>Tool</th>
					<th>Job</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Virtual disk (VMDK)</td>
					<td>vSphere Client</td>
					<td>Makes the disk bigger.</td>
			</tr>
			<tr>
					<td>Block device (<code>sda</code>)</td>
					<td><code>/sys</code> rescan</td>
					<td>Makes the kernel see the new size.</td>
			</tr>
			<tr>
					<td>Partition (<code>sda2</code>)</td>
					<td><code>growpart</code></td>
					<td>Grows the partition into the new space.</td>
			</tr>
			<tr>
					<td>LVM (if used)</td>
					<td><code>pvresize</code>, <code>lvextend</code></td>
					<td>Grows the PV, then the LV.</td>
			</tr>
			<tr>
					<td>Filesystem</td>
					<td><code>resize2fs</code> / <code>xfs_growfs</code></td>
					<td>Grows the filesystem into the bigger LV or partition.</td>
			</tr>
	</tbody>
</table>
<p>The flow: grow VMDK → rescan <code>sda</code> → <code>growpart</code> → <code>pvresize</code> → <code>lvextend</code> → <code>resize2fs</code> or <code>xfs_growfs</code> → <code>df -h</code> shows the space.</p>
<h2 id="the-scsi-rescan">The SCSI rescan <a class="anchor" data-pagefind-ignore href="#the-scsi-rescan" aria-label="Link to this section">#</a></h2>
<p>Linux lets you force the kernel to re-read disk information through the <code>/sys</code> filesystem. There are two scenarios.</p>
<h3 id="scenario-1-resizing-an-existing-disk">Scenario 1: Resizing an existing disk <a class="anchor" data-pagefind-ignore href="#scenario-1-resizing-an-existing-disk" aria-label="Link to this section">#</a></h3>
<p>After expanding an existing VMDK, tell that block device to refresh its size:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="m">1</span> &gt; /sys/block/sda/device/rescan
</span></span></code></pre></div><ul>
<li>Replace <code>sda</code> with your actual device name (e.g., <code>sdb</code>, <code>sdc</code>).</li>
<li>The kernel re-reads where the disk ends and updates its size.</li>
</ul>
<p>Run these commands from a root shell (<code>sudo -i</code>):</p>
<ul>
<li><code>sudo echo 1 &gt; /sys/block/sda/device/rescan</code> fails with &ldquo;Permission denied&rdquo;: the redirect is done by your own, unprivileged shell.</li>
<li>Use <code>echo 1 | sudo tee /sys/block/sda/device/rescan</code> instead.</li>
</ul>
<h3 id="scenario-2-adding-a-new-disk">Scenario 2: Adding a new disk <a class="anchor" data-pagefind-ignore href="#scenario-2-adding-a-new-disk" aria-label="Link to this section">#</a></h3>
<p>After hot-adding a completely new disk, scan the SCSI host adapter for new devices:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;- - -&#34;</span> &gt; /sys/class/scsi_host/host0/scan
</span></span></code></pre></div><p>The three dashes are wildcards for channel, target and LUN. Not sure which <code>hostN</code> the disk is on? Scan all adapters at once:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;- - -&#34;</span> <span class="p">|</span> tee /sys/class/scsi_host/*/scan
</span></span></code></pre></div><h2 id="step-by-step-expanding-an-existing-disk">Step-by-step: expanding an existing disk <a class="anchor" data-pagefind-ignore href="#step-by-step-expanding-an-existing-disk" aria-label="Link to this section">#</a></h2>
<p>The complete workflow for growing an existing disk on a running Linux VM.</p>
<h3 id="step-1-expand-the-vmdk-in-vsphere">Step 1: Expand the VMDK in vSphere <a class="anchor" data-pagefind-ignore href="#step-1-expand-the-vmdk-in-vsphere" aria-label="Link to this section">#</a></h3>
<ol>
<li>Open the vSphere Client</li>
<li>Right-click your VM and select <strong>Edit Settings</strong></li>
<li>Find the hard disk you want to expand</li>
<li>Increase the size to your desired capacity</li>
<li>Click <strong>OK</strong></li>
</ol>
<h3 id="step-2-rescan-the-disk-in-linux">Step 2: Rescan the disk in Linux <a class="anchor" data-pagefind-ignore href="#step-2-rescan-the-disk-in-linux" aria-label="Link to this section">#</a></h3>
<p>Identify which device belongs to the disk you grew:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">lsblk
</span></span></code></pre></div><p>Trigger a rescan on that device:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="m">1</span> &gt; /sys/block/sda/device/rescan
</span></span></code></pre></div><p>Verify the new size is detected. The disk size in the header should show the new value:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">fdisk -l /dev/sda
</span></span></code></pre></div><h3 id="step-3-expand-the-partition">Step 3: Expand the partition <a class="anchor" data-pagefind-ignore href="#step-3-expand-the-partition" aria-label="Link to this section">#</a></h3>
<p>The disk is bigger, but the partition still ends where it did. <code>growpart</code> (recommended) moves the end of a partition to the end of the disk, also while it is in use:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Install growpart if needed (part of cloud-utils-growpart package)</span>
</span></span><span class="line"><span class="cl">yum install cloud-utils-growpart   <span class="c1"># RHEL/CentOS</span>
</span></span><span class="line"><span class="cl">apt install cloud-guest-utils      <span class="c1"># Debian/Ubuntu</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Grow the partition (partition 2 in this example)</span>
</span></span><span class="line"><span class="cl">growpart /dev/sda <span class="m">2</span>
</span></span></code></pre></div><ul>
<li><code>growpart /dev/sda 2</code>: disk and partition number, separated by a space.</li>
<li>Skip this step if the filesystem or PV sits directly on the disk without a partition.</li>
</ul>
<h3 id="step-4-resize-the-filesystem-or-lvm">Step 4: Resize the filesystem or LVM <a class="anchor" data-pagefind-ignore href="#step-4-resize-the-filesystem-or-lvm" aria-label="Link to this section">#</a></h3>
<p>What comes next depends on what sits on the partition:</p>
<table>
	<thead>
			<tr>
					<th>On the partition</th>
					<th>Steps</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>LVM</td>
					<td><code>pvresize</code>, <code>lvextend</code>, then grow the filesystem</td>
			</tr>
			<tr>
					<td>ext4 directly</td>
					<td><code>resize2fs /dev/sda2</code></td>
			</tr>
			<tr>
					<td>XFS directly</td>
					<td><code>xfs_growfs /mountpoint</code></td>
			</tr>
	</tbody>
</table>
<p><strong>For LVM setups</strong>, resize the physical volume first, so the volume group sees the extra space:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pvresize /dev/sda2
</span></span></code></pre></div><p>Then give all free space to your logical volume:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">lvextend -l +100%FREE /dev/mapper/vg_name-lv_name
</span></span></code></pre></div><p><strong>For ext4 filesystems</strong>, grow the filesystem into the bigger LV or partition. Works while mounted:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">resize2fs /dev/mapper/vg_name-lv_name
</span></span><span class="line"><span class="cl"><span class="c1"># Or for a direct partition:</span>
</span></span><span class="line"><span class="cl">resize2fs /dev/sda2
</span></span></code></pre></div><p><strong>For XFS filesystems</strong> (common on RHEL/CentOS 7+). <code>xfs_growfs</code> takes the mount point, not the device:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">xfs_growfs /mountpoint
</span></span></code></pre></div><h3 id="step-5-verify-the-changes">Step 5: Verify the changes <a class="anchor" data-pagefind-ignore href="#step-5-verify-the-changes" aria-label="Link to this section">#</a></h3>
<p>Confirm everything worked:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">df -h
</span></span></code></pre></div><p>The filesystem should now report the expanded size.</p>
<h2 id="quick-reference-commands">Quick reference commands <a class="anchor" data-pagefind-ignore href="#quick-reference-commands" aria-label="Link to this section">#</a></h2>
<table>
	<thead>
			<tr>
					<th>Task</th>
					<th>Command</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Rescan existing disk</td>
					<td><code>echo 1 &gt; /sys/block/sdX/device/rescan</code></td>
			</tr>
			<tr>
					<td>Scan for new disks</td>
					<td><code>echo &quot;- - -&quot; | tee /sys/class/scsi_host/*/scan</code></td>
			</tr>
			<tr>
					<td>Grow partition</td>
					<td><code>growpart /dev/sdX N</code></td>
			</tr>
			<tr>
					<td>Resize LVM PV</td>
					<td><code>pvresize /dev/sdXN</code></td>
			</tr>
			<tr>
					<td>Extend LV</td>
					<td><code>lvextend -l +100%FREE /dev/vg/lv</code></td>
			</tr>
			<tr>
					<td>Resize ext4</td>
					<td><code>resize2fs /dev/path</code></td>
			</tr>
			<tr>
					<td>Resize XFS</td>
					<td><code>xfs_growfs /mountpoint</code></td>
			</tr>
	</tbody>
</table>
<h2 id="troubleshooting">Troubleshooting <a class="anchor" data-pagefind-ignore href="#troubleshooting" aria-label="Link to this section">#</a></h2>
<table>
	<thead>
			<tr>
					<th>Symptom</th>
					<th>Cause / fix</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>Permission denied</code> on the rescan</td>
					<td><code>sudo echo ... &gt;</code> runs the redirect without root. Use a root shell or <code>tee</code>.</td>
			</tr>
			<tr>
					<td><code>lsblk</code> still shows the old size</td>
					<td>Rescanned the wrong device. Check which <code>sdX</code> you grew.</td>
			</tr>
			<tr>
					<td>New disk does not appear</td>
					<td>Scanned the wrong host adapter. Scan all with <code>/sys/class/scsi_host/*/scan</code>.</td>
			</tr>
			<tr>
					<td><code>df</code> shows the old size</td>
					<td>Filesystem not grown yet. Run <code>resize2fs</code> or <code>xfs_growfs</code>.</td>
			</tr>
	</tbody>
</table>
<h2 id="important-caveats">Important caveats <a class="anchor" data-pagefind-ignore href="#important-caveats" aria-label="Link to this section">#</a></h2>
<ul>
<li><strong>Shrinking is different</strong>: this process is for <em>expanding</em> disks only.</li>
<li><strong>Backups first</strong>: always have a backup before modifying disk structures, even if the procedure is well-tested.</li>
<li><strong>VMware Tools</strong>: ensure VMware Tools is installed and running for best results.</li>
</ul>
<h2 id="automate-it">Automate it <a class="anchor" data-pagefind-ignore href="#automate-it" aria-label="Link to this section">#</a></h2>
<p>The Ansible roles and Terraform code that build this setup are on GitHub: <a href="https://github.com/pderuiter/blog-disk-expand-online" rel="noopener">pderuiter/blog-disk-expand-online</a>. It uses a Proxmox VM instead of vSphere (the rescan works the same), puts LVM on one data disk and XFS on another, and after you grow the disks with <code>terraform apply</code> the playbook does steps 2 to 4 (rescan, growpart, pvresize/lvextend, resize2fs or xfs_growfs) without a reboot; run <code>ansible-playbook site.yml</code>.</p>
<h2 id="conclusion">Conclusion <a class="anchor" data-pagefind-ignore href="#conclusion" aria-label="Link to this section">#</a></h2>
<p>Linux caches the disk size; the <code>/sys</code> rescan forces a refresh. Combine that with VMware&rsquo;s hot-expand and you grow storage on a running VM:</p>
<ol>
<li>Grow the VMDK</li>
<li>Rescan the device</li>
<li><code>growpart</code></li>
<li><code>pvresize</code> and <code>lvextend</code> (LVM only)</li>
<li>Grow the filesystem</li>
</ol>
<p>Adding a disk instead of growing one? See <a href="https://blog.bsdserver.nl/expanding-disk-space-on-lvm-a-step-by-step-guide/">Expanding Disk Space on LVM: A Step-by-Step Guide</a>.</p>
]]></content:encoded></item><item><title>Set Up Bind DNS for Catalog Zones</title><link>https://blog.bsdserver.nl/how-to-set-up-bind-dns-for-catalog-zones/</link><guid isPermaLink="false">693b500279eb54000160a446</guid><dc:creator>Patrick de Ruiter</dc:creator><pubDate>Thu, 11 Dec 2025 23:13:06 +0000</pubDate><description>Ever wondered how to manage thousands of slave zones in Bind?</description><category>DNS</category><category>BIND</category><category>Linux</category><category>Sysadmin</category><media:content url="https://blog.bsdserver.nl/content/images/2026/01/bind-catalog-zones.png" medium="image"/><content:encoded><![CDATA[<p>Ever wondered how to manage thousands of slave zones in Bind? A few slave zones are easy to maintain by hand. When you regularly add domains, every new zone means editing the configuration on every slave server.</p>
<p>ISC Bind&rsquo;s &ldquo;Catalog Zones&rdquo; solve that. The master publishes a special zone that lists all member zones; slaves read it and add or remove those zones on their own. This post sets up one master and one slave with a catalog zone.</p>
<h2 id="why-catalog-zones">Why Catalog Zones? <a class="anchor" data-pagefind-ignore href="#why-catalog-zones" aria-label="Link to this section">#</a></h2>
<ul>
<li><strong>One place to add a zone</strong>: add it on the master and to the catalog; the slaves follow.</li>
<li><strong>No slave configuration changes</strong>: slaves create and delete member zones automatically.</li>
<li><strong>Standard DNS transport</strong>: the catalog is an ordinary zone, transferred with AXFR/IXFR like any other.</li>
<li><strong>Per-zone settings</strong>: metadata in the catalog can set masters or transfer ACLs for one member zone.</li>
</ul>
<h3 id="when-to-use-it">When to use it <a class="anchor" data-pagefind-ignore href="#when-to-use-it" aria-label="Link to this section">#</a></h3>
<ul>
<li><strong>Use it</strong> when you host many zones, or add and remove zones often, across several slaves.</li>
<li><strong>Skip it</strong> for a handful of zones that rarely change; plain <code>zone</code> blocks are simpler.</li>
</ul>
<h2 id="how-it-works">How It Works <a class="anchor" data-pagefind-ignore href="#how-it-works" aria-label="Link to this section">#</a></h2>
<table>
	<thead>
			<tr>
					<th>Component</th>
					<th>Runs on</th>
					<th>Job</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Catalog zone <code>catalog.example.com</code></td>
					<td>Master (<code>10.71.0.176</code>), transferred to the slave</td>
					<td>Lists the member zones as <code>PTR</code> records</td>
			</tr>
			<tr>
					<td>Member zones (e.g. <code>example.org</code>)</td>
					<td>Master, added with <code>rndc addzone</code></td>
					<td>The real zones with your records</td>
			</tr>
			<tr>
					<td><code>catalog-zones</code> option</td>
					<td>Slave (<code>10.71.0.177</code>)</td>
					<td>Reads the catalog and creates or deletes member zones</td>
			</tr>
	</tbody>
</table>
<p>The flow: add a member zone on the master → add its PTR record to the catalog and bump the serial → the slave transfers the catalog → it creates the member zone → it transfers the member zone from the master.</p>
<h2 id="step-1-configure-the-master-server">Step 1: Configure the Master Server <a class="anchor" data-pagefind-ignore href="#step-1-configure-the-master-server" aria-label="Link to this section">#</a></h2>
<p>The master needs <code>allow-new-zones yes</code>, which lets <code>rndc addzone</code> create zones at runtime without editing <code>named.conf</code> (used in Step 3).</p>
<pre tabindex="0"><code>options {
    directory &#34;/etc/namedb&#34;;
    ...
    server-id &#34;authoritative&#34;;
    allow-new-zones yes;
};
</code></pre><p><code>/etc/namedb</code> is the BIND directory on FreeBSD. On Debian/Ubuntu, AppArmor only lets <code>named</code> write to <code>/var/lib/bind</code> and <code>/var/cache/bind</code>, so use the packaged <code>directory &quot;/var/cache/bind&quot;;</code> there (RHEL: <code>/var/named</code>). The relative file names below (<code>catalog.example.com.db</code>, <code>example.org</code>, <code>cat-zones</code>) then land in that directory, e.g. <code>/var/cache/bind/cat-zones</code>. Alternatively, add a local AppArmor override in <code>/etc/apparmor.d/local/usr.sbin.named</code>.</p>
<p>Next, create the catalog zone file. It starts empty: only the SOA, a dummy NS record (required in every zone, never used) and the format version.</p>
<pre tabindex="0"><code>$TTL 3600
@       IN SOA . . 1 86400 3600 86400 3600
@       IN NS  ns1.
version IN TXT &#34;2&#34;
</code></pre><p>Save it as <code>/etc/namedb/catalog.example.com.db</code> and serve it as an ordinary master zone that the slave may transfer. The catalog&rsquo;s NS record is a dummy, so notify the slave explicitly:</p>
<pre tabindex="0"><code>zone &#34;catalog.example.com&#34; {
    type master;
    file &#34;catalog.example.com.db&#34;;
    allow-transfer { 10.71.0.177; };
    also-notify { 10.71.0.177; };
};
</code></pre><h2 id="step-2-configure-the-slave-server">Step 2: Configure the Slave Server <a class="anchor" data-pagefind-ignore href="#step-2-configure-the-slave-server" aria-label="Link to this section">#</a></h2>
<p>The slave also needs <code>allow-new-zones yes</code>, plus a <code>catalog-zones</code> block that names the catalog to follow:</p>
<ul>
<li><code>zone &quot;catalog.example.com&quot;</code>: the catalog this slave reads.</li>
<li><code>zone-directory &quot;cat-zones&quot;</code>: where the member zone files are stored.</li>
<li><code>in-memory no</code>: write member zones to disk, so they survive a restart without a new transfer.</li>
<li><code>default-masters</code>: where to transfer member zones from, unless the catalog says otherwise.</li>
<li><code>masterfile-format text</code>: store zone files as readable text instead of the binary format.</li>
</ul>
<pre tabindex="0"><code>options {
    directory &#34;/etc/namedb&#34;;
    ...
    masterfile-format text;
    zone-statistics yes;
    server-id &#34;slave&#34;;

    allow-new-zones yes;
    catalog-zones {
        zone &#34;catalog.example.com&#34;
              zone-directory &#34;cat-zones&#34;
              in-memory no
              default-masters { 10.71.0.176; };
    };
};
</code></pre><p>Bind does not create the <code>cat-zones</code> directory. If it is missing, it logs <code>zone-directory 'cat-zones' not found; zone files will not be saved</code>, so create it first:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mkdir /etc/namedb/cat-zones
</span></span><span class="line"><span class="cl">chown bind:bind /etc/namedb/cat-zones    <span class="c1"># the user named runs as (bind on FreeBSD/Debian, named on RHEL)</span>
</span></span></code></pre></div><p>The catalog itself is an ordinary slave zone, transferred from the master:</p>
<pre tabindex="0"><code>zone &#34;catalog.example.com&#34; {
    type slave;
    file &#34;catalog.example.com.db&#34;;
    masters { 10.71.0.176; };
};
</code></pre><h2 id="step-3-add-a-new-member-zone">Step 3: Add a New Member Zone <a class="anchor" data-pagefind-ignore href="#step-3-add-a-new-member-zone" aria-label="Link to this section">#</a></h2>
<p>Adding a zone is two steps: create it on the master, then list it in the catalog (Step 4). Create its zone file (<code>/etc/namedb/example.org</code>) and use <code>rndc</code> to add the new zone to the master server. The zone configuration must end with <code>};</code> <em>inside</em> the quotes; otherwise named rejects it with <code>addzone: missing ';' before end of file</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">rndc addzone example.org <span class="s1">&#39;{type master; file &#34;example.org&#34;;};&#39;</span>
</span></span><span class="line"><span class="cl">dig +short @127.0.0.1 example.org soa
</span></span></code></pre></div><p>The <code>dig</code> checks that the master now serves the zone.</p>
<p>Each member zone gets a unique label in the catalog. The convention is the SHA-1 hash of the zone name in DNS wire format. This Python script calculates it:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="ch">#!/usr/bin/env python3</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">dns.name</span>   <span class="c1"># pip install dnspython</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">hashlib</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">sys</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="n">hashlib</span><span class="o">.</span><span class="n">sha1</span><span class="p">(</span><span class="n">dns</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">from_text</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span><span class="o">.</span><span class="n">to_wire</span><span class="p">())</span><span class="o">.</span><span class="n">hexdigest</span><span class="p">())</span>
</span></span></code></pre></div><p>To generate the hash for <code>example.org</code>, run:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./nzf.py example.org
</span></span><span class="line"><span class="cl">47ac1a4d93b61fffdb4762c18c9e7d1a6b046d33
</span></span></code></pre></div><p>Alternatively, you could use <code>openssl</code> to generate the hash:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">printf</span> <span class="s1">&#39;\7example\3org\0&#39;</span> <span class="p">|</span> openssl sha1
</span></span><span class="line"><span class="cl">SHA1<span class="o">(</span>stdin<span class="o">)=</span> 47ac1a4d93b61fffdb4762c18c9e7d1a6b046d33
</span></span></code></pre></div><p>With catalog format version 2 the label only has to be unique within the catalog, so the hash is a convenient convention rather than a requirement.</p>
<h2 id="step-4-update-the-catalog-zone">Step 4: Update the Catalog Zone <a class="anchor" data-pagefind-ignore href="#step-4-update-the-catalog-zone" aria-label="Link to this section">#</a></h2>
<p>The PTR record <code>&lt;hash&gt;.zones PTR example.org.</code> is what tells the slaves that <code>example.org</code> is a member zone. Increase the SOA serial so the slave picks up the change. Keep the <code>version</code> record. Without it the slave logs <code>catz: zone 'catalog.example.com' has no 'version' record</code> and ignores the whole catalog:</p>
<pre tabindex="0"><code>@ 3600 SOA . . 2 86400 3600 86400 3600
@ 3600 IN NS nop.
version 3600 IN TXT &#34;2&#34;

47ac1a4d93b61fffdb4762c18c9e7d1a6b046d33.zones PTR example.org.
</code></pre><p>Reload on the master to load the new catalog and notify the slave:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">rndc reload
</span></span></code></pre></div><p>The master&rsquo;s log shows the slave transferring first the catalog, then the new member zone:</p>
<pre tabindex="0"><code>xfer-out: info: client 10.71.0.177#33213 (catalog.example.com): transfer of &#39;catalog.example.com/IN&#39;: AXFR-style IXFR started (serial 2)
xfer-out: info: client 10.71.0.177#33213 (catalog.example.com): transfer of &#39;catalog.example.com/IN&#39;: AXFR-style IXFR ended
xfer-out: info: client 10.71.0.177#45095 (example.org): transfer of &#39;example.org/IN&#39;: AXFR started (serial 22)
xfer-out: info: client 10.71.0.177#45095 (example.org): transfer of &#39;example.org/IN&#39;: AXFR ended
</code></pre><h2 id="verifying-the-setup-on-the-secondary">Verifying the Setup on the Secondary <a class="anchor" data-pagefind-ignore href="#verifying-the-setup-on-the-secondary" aria-label="Link to this section">#</a></h2>
<p>The new zone should now exist on the secondary server. Check the <code>cat-zones</code> directory for the slaved zone:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ls -l /etc/namedb/cat-zones
</span></span><span class="line"><span class="cl">-rw-r--r-- <span class="m">1</span> <span class="nb">bind</span> <span class="nb">bind</span>  <span class="m">340</span> Jun  <span class="m">2</span> 13:33 __catz___default_catalog.example.com_example.org.db
</span></span></code></pre></div><p>The <code>_default</code> part of the name is the view the catalog belongs to.</p>
<p>The <code>__catz__*</code> file contains a copy of the slaved zone.</p>
<p>To remove a member zone, delete its PTR record from the catalog and bump the serial. The slave then deletes the zone itself, as its log shows:</p>
<pre tabindex="0"><code>catz: updating catalog zone &#39;catalog.example.com&#39; with serial 3
catz: deleting zone &#39;example.org&#39; from catalog &#39;catalog.example.com&#39; - success
catz: catz_delzone_taskaction: zone &#39;example.org&#39; deleted
</code></pre><h2 id="using-metadata-in-catalog-zones">Using Metadata in Catalog Zones <a class="anchor" data-pagefind-ignore href="#using-metadata-in-catalog-zones" aria-label="Link to this section">#</a></h2>
<p>Metadata overrides the slave&rsquo;s defaults for one member zone. In a version &ldquo;2&rdquo; catalog these custom properties live under an <code>ext</code> label. Bind logs <code>invalid record in catalog zone ... - ignoring</code> for the version 1 style <code>masters.&lt;hash&gt;.zones</code>.</p>
<table>
	<thead>
			<tr>
					<th>Property</th>
					<th>Record type</th>
					<th>Overrides</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>masters.ext.&lt;hash&gt;.zones</code></td>
					<td><code>A</code></td>
					<td><code>default-masters</code>: where this zone is transferred from</td>
			</tr>
			<tr>
					<td><code>allow-transfer.ext.&lt;hash&gt;.zones</code></td>
					<td><code>APL</code></td>
					<td>Who may transfer this zone from the slave</td>
			</tr>
	</tbody>
</table>
<p>For instance, you can assign a different master server to a particular member zone:</p>
<pre tabindex="0"><code>47ac1a4d93b61fffdb4762c18c9e7d1a6b046d33.zones                 IN PTR example.org.
masters.ext.47ac1a4d93b61fffdb4762c18c9e7d1a6b046d33.zones   IN A 10.71.0.144
</code></pre><p>You can also set Address Prefix Lists (APLs) to control zone transfers on a per-zone basis:</p>
<pre tabindex="0"><code>allow-transfer.ext.47ac1a4d93b61fffdb4762c18c9e7d1a6b046d33.zones   IN APL  1:10.71.0.177/32 1:10.71.0.247/32
</code></pre><p>This example allows zone transfers from two specific IP addresses.</p>
<h2 id="troubleshooting">Troubleshooting <a class="anchor" data-pagefind-ignore href="#troubleshooting" aria-label="Link to this section">#</a></h2>
<table>
	<thead>
			<tr>
					<th>Log message / symptom</th>
					<th>Cause / fix</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>zone-directory 'cat-zones' not found</code></td>
					<td>Create the directory, owned by the BIND user</td>
			</tr>
			<tr>
					<td><code>has no 'version' record</code></td>
					<td>Add <code>version IN TXT &quot;2&quot;</code> to the catalog</td>
			</tr>
			<tr>
					<td><code>invalid record in catalog zone ... - ignoring</code></td>
					<td>Version 1 syntax in a version 2 catalog; use the <code>ext</code> label</td>
			</tr>
			<tr>
					<td><code>addzone: missing ';' before end of file</code></td>
					<td>End the zone configuration with <code>};</code> inside the quotes</td>
			</tr>
			<tr>
					<td>Slave ignores a catalog change</td>
					<td>SOA serial not increased</td>
			</tr>
	</tbody>
</table>
<h2 id="security-considerations">Security Considerations <a class="anchor" data-pagefind-ignore href="#security-considerations" aria-label="Link to this section">#</a></h2>
<ul>
<li><strong>Whoever controls the catalog controls the slaves</strong>: restrict <code>allow-transfer</code> on the catalog zone to your slaves.</li>
<li><strong>Sign transfers with TSIG</strong>: catalog zones support TSIG for the catalog and the member zones (see the <a href="https://blog.bsdserver.nl/how-to-configure-bind-rndc-and-tsig-keys-for-remote-dns-management/">rndc and TSIG post</a>).</li>
</ul>
<h2 id="automate-it">Automate it <a class="anchor" data-pagefind-ignore href="#automate-it" aria-label="Link to this section">#</a></h2>
<p>The Ansible roles and Terraform code that build this setup are on GitHub:
<a href="https://github.com/pderuiter/blog-bind-catalog-zones" rel="noopener">pderuiter/blog-bind-catalog-zones</a>. It creates the master and the slave, sets up the catalog zone and adds each member zone with <code>rndc addzone</code> and its hashed catalog record; list your zones in <code>group_vars/all/vars.yml</code>, then run <code>terraform apply</code> and <code>ansible-playbook site.yml</code>.</p>
<h2 id="conclusion">Conclusion <a class="anchor" data-pagefind-ignore href="#conclusion" aria-label="Link to this section">#</a></h2>
<p>Catalog zones turn adding a slave zone into two commands on the master: <code>rndc addzone</code> and one catalog record. The slaves follow on their own, however many zones you host.</p>
]]></content:encoded></item></channel></rss>