<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[DevOps Discussion Forum - Linux]]></title>
		<link>https://forums.geekssolutions.io/</link>
		<description><![CDATA[DevOps Discussion Forum - https://forums.geekssolutions.io]]></description>
		<pubDate>Fri, 05 Jun 2026 22:08:55 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Extending LVM Logical Volume (LV) in Linux – Runbook]]></title>
			<link>https://forums.geekssolutions.io/showthread.php?tid=28</link>
			<pubDate>Wed, 22 Apr 2026 11:24:42 +0530</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.geekssolutions.io/member.php?action=profile&uid=6">Kalyani</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.geekssolutions.io/showthread.php?tid=28</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b">Purpose</span><br />
Extend disk space on a Linux system using LVM <span style="font-weight: bold;" class="mycode_b">without downtime</span>.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Applies to</span><br />
Systems using LVM (Logical Volume Manager)<br />
<br />
<hr class="mycode_hr" />
<img src="https://forums.geekssolutions.io/images/smilies/exclamation.png" alt="Exclamation" title="Exclamation" class="smilie smilie_15" />  <span style="font-weight: bold;" class="mycode_b">Problem</span><br />
<br />
Filesystem (e.g. /, /var) is running out of space and needs to be extended.<br />
<br />
<hr class="mycode_hr" />
 <span style="font-weight: bold;" class="mycode_b">Step 1 </span>— Check Current Disk Usage<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>df -h</code></div></div>Output:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/dev/mapper/rootvg-varlv    14G  13G  1.4G  91% /var</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Outcome</span>:<br />
<ul class="mycode_list"><li>Identify which mount point is full (e.g /var) <br />
</li>
<li>This determines <span style="font-weight: bold;" class="mycode_b">which LV needs extension</span> <br />
</li>
</ul>
<hr class="mycode_hr" />
<br />
 <span style="font-weight: bold;" class="mycode_b">Step 2</span> — Verify LVM Setup (Build Context for Extension)<br />
<br />
  1. Map LV to Mount Point<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lsblk</code></div></div>Output :<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>NAME              MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS<br />
sda                8:0    0  256G  0 disk<br />
├─sda4              8:4    0 63.3G  0 part<br />
  ├─rootvg-varlv  253:3    0  14G  0 lvm  /var<br />
<br />
└─sda5              8:5    0  100G  0 part<br />
  ├─rootvg-varlv  253:3    0  14G  0 lvm  /var</code></div></div><br />
<img src="https://forums.geekssolutions.io/images/smilies/lightbulb.png" alt="Idea" title="Idea" class="smilie smilie_18" />  Insight:<ul class="mycode_list"><li>Identifies <span style="font-weight: bold;" class="mycode_b">which LV is mounted where</span> <br />
</li>
<li>Confirms LVM usage (TYPE = lvm)<br />
 <br />
</li>
</ul>
  2. Identify Target LV<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lvs -o lv_name,vg_name,lv_path</code></div></div>Output:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>LV    VG    Path<br />
varlv  rootvg /dev/rootvg/varlv</code></div></div><br />
<img src="https://forums.geekssolutions.io/images/smilies/lightbulb.png" alt="Idea" title="Idea" class="smilie smilie_18" />  Insight:<br />
<ul class="mycode_list"><li>Confirms exact LV <span style="font-weight: bold;" class="mycode_b">name</span> to extend (e.g varlv) <br />
</li>
<li>Provides <span style="font-weight: bold;" class="mycode_b">correct device path</span> required for lvextend (e.g  /dev/rootvg/varlv)<br />
 <br />
</li>
</ul>
  3. Check Available Space in VG <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>vgs</code></div></div>Output:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>VG    #PV #LV #SN Attr  VSize    VFree<br />
rootvg  2  5  0 wz--n- &lt;163.31g 316.00m</code></div></div><br />
<img src="https://forums.geekssolutions.io/images/smilies/lightbulb.png" alt="Idea" title="Idea" class="smilie smilie_18" /> Insight:<ul class="mycode_list"><li>Determines if extension is possible <br />
</li>
</ul>
<br />
       Interpretation:<ul class="mycode_list"><li>VFree &gt; 0<br />
 → Extend directly <br />
</li>
<li>VFree = 0<br />
→ Add disk first<br />
</li>
</ul>
<br />
  4. Check Underlying Disks<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>pvs</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>PV        VG    Fmt  Attr PSize    PFree<br />
