To grow an existing logical volume and resize its filesystem you can run:
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv && \
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
lvextend -l +100%FREEexpands the logical volume to use all free space on the volume group.resize2fsresizes the ext4 filesystem to fill the new logical‑volume size.
Tip: If your filesystem is XFS, replace
resize2fswithxfs_growfs /dev/mapper/ubuntu--vg-ubuntu--lv.
Configuring Networking with Netplan
- Create the Netplan configuration file
cd /etc/netplan
sudo touch 99-netcfg.yaml
sudo chmod 600 99-netcfg.yaml
sudo vi 99-netcfg.yaml
- Add the following YAML content
network:
version: 2
renderer: networkd
ethernets:
ens18:
dhcp4: true
ens19:
addresses:
- 10.0.0.12/26
ens18will obtain its IPv4 address via DHCP.ens19receives the static address10.0.0.12with a/26subnet mask.
- Apply the new configuration
sudo netplan apply
Note: After applying, verify connectivity with
ip addr showorping.