Open main menu

CDOT Wiki β

Changes

Logical Volume Management

No change in size, 01:46, 11 February 2010
m
no edit summary
# Shrink the LV:
lvreduce vg_muskoka/lv_hone lv_home --size -5G
{{Admon/important|Check your arguments!|lvreduce, lvextend, and resize2fs can all take absolute or relative size arguments. For example, <code>-5G</code> means "reduce the size by five gigabytes", but <code>5G</code> means "make the size five gigabytes". If you have a 100G LV, the command <code>lvresize vg_muskoka/lv_home --size -5G</code> would shrink it to 95G, but accidentally typing <code>lvresize vg_muskoka/lv_home --size 5G</code> would shrink it to 5G. This would cause data loss if you have previously resized the filesystem to 95G. Remember to check your commands carefully.}}
# Create a logical volume:
lvcreate vg_muskoka --name vg_swap1 lv_swap1 --size 2G
# Write the swap space metadata (format it)
1
edit