/dev/sda4  rootvg lvm2 a--  63.31g    0<br />
/dev/sda5  rootvg lvm2 a--  &lt;100.00g 316.00m</code></div></div><br />
<img src="https://forums.geekssolutions.io/images/smilies/lightbulb.png" alt="Idea" title="Idea" class="smilie smilie_18" />  Insight:<ul class="mycode_list"><li>Shows disks backing the VG <br />
</li>
<li>Confirms whether storage is already fully utilized <br />
<br />
</li>
</ul>
<hr class="mycode_hr" />
<img src="https://forums.geekssolutions.io/images/smilies/cool.png" alt="Cool" title="Cool" class="smilie smilie_3" />  Step 2 Outcome (What we now know)<br />
<ul class="mycode_list"><li>Which <span style="font-weight: bold;" class="mycode_b">LV to extend</span> (varlv) <br />
</li>
<li>Its <span style="font-weight: bold;" class="mycode_b">mount point</span> (/var) and <span style="font-weight: bold;" class="mycode_b">exact path</span> (/dev/rootvg/varlv)<br />
</li>
<li>Whether <span style="font-weight: bold;" class="mycode_b">free space exists in VG</span> <br />
</li>
<li>Which <span style="font-weight: bold;" class="mycode_b">disks are backing LVM<br />
</span> <br />
</li>
</ul>
<hr class="mycode_hr" />
<br />
<img src="https://forums.geekssolutions.io/images/smilies/exclamation.png" alt="Exclamation" title="Exclamation" class="smilie smilie_15" />  Decision Point<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Case A</span>: VG has free space<br />
→ Extend LV directly<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Case B</span>: No free space<br />
→ Add disk / extend storage first<br />
<br />
<hr class="mycode_hr" />
<br />
<span style="font-weight: bold;" class="mycode_b">Case A</span> — Extend LV (VG has free space)<br />
<br />
  <span style="font-weight: bold;" class="mycode_b">Step 3</span> — Extend Logical Volume<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lvextend -L +316M /dev/rootvg/varlv</code></div></div><ul class="mycode_list"><li>-L → size in GB/MB <br />
</li>
</ul>
<br />
OR use all free space:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lvextend -l +100%FREE /dev/rootvg/varlv</code></div></div><ul class="mycode_list"><li>-l → extents / percentage <br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">Outcome</span>:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Size of logical volume rootvg/varlv changed from 14.00 GiB (3584 extents) to &lt;14.31 GiB (3663 extents).<br />
Logical volume rootvg/varlv successfully resized.</code></div></div><ul class="mycode_list"><li>LV size increases <br />
</li>
<li>Filesystem unchanged (IMPORTANT) <br />
</li>
</ul>
<br />
<hr class="mycode_hr" />
<br />
  <span style="font-weight: bold;" class="mycode_b"> Step 4</span> — Resize Filesystem<br />
<br />
Check filesystem:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lsblk -f</code></div></div><br />
For<span style="font-weight: bold;" class="mycode_b"> ext4</span>:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>resize2fs /dev/rootvg/varlv</code></div></div><br />
For <span style="font-weight: bold;" class="mycode_b">xfs</span>:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>xfs_growfs /var</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Outcome</span>:<br />
<ul class="mycode_list"><li>Filesystem expands to use new space <br />
<br />
</li>
</ul>
<hr class="mycode_hr" />
<br />
 <span style="font-weight: bold;" class="mycode_b"> Step 5</span> — Verify<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>df -h</code></div></div><br />
<hr class="mycode_hr" />
<span style="font-weight: bold;" class="mycode_b">Case B</span> — No Free Space in VG<br />
<br />
  <span style="font-weight: bold;" class="mycode_b">Step 3</span> — Add New Disk (Cloud / VM level)<br />
<ul class="mycode_list"><li>Add a new disk from your cloud provider / hypervisor (e.g. AWS, Azure, VMware)<br />
</li>
<li>Example: New disk appears as /dev/sdb<br />
</li>
<li>Verify Disk is Added<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lsblk</code></div></div></li>
<li>New disk should be visible (e.g. /dev/sdb) <br />
</li>
</ul>
<br />
<hr class="mycode_hr" />
  <span style="font-weight: bold;" class="mycode_b">Step </span>4 — Create PV<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>pvcreate /dev/sdb</code></div></div><br />
<hr class="mycode_hr" />
  <span style="font-weight: bold;" class="mycode_b">Step 5</span> — Extend VG<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>vgextend rootvg /dev/sdb</code></div></div><br />
<hr class="mycode_hr" />
  <span style="font-weight: bold;" class="mycode_b">Step 6</span> — Extend LV<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lvextend -l +100%FREE /dev/rootvg/varlv</code></div></div><br />
<hr class="mycode_hr" />
  <span style="font-weight: bold;" class="mycode_b">Step 7</span> — Resize Filesystem<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>xfs_growfs /var</code></div></div><br />
# OR<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>resize2fs /dev/rootvg/varlv</code></div></div><br />
<hr class="mycode_hr" />
  <span style="font-weight: bold;" class="mycode_b">Step 8</span> — Verify<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>df -h</code></div></div><br />
<hr class="mycode_hr" />
<br />
 <span style="font-weight: bold;" class="mycode_b">Additional Note</span> — Expanding Existing Disk<br />
<br />
If the <span style="font-weight: bold;" class="mycode_b">same disk is increased in size</span> (no new disk added):<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>growpart /dev/sda 4</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>pvresize /dev/sda4</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Outcome</span>:<br />
<ul class="mycode_list"><li>growpart → expands the partition <br />
</li>
<li>pvresize → makes new space available to LVM <br />
</li>
</ul>
<br />
 You can now proceed with lvextend<br />
<br />
<br />
<hr class="mycode_hr" />
<br />
<img src="https://forums.geekssolutions.io/images/smilies/exclamation.png" alt="Exclamation" title="Exclamation" class="smilie smilie_15" /> <span style="font-weight: bold;" class="mycode_b">Common Mistakes</span><br />
<ul class="mycode_list"><li>Extending LV but not resizing filesystem <br />
</li>
<li>Using wrong filesystem command (resize2fs vs xfs_growfs) <br />
</li>
<li>Not checking vgs before starting <br />
</li>
<li>Using wrong device path <br />
</li>
<li>Confusing disk (/dev/sdb) with LV (/dev/rootvg/varlv) <br />
<br />
</li>
</ul>
<hr class="mycode_hr" />
<br />
<img src="https://forums.geekssolutions.io/images/smilies/huh.png" alt="Huh" title="Huh" class="smilie smilie_17" /> <span style="font-weight: bold;" class="mycode_b"> Key Concepts and Takeaways </span><br />
<ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">PV</span> (Physical Volume) → Disk (/dev/sda4) <br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">VG</span> (Volume Group) → Storage pool (rootvg) <br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">LV</span> (Logical Volume) → Usable volume (/var) <br />
</li>
</ul>
<br />
Flow:<br />
<span style="font-weight: bold;" class="mycode_b">Disk → PV → VG → LV → Filesystem</span><br />
<ul class="mycode_list"><li>Extension = <span style="font-weight: bold;" class="mycode_b">LV resize + filesystem resize</span> <br />
</li>
<li>vgs decides your approach (direct vs add disk) <br />
</li>
<li>LVM allows <span style="font-weight: bold;" class="mycode_b">online resizing (no downtime)</span> <br />
</li>
</ul>
<br />
<hr class="mycode_hr" />
<br />
<img src="https://forums.geekssolutions.io/images/smilies/exclamation.png" alt="Exclamation" title="Exclamation" class="smilie smilie_15" />  <span style="font-weight: bold;" class="mycode_b">Precautions</span><br />
<ul class="mycode_list"><li>Take backup before changes <br />
</li>
<li>Double-check device names <br />
</li>
<li>Run carefully on production<br />
</li>
</ul>
]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b">Purpose</span><br />
Extend disk space on a Linux system using LVM <span style="font-weight: bold;" class="mycode_b">without downtime</span>.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Applies to</span><br />
Systems using LVM (Logical Volume Manager)<br />
<br />
<hr class="mycode_hr" />
<img src="https://forums.geekssolutions.io/images/smilies/exclamation.png" alt="Exclamation" title="Exclamation" class="smilie smilie_15" />  <span style="font-weight: bold;" class="mycode_b">Problem</span><br />
<br />
Filesystem (e.g. /, /var) is running out of space and needs to be extended.<br />
<br />
<hr class="mycode_hr" />
 <span style="font-weight: bold;" class="mycode_b">Step 1 </span>— Check Current Disk Usage<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>df -h</code></div></div>Output:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/dev/mapper/rootvg-varlv    14G  13G  1.4G  91% /var</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Outcome</span>:<br />
<ul class="mycode_list"><li>Identify which mount point is full (e.g /var) <br />
</li>
<li>This determines <span style="font-weight: bold;" class="mycode_b">which LV needs extension</span> <br />
</li>
</ul>
<hr class="mycode_hr" />
<br />
 <span style="font-weight: bold;" class="mycode_b">Step 2</span> — Verify LVM Setup (Build Context for Extension)<br />
<br />
  1. Map LV to Mount Point<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lsblk</code></div></div>Output :<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>NAME              MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS<br />
sda                8:0    0  256G  0 disk<br />
├─sda4              8:4    0 63.3G  0 part<br />
  ├─rootvg-varlv  253:3    0  14G  0 lvm  /var<br />
<br />
└─sda5              8:5    0  100G  0 part<br />
  ├─rootvg-varlv  253:3    0  14G  0 lvm  /var</code></div></div><br />
<img src="https://forums.geekssolutions.io/images/smilies/lightbulb.png" alt="Idea" title="Idea" class="smilie smilie_18" />  Insight:<ul class="mycode_list"><li>Identifies <span style="font-weight: bold;" class="mycode_b">which LV is mounted where</span> <br />
</li>
<li>Confirms LVM usage (TYPE = lvm)<br />
 <br />
</li>
</ul>
  2. Identify Target LV<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lvs -o lv_name,vg_name,lv_path</code></div></div>Output:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>LV    VG    Path<br />
varlv  rootvg /dev/rootvg/varlv</code></div></div><br />
<img src="https://forums.geekssolutions.io/images/smilies/lightbulb.png" alt="Idea" title="Idea" class="smilie smilie_18" />  Insight:<br />
<ul class="mycode_list"><li>Confirms exact LV <span style="font-weight: bold;" class="mycode_b">name</span> to extend (e.g varlv) <br />
</li>
<li>Provides <span style="font-weight: bold;" class="mycode_b">correct device path</span> required for lvextend (e.g  /dev/rootvg/varlv)<br />
 <br />
</li>
</ul>
  3. Check Available Space in VG <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>vgs</code></div></div>Output:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>VG    #PV #LV #SN Attr  VSize    VFree<br />
rootvg  2  5  0 wz--n- &lt;163.31g 316.00m</code></div></div><br />
<img src="https://forums.geekssolutions.io/images/smilies/lightbulb.png" alt="Idea" title="Idea" class="smilie smilie_18" /> Insight:<ul class="mycode_list"><li>Determines if extension is possible <br />
</li>
</ul>
<br />
       Interpretation:<ul class="mycode_list"><li>VFree &gt; 0<br />
 → Extend directly <br />
</li>
<li>VFree = 0<br />
→ Add disk first<br />
</li>
</ul>
<br />
  4. Check Underlying Disks<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>pvs</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>PV        VG    Fmt  Attr PSize    PFree<br />
/dev/sda4  rootvg lvm2 a--  63.31g    0<br />
/dev/sda5  rootvg lvm2 a--  &lt;100.00g 316.00m</code></div></div><br />
<img src="https://forums.geekssolutions.io/images/smilies/lightbulb.png" alt="Idea" title="Idea" class="smilie smilie_18" />  Insight:<ul class="mycode_list"><li>Shows disks backing the VG <br />
</li>
<li>Confirms whether storage is already fully utilized <br />
<br />
</li>
</ul>
<hr class="mycode_hr" />
<img src="https://forums.geekssolutions.io/images/smilies/cool.png" alt="Cool" title="Cool" class="smilie smilie_3" />  Step 2 Outcome (What we now know)<br />
<ul class="mycode_list"><li>Which <span style="font-weight: bold;" class="mycode_b">LV to extend</span> (varlv) <br />
</li>
<li>Its <span style="font-weight: bold;" class="mycode_b">mount point</span> (/var) and <span style="font-weight: bold;" class="mycode_b">exact path</span> (/dev/rootvg/varlv)<br />
</li>
<li>Whether <span style="font-weight: bold;" class="mycode_b">free space exists in VG</span> <br />
</li>
<li>Which <span style="font-weight: bold;" class="mycode_b">disks are backing LVM<br />
</span> <br />
</li>
</ul>
<hr class="mycode_hr" />
<br />
<img src="https://forums.geekssolutions.io/images/smilies/exclamation.png" alt="Exclamation" title="Exclamation" class="smilie smilie_15" />  Decision Point<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Case A</span>: VG has free space<br />
→ Extend LV directly<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Case B</span>: No free space<br />
→ Add disk / extend storage first<br />
<br />
<hr class="mycode_hr" />
<br />
<span style="font-weight: bold;" class="mycode_b">Case A</span> — Extend LV (VG has free space)<br />
<br />
  <span style="font-weight: bold;" class="mycode_b">Step 3</span> — Extend Logical Volume<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lvextend -L +316M /dev/rootvg/varlv</code></div></div><ul class="mycode_list"><li>-L → size in GB/MB <br />
</li>
</ul>
<br />
OR use all free space:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lvextend -l +100%FREE /dev/rootvg/varlv</code></div></div><ul class="mycode_list"><li>-l → extents / percentage <br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">Outcome</span>:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Size of logical volume rootvg/varlv changed from 14.00 GiB (3584 extents) to &lt;14.31 GiB (3663 extents).<br />
Logical volume rootvg/varlv successfully resized.</code></div></div><ul class="mycode_list"><li>LV size increases <br />
</li>
<li>Filesystem unchanged (IMPORTANT) <br />
</li>
</ul>
<br />
<hr class="mycode_hr" />
<br />
  <span style="font-weight: bold;" class="mycode_b"> Step 4</span> — Resize Filesystem<br />
<br />
Check filesystem:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lsblk -f</code></div></div><br />
For<span style="font-weight: bold;" class="mycode_b"> ext4</span>:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>resize2fs /dev/rootvg/varlv</code></div></div><br />
For <span style="font-weight: bold;" class="mycode_b">xfs</span>:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>xfs_growfs /var</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Outcome</span>:<br />
<ul class="mycode_list"><li>Filesystem expands to use new space <br />
<br />
</li>
</ul>
<hr class="mycode_hr" />
<br />
 <span style="font-weight: bold;" class="mycode_b"> Step 5</span> — Verify<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>df -h</code></div></div><br />
<hr class="mycode_hr" />
<span style="font-weight: bold;" class="mycode_b">Case B</span> — No Free Space in VG<br />
<br />
  <span style="font-weight: bold;" class="mycode_b">Step 3</span> — Add New Disk (Cloud / VM level)<br />
<ul class="mycode_list"><li>Add a new disk from your cloud provider / hypervisor (e.g. AWS, Azure, VMware)<br />
</li>
<li>Example: New disk appears as /dev/sdb<br />
</li>
<li>Verify Disk is Added<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lsblk</code></div></div></li>
<li>New disk should be visible (e.g. /dev/sdb) <br />
</li>
</ul>
<br />
<hr class="mycode_hr" />
  <span style="font-weight: bold;" class="mycode_b">Step </span>4 — Create PV<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>pvcreate /dev/sdb</code></div></div><br />
<hr class="mycode_hr" />
  <span style="font-weight: bold;" class="mycode_b">Step 5</span> — Extend VG<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>vgextend rootvg /dev/sdb</code></div></div><br />
<hr class="mycode_hr" />
  <span style="font-weight: bold;" class="mycode_b">Step 6</span> — Extend LV<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lvextend -l +100%FREE /dev/rootvg/varlv</code></div></div><br />
<hr class="mycode_hr" />
  <span style="font-weight: bold;" class="mycode_b">Step 7</span> — Resize Filesystem<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>xfs_growfs /var</code></div></div><br />
# OR<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>resize2fs /dev/rootvg/varlv</code></div></div><br />
<hr class="mycode_hr" />
  <span style="font-weight: bold;" class="mycode_b">Step 8</span> — Verify<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>df -h</code></div></div><br />
<hr class="mycode_hr" />
<br />
 <span style="font-weight: bold;" class="mycode_b">Additional Note</span> — Expanding Existing Disk<br />
<br />
If the <span style="font-weight: bold;" class="mycode_b">same disk is increased in size</span> (no new disk added):<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>growpart /dev/sda 4</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>pvresize /dev/sda4</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Outcome</span>:<br />
<ul class="mycode_list"><li>growpart → expands the partition <br />
</li>
<li>pvresize → makes new space available to LVM <br />
</li>
</ul>
<br />
 You can now proceed with lvextend<br />
