<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VMware &#8211; Jeffrey Bostoen</title>
	<atom:link href="https://jeffreybostoen.be/tag/vmware/feed/" rel="self" type="application/rss+xml" />
	<link>https://jeffreybostoen.be</link>
	<description>Freelance iTop consultant and developer - IT Consulting - Official iTop Partner</description>
	<lastBuildDate>Sun, 28 Jan 2024 19:19:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://jeffreybostoen.be/wp-content/uploads/2023/01/cropped-android-chrome-512x512-1-32x32.png</url>
	<title>VMware &#8211; Jeffrey Bostoen</title>
	<link>https://jeffreybostoen.be</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Increasing disk space on Ubuntu Server 20.04 LTS</title>
		<link>https://jeffreybostoen.be/increasing-disk-space-on-ubuntu-server-20-04-lts/</link>
		
		<dc:creator><![CDATA[Jeffrey Bostoen]]></dc:creator>
		<pubDate>Sun, 28 Jan 2024 12:40:16 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VMware]]></category>
		<guid isPermaLink="false">https://jeffreybostoen.be/?p=1068</guid>

					<description><![CDATA[Recently I installed an Ubuntu Server 20.04 LTS in a virtual machine on VM Workstation Player 17. For some reason, while I did create a 20 GB disk, I quickly got a warning that my disk space was nearly full. Having used Ubuntu for a while, I was surprised to see my 20 GB would [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Recently I installed an Ubuntu Server 20.04 LTS in a virtual machine on VM Workstation Player 17.</p>



<p>For some reason, while I did create a 20 GB disk, I quickly got a warning that my disk space was nearly full. Having used Ubuntu for a while, I was surprised to see my 20 GB would already be full on this fresh install.</p>



<p>So I verified using the commands below. As you can see, it did detect that my physical volume was slightly short of 20 GB.</p>



<pre class="wp-block-code"><code>root@ubuntu01:/opt# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               ubuntu-vg
  PV Size               &lt;18.23 GiB / not usable 3.00 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              4665
  Free PE               2105
  Allocated PE          2560
  PV UUID               bsAlMw-TKc1-hMOx-8tdy-fjKR-NwW6-uMG5fg
</code></pre>



<p>But my volume group was a different story. The volume group size (VG Size) was close to what the output of the physical volume told us. However, only 10 GB was allocated; and 8.22 GiB was for some reason not allocated. Probably an oversight on my side.</p>



<pre class="wp-block-code"><code>
   
root@ubuntu01:/opt# vgdisplay
  --- Volume group ---
  VG Name               ubuntu-vg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               18.22 GiB
  PE Size               4.00 MiB
  Total PE              4665
  Alloc PE / Size       2560 / 10.00 GiB
  Free  PE / Size       2105 / 8.22 GiB
  VG UUID               sYknqJ-0ZCm-9Cqc-qXp2-yU80-IC7N-eM75Jb</code></pre>



<p>lvdisplay confirms this:</p>



<pre class="wp-block-code"><code>root@ubuntu01:/opt# lvdisplay
  --- Logical volume ---
  LV Path                /dev/ubuntu-vg/ubuntu-lv
  LV Name                ubuntu-lv
  VG Name                ubuntu-vg
  LV UUID                YAs7Vb-5luh-TBOs-IVOH-cxiT-s4zX-OhFinf
  LV Write Access        read/write
  LV Creation host, time ubuntu-server, 2024-01-28 08:44:17 +0000
  LV Status              available
  # open                 1
  LV Size                10.00 GiB
  Current LE             2560
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
</code></pre>



<p>Now, let&#8217;s make sure this logical volume group uses all the available space.<br>Above, we see the LV Path, which is what we need to run our next command.</p>



<pre class="wp-block-code"><code>root@ubuntu01:/opt# lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv 
  Size of logical volume ubuntu-vg/ubuntu-lv changed from 10.00 GiB (2560 extents) to 18.22 GiB (4665 extents).
  Logical volume ubuntu-vg/ubuntu-lv successfully resized.
</code></pre>



<p>If like me you forgot to add &#8220;-r&#8221; in the command above, check the type of file system.</p>



<pre class="wp-block-code"><code># Check sizes
root@ubuntu01:~# df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              388M  1.9M  386M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   18G  9.3G  7.8G  55% /
tmpfs                              1.9G     0  1.9G   0% /dev/shm
tmpfs                              5.0M  4.0K  5.0M   1% /run/lock
/dev/sda2                          1.8G  136M  1.5G   9% /boot
tmpfs                              388M  132K  388M   1% /run/user/1000

# Check file system
root@ubuntu01:~# df -T 
Filesystem                        Type  1K-blocks    Used Available Use% Mounted on
tmpfs                             tmpfs    397092    1984    395108   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4   18696940 9680488   8109936  55% /
tmpfs                             tmpfs   1985444       0   1985444   0% /dev/shm
tmpfs                             tmpfs      5120       4      5116   1% /run/lock
/dev/sda2                         ext4    1790136  138800   1542076   9% /boot
tmpfs                             tmpfs    397088     140    396948   1% /run/user/1000

</code></pre>



<p>In my case, I needed <strong>/dev/mapper/ubuntu&#8211;vg-ubuntu&#8211;lv </strong>which is an ext4 file system. My final step:</p>



<pre class="wp-block-code"><code>root@ubuntu01:~# resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
