How to resize an LVM logical partition

Updated on technology 2024-05-09
6 answers
  1. Anonymous users2024-02-10

    Enter yours here, and every professional answer will build your authoritative image.

    lvm (logical volume management)

    Run the df command to check the file system space occupied.

    Discover that LVM's logical volume Dev Fedora Home is already taking up 96% of the space!

    Then use the du command to see how much space the file occupies.

    According to the analysis, the largest occupied file is the gnome-boxes virtual machine image. Exactly 13g!

    There are no large files to delete, only partition management can be done.

    I plan to compress the Dev Fedora swap partition and give the node space to Dev Fedora Home

    tip: Fedora's installation manual suggests splitting the boot and swap and allocating the rest of the space to LVM)

    I also have a swap partition that I never use, and my computer has 8 GB of RAM, and the swap partition is never used. )

    LVM Management Commands:

    Expansion: Expand the file system first and then the file system.

    lvextend -l +100m dev vg1 lv1 The size of the logical volume has been increased by 100m

    resize2fs dev vg1 lv1 file system to the size of the logical volume.

    Shrink: Subtract the file system first and then LV (note the order).

    umount /dev/vg1/lv1

    e2fsck -f /dev/vg1/lv1

    resize2fs dev vg1 lv1 100m reduces the file system to 100m

    lvreduce -l 100m dev vg1 lv1 reduce the logical volume to 100m

    mount -a

    Steps:1Compress the Dev Fedora Swap partition.

    umount /dev/fedora/swap

    e2fsck -f /dev/fedora/swap

    resize2fs /dev/fedora/swap 1g

    lvreduce -l 1g /dev/fedora/swap

    The swap partition was successfully converted to 1 gib

    Result: View with pvscan command, remaining space.

    2.Extend the Dev Fedora Home partition.

    Run lvextend -l + dev fedora home

    resize2fs /dev/fedora/home

    Result: Use the df command to view the space usage of the file system.

    Logical Volume Dev Fedora Home has been successfully changed from 16G to 21G!

  2. Anonymous users2024-02-09

    pq is OK, but the main partition is OK, that is, the system area, and the logic is the other 3 areas. A hard disk can be divided into up to 4 zones. I'm using Paragon Hard Disk Manager Retail Lite Paragon Hard Disk Manager is a universal disk management master!

    The best alternative to partitionmagic! It can.

  3. Anonymous users2024-02-08

    To save your time, I won't go into a long story.

    Please use partitionmagicThe reason why I recommend it is that it is convenient to use it to process partitions without having to remove files.

    Considering that the total capacity of your three plates should be 500g. Then you don't have to think about GPT tables and the like.

    Well, if you are a Win7 user, please also find the latest version of Partitionmagic. If not, then grab a random version and you can use it.

    In the Create task pane of PartitionMagic, there will be an option to resize the partition.

    Just follow the prompts, the prompts of the software are complete enough, I just relied on the prompts to succeed once, so you are fine

    Ah, by the way, after formatting with this method, you can delete the pmWhen you reinstall the system, you won't have any problems with the partitions you made.

    Good luck getting it done as soon as possible, that's it!

  4. Anonymous users2024-02-07

    You can try to adjust it in the disk manager, and if the disk manager can't be adjusted, then use a third-party partition management software to adjust it. Although resizing a partition is non-destructive, it does not mean that there is no risk. Therefore, it is best to make a backup of the data before the actual adjustment.

  5. Anonymous users2024-02-06

    This is because LVM is able to dynamically resize logical volumes. In fact, your LVM volume is on the same partition according to the usual partition concept (of course, it depends on how you partition it when you install it, I'm talking about the general situation), each LVM volume can be dynamically expanded to the size of the entire partition, as long as the sum of the used space of your three logical volumes is less than the size of this partition, then you can continue to copy files to any LVM volume.

  6. Anonymous users2024-02-05

    It seems that you don't have a clear understanding of the basic concept of LVM. First, create a new partition physical volume (PV), then set the partition type to LVM, then you can create a volume group (VG) on the PV, and then divide the logical volume (LV) in the VG, and each logical volume is equivalent to a new partition. When you need to adjust the size of the partition (LV), if you want to expand the LV, you need to have the remaining unallocated space (free PE) in the VG to which it belongs, otherwise you need to reduce other LVs first to get the available PE.

    Again, LVM does not automatically resize dynamically, but requires the user to adjust it.

Related questions
14 answers2024-05-09

There are three types of hard disk partitions: primary disk partitions, extended disk partitions, and logical partitions. >>>More

26 answers2024-05-09

Open the Easeus Partition Master partition tool;

Purpose: To free up 20GB of free space for disk C to be used on disk D. >>>More

9 answers2024-05-09

XP system. Right-click on my computer --Properties--Advanced--Performance Item Point Modification--Advanced--Point Virtual Memory Item Change, it is generally recommended that the minimum is set to multiple of the physical memory, and the maximum is set to 2 times, if the physical memory is 1G, and the disk space is more than 5G, the maximum is set to 4095. >>>More

14 answers2024-05-09

The steps are as follows1. Double-click on the desktop to open the excel you want. >>>More

6 answers2024-05-09

Barcode software is a professional label design software, in the process of making labels, the adjustment of the font size of the label is also very important. Barcode software also provides a very user-friendly font size setting tool, the operation can be referred to: barcode software about the font setting problem. >>>More