<br />
<br />
<hr class="mycode_hr" />
<br />
<img src="https://forums.geekssolutions.io/images/smilies/exclamation.png" alt="Exclamation" title="Exclamation" class="smilie smilie_15" /> <span style="font-weight: bold;" class="mycode_b">Common Mistakes</span><br />
<ul class="mycode_list"><li>Extending LV but not resizing filesystem <br />
</li>
<li>Using wrong filesystem command (resize2fs vs xfs_growfs) <br />
</li>
<li>Not checking vgs before starting <br />
</li>
<li>Using wrong device path <br />
</li>
<li>Confusing disk (/dev/sdb) with LV (/dev/rootvg/varlv) <br />
<br />
</li>
</ul>
<hr class="mycode_hr" />
<br />
<img src="https://forums.geekssolutions.io/images/smilies/huh.png" alt="Huh" title="Huh" class="smilie smilie_17" /> <span style="font-weight: bold;" class="mycode_b"> Key Concepts and Takeaways </span><br />
<ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">PV</span> (Physical Volume) → Disk (/dev/sda4) <br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">VG</span> (Volume Group) → Storage pool (rootvg) <br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">LV</span> (Logical Volume) → Usable volume (/var) <br />
</li>
</ul>
<br />
Flow:<br />
<span style="font-weight: bold;" class="mycode_b">Disk → PV → VG → LV → Filesystem</span><br />
<ul class="mycode_list"><li>Extension = <span style="font-weight: bold;" class="mycode_b">LV resize + filesystem resize</span> <br />
</li>
<li>vgs decides your approach (direct vs add disk) <br />
</li>
<li>LVM allows <span style="font-weight: bold;" class="mycode_b">online resizing (no downtime)</span> <br />
</li>
</ul>
<br />
<hr class="mycode_hr" />
<br />
<img src="https://forums.geekssolutions.io/images/smilies/exclamation.png" alt="Exclamation" title="Exclamation" class="smilie smilie_15" />  <span style="font-weight: bold;" class="mycode_b">Precautions</span><br />
<ul class="mycode_list"><li>Take backup before changes <br />
</li>
<li>Double-check device names <br />
</li>
<li>Run carefully on production<br />
</li>
</ul>
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Upgrade Guide: Ubuntu 22.04 LTS → 24.04.4 LTS (Noble Numbat)]]></title>
			<link>https://forums.geekssolutions.io/showthread.php?tid=26</link>
			<pubDate>Tue, 07 Apr 2026 17:01:54 +0530</pubDate>
			<dc:creator><![CDATA[<a href="https://forums.geekssolutions.io/member.php?action=profile&uid=5">aniket.pitre</a>]]></dc:creator>
			<guid isPermaLink="false">https://forums.geekssolutions.io/showthread.php?tid=26</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b">Purpose:</span> Upgrade Ubuntu systems from 22.04 LTS to 24.04 LTS with full step-by-step procedure (including what appears on screen during upgrade)<br />
