How to resize hard drive on Linux systems with LVM?

Follow

Comments

8 comments

  • Avatar
    Sivaji

    Hello,

     

    I followed the steps mentioned above, my server does not have Pool name such as Centos. so the command - vgextend centos /dev/sda4 Is not working please advice. Screesnhot below. 

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Sivaji,

    Hello!

    This article is not applicable to your server as LVM is not used. 

    To learn more about LVM, check official CentOS article.

    0
    Comment actions Permalink
  • Avatar
    Luis Zubeldia

    how about shrinking ?

    0
    Comment actions Permalink
  • Avatar
    Alexandr Redikultsev

    Hi @Luis Zubeldia,

    Reducing the size of LVM is potentially dangerous operation that can erase some data, therefore it is not recommenced. 

    You can do this on your own risk using any guide across the internet, for example the one below (there are no limitations on Plesk side regarding it):

    https://www.rootusers.com/lvm-resize-how-to-decrease-an-lvm-partition/

    0
    Comment actions Permalink
  • Avatar
    luis serrano

    Hola 

    tengo un gran problema con mi servidor. tengo varias particiones y mi pagina esta montada en Disk /dev/mapper/vg00-var hace un tiempo pude aumentar el tamaño

    pero ahora no tengo que hacerlo y quedar sin espacio, pero en / home tengo mas de 800G,

    Ya te he intentado todo pero no soy experto,

    ¿Cómo puedo aumentar / no puedo afectar mi página?

    root@s21344409:~# fdisk -l
    Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x31dafc72

    Device Boot Start End Sectors Size Id Type
    /dev/sda1 2048 8390655 8388608 4G fd Linux raid autodetect
    /dev/sda2 8390656 12584959 4194304 2G 82 Linux swap / Solaris
    /dev/sda3 12584960 1953525167 1940940208 925.5G fd Linux raid autodetect


    Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x3b4d5332

    Device Boot Start End Sectors Size Id Type
    /dev/sdb1 2048 8390655 8388608 4G fd Linux raid autodetect
    /dev/sdb2 8390656 12584959 4194304 2G 82 Linux swap / Solaris
    /dev/sdb3 12584960 1953525167 1940940208 925.5G fd Linux raid autodetect


    Disk /dev/md1: 4 GiB, 4294901760 bytes, 8388480 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/md3: 925.5 GiB, 993761296384 bytes, 1940940032 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mapper/vg00-usr: 5 GiB, 5368709120 bytes, 10485760 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mapper/vg00-var: 78 GiB, 83751862272 bytes, 163577856 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mapper/vg00-home: 837.5 GiB, 899271360512 bytes, 1756389376 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mapper/vg00-opt: 5 GiB, 5368709120 bytes, 10485760 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    root@s21344409:~#

    estaria muy agradecido con su ayuda 

    saludos y gracias

     

    0
    Comment actions Permalink
  • Avatar
    Anzhelika Khapaknysh (Edited )

    Hi @luis serrano,

    There are no guarantees that decreasing the space from /home won't cause data lost.
    I recommend contacting our Professional Services Team which is dealing with such tasks and will be able to assist you on a paid basis.

    0
    Comment actions Permalink
  • Avatar
    Vistanetix Inc

    My cfdisk screen only shows sda1 NC Primary GPT 480 GB size

    No (New) Menu selection on bottom menu.  Starts with (Bootable)...

    Please advise.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Vistanetix Inc,

    As I understand, cfdisk shows for you only allocated disk space.

    The fact that free disk space is not displayed most probably means that new disk space is not detected by the OS. This needs to be checked by server administrator or with hosting provider in case virtual environment is used.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request