Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

How can I make ubuntu--vg-ubuntu--lv consume the entire disk space available?

# Increase the Physical Volume (pv) to max size
pvresize /dev/sda3

# Expand the Logical Volume (LV) to max size to match
lvresize -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

# Expand the filesystem itself
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

# Double check the path name in /dev/mapper it may be slightly different than how I typed it out. The double-dash has special meaning in LVM names and don't always show up on disk in /dev that way.
# After you run the first command, it'll increase the PV size which is immediately made available to the Volume Group (VG) that the LV is part of.
# It's always a 4-part thing: disk partition -> PV -> VG -> LV
Source by community.spiceworks.com #
 
PREVIOUS NEXT
Tagged: #How #I #consume #entire #disk #space
ADD COMMENT
Topic
Name
3+3 =