<span style="font-weight: bold;" class="mycode_b">Document Type:</span> Operational Runbook <br />
<hr class="mycode_hr" />
? Step 1 — Check Current Version<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>cat /etc/os-release</code></div></div>? Confirm:<ul class="mycode_list"><li>VERSION="22.04 LTS"<br />
</li>
<li>CODENAME=jammy<br />
</li>
</ul>
<hr class="mycode_hr" />
? Step 2 — Update Current System<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt update &amp;&amp; sudo apt upgrade</code></div></div>? During this step:<ul class="mycode_list"><li>You may see package list fetching<br />
</li>
<li>If prompted:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> to continue<br />
</li>
</ul>
</li>
</ul>
<hr class="mycode_hr" />
? Step 3 — Install update-manager-core<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install update-manager-core</code></div></div>? If prompted:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> → continue installation<br />
</li>
</ul>
<hr class="mycode_hr" />
Edit Upgrade Configuration<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo nano /etc/update-manager/release-upgrades</code></div></div>Find:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Prompt=normal</code></div></div>Change to:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Prompt=lts</code></div></div>? Save:<ul class="mycode_list"><li>CTRL + X<br />
</li>
<li>Press Y<br />
</li>
<li>Press ENTER<br />
</li>
</ul>
<hr class="mycode_hr" />
⚙️ Step 4 — Prepare System (dist-upgrade)<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt dist-upgrade</code></div></div>? During this step:<ul class="mycode_list"><li>System may install/remove dependencies<br />
</li>
<li>If prompted:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> to continue<br />
</li>
</ul>
</li>
</ul>
<hr class="mycode_hr" />
? Step 5 — Reboot System<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo reboot</code></div></div><hr class="mycode_hr" />
? Step 6 — Run Release Upgrade<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo do-release-upgrade</code></div></div>? You will now see multiple interactive prompts:<br />
1. Checking for new release<ul class="mycode_list"><li>System checks availability of Ubuntu 24.04<br />
</li>
</ul>
2. Upgrade Summary Screen<ul class="mycode_list"><li>Shows:<ul class="mycode_list"><li>Packages to install<br />
</li>
<li>Packages to upgrade<br />
</li>
<li>Packages to remove<br />
</li>
</ul>
</li>
<li>Prompt:<ul class="mycode_list"><li>"Do you want to start the upgrade?"<br />
</li>
<li>Press <span style="font-weight: bold;" class="mycode_b">Y</span><br />
</li>
</ul>
</li>
</ul>
3. Download Packages<ul class="mycode_list"><li>Shows download progress<br />
</li>
<li>No input required unless interrupted<br />
</li>
</ul>
4. Configuration File Prompts<br />
You may see:<ul class="mycode_list"><li>"A new version of config file is available"<br />
</li>
</ul>
Options:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> → install new version<br />
</li>
<li>Press <span style="font-weight: bold;" class="mycode_b">N</span> → keep existing version<br />
</li>
</ul>
? Recommendation:<ul class="mycode_list"><li>Use <span style="font-weight: bold;" class="mycode_b">N</span> if unsure (safer)<br />
</li>
</ul>
5. Service Restart Prompt<ul class="mycode_list"><li>"Restart services during package upgrades without asking?"<br />
</li>
</ul>
Options:<ul class="mycode_list"><li>Select <span style="font-weight: bold;" class="mycode_b">Yes</span> → recommended<br />
</li>
</ul>
6. Obsolete Packages Prompt<ul class="mycode_list"><li>"Remove obsolete packages?"<br />
</li>
</ul>
Options:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> → clean system<br />
</li>
</ul>
7. Kernel/GRUB Prompt (if appears)<ul class="mycode_list"><li>Keep current selection unless you know otherwise<br />
</li>
</ul>
8. Final Prompt<ul class="mycode_list"><li>"System upgrade is complete. Restart required"<br />
</li>
<li>Press <span style="font-weight: bold;" class="mycode_b">Y</span><br />
</li>
</ul>
<hr class="mycode_hr" />
? Step 7 — Final Reboot<br />
? System reboots automatically or asks:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> to reboot<br />
</li>
</ul>
<hr class="mycode_hr" />
✅ Step 8 — Verify Upgrade<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>cat /etc/os-release</code></div></div>OR<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lsb_release -a</code></div></div>? Confirm:<ul class="mycode_list"><li>VERSION="24.04.4 LTS"<br />
</li>
<li>CODENAME=noble<br />
</li>
</ul>
<hr class="mycode_hr" />
? Optional Cleanup<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt autoremove -y</code></div></div><hr class="mycode_hr" />
⚠️ Important Notes<ul class="mycode_list"><li>Always take backup before upgrade<br />
</li>
<li>Ensure stable internet connection<br />
</li>
<li>Do not interrupt upgrade<br />
</li>
<li>Recommended downtime window<br />
</li>
<li>Ensure at least 5–10 GB free disk space<br />
</li>
</ul>
<hr class="mycode_hr" />
? Troubleshooting<br />
If upgrade not detected:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo do-release-upgrade -d</code></div></div>If upgrade fails midway:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo dpkg --configure -a<br />
sudo apt -f install</code></div></div><hr class="mycode_hr" />]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b">Purpose:</span> Upgrade Ubuntu systems from 22.04 LTS to 24.04 LTS with full step-by-step procedure (including what appears on screen during upgrade)<br />
<span style="font-weight: bold;" class="mycode_b">Document Type:</span> Operational Runbook <br />
<hr class="mycode_hr" />
? Step 1 — Check Current Version<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>cat /etc/os-release</code></div></div>? Confirm:<ul class="mycode_list"><li>VERSION="22.04 LTS"<br />
</li>
<li>CODENAME=jammy<br />
</li>
</ul>
<hr class="mycode_hr" />
? Step 2 — Update Current System<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt update &amp;&amp; sudo apt upgrade</code></div></div>? During this step:<ul class="mycode_list"><li>You may see package list fetching<br />
</li>
<li>If prompted:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> to continue<br />
</li>
</ul>
</li>
</ul>
<hr class="mycode_hr" />
? Step 3 — Install update-manager-core<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install update-manager-core</code></div></div>? If prompted:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> → continue installation<br />
</li>
</ul>
<hr class="mycode_hr" />
Edit Upgrade Configuration<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo nano /etc/update-manager/release-upgrades</code></div></div>Find:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Prompt=normal</code></div></div>Change to:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Prompt=lts</code></div></div>? Save:<ul class="mycode_list"><li>CTRL + X<br />
</li>
<li>Press Y<br />
</li>
<li>Press ENTER<br />
</li>
</ul>
<hr class="mycode_hr" />
⚙️ Step 4 — Prepare System (dist-upgrade)<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt dist-upgrade</code></div></div>? During this step:<ul class="mycode_list"><li>System may install/remove dependencies<br />
</li>
<li>If prompted:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> to continue<br />
</li>
</ul>
</li>
</ul>
<hr class="mycode_hr" />
? Step 5 — Reboot System<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo reboot</code></div></div><hr class="mycode_hr" />
? Step 6 — Run Release Upgrade<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo do-release-upgrade</code></div></div>? You will now see multiple interactive prompts:<br />
1. Checking for new release<ul class="mycode_list"><li>System checks availability of Ubuntu 24.04<br />
</li>
</ul>
2. Upgrade Summary Screen<ul class="mycode_list"><li>Shows:<ul class="mycode_list"><li>Packages to install<br />
</li>
<li>Packages to upgrade<br />
</li>
<li>Packages to remove<br />
</li>
</ul>
</li>
<li>Prompt:<ul class="mycode_list"><li>"Do you want to start the upgrade?"<br />
</li>
<li>Press <span style="font-weight: bold;" class="mycode_b">Y</span><br />
</li>
</ul>
</li>
</ul>
3. Download Packages<ul class="mycode_list"><li>Shows download progress<br />
</li>
<li>No input required unless interrupted<br />
</li>
</ul>
4. Configuration File Prompts<br />
You may see:<ul class="mycode_list"><li>"A new version of config file is available"<br />
</li>
</ul>
Options:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> → install new version<br />
</li>
<li>Press <span style="font-weight: bold;" class="mycode_b">N</span> → keep existing version<br />
</li>
</ul>
? Recommendation:<ul class="mycode_list"><li>Use <span style="font-weight: bold;" class="mycode_b">N</span> if unsure (safer)<br />
</li>
</ul>
5. Service Restart Prompt<ul class="mycode_list"><li>"Restart services during package upgrades without asking?"<br />
</li>
</ul>
Options:<ul class="mycode_list"><li>Select <span style="font-weight: bold;" class="mycode_b">Yes</span> → recommended<br />
</li>
</ul>
6. Obsolete Packages Prompt<ul class="mycode_list"><li>"Remove obsolete packages?"<br />
</li>
</ul>
Options:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> → clean system<br />
</li>
</ul>
7. Kernel/GRUB Prompt (if appears)<ul class="mycode_list"><li>Keep current selection unless you know otherwise<br />
</li>
</ul>
8. Final Prompt<ul class="mycode_list"><li>"System upgrade is complete. Restart required"<br />
</li>
<li>Press <span style="font-weight: bold;" class="mycode_b">Y</span><br />
</li>
</ul>
<hr class="mycode_hr" />
? Step 7 — Final Reboot<br />
? System reboots automatically or asks:<ul class="mycode_list"><li>Press <span style="font-weight: bold;" class="mycode_b">Y</span> to reboot<br />
</li>
</ul>
<hr class="mycode_hr" />
✅ Step 8 — Verify Upgrade<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>cat /etc/os-release</code></div></div>OR<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>lsb_release -a</code></div></div>? Confirm:<ul class="mycode_list"><li>VERSION="24.04.4 LTS"<br />
</li>
<li>CODENAME=noble<br />
</li>
</ul>
<hr class="mycode_hr" />
? Optional Cleanup<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt autoremove -y</code></div></div><hr class="mycode_hr" />
⚠️ Important Notes<ul class="mycode_list"><li>Always take backup before upgrade<br />
</li>
<li>Ensure stable internet connection<br />
</li>
<li>Do not interrupt upgrade<br />
</li>
<li>Recommended downtime window<br />
</li>
<li>Ensure at least 5–10 GB free disk space<br />
</li>
</ul>
<hr class="mycode_hr" />
? Troubleshooting<br />
If upgrade not detected:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo do-release-upgrade -d</code></div></div>If upgrade fails midway:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo dpkg --configure -a<br />
sudo apt -f install</code></div></div><hr class="mycode_hr" />]]></content:encoded>
		</item>
	</channel>
</rss>