/var full, how to use lvextend ?

Posted on 2009-12-25
Last Modified: 2013-12-06

We run Postfix and our /var is full :
/var Linux Native Filesystem (ext3) LVM VG sysvg, LV var 100%

We tried the lvextend command with something like :
lvextend -L+1G /var
but we get the error message :
"/var": Invalid path for Logical Volume
Any Idea ?
Question by:javilmer
    LVL 4

    Expert Comment

    lvextend -L +1024 /dev/vg01/lvol10 /var

    /dev/vg01/lvol10 is your physical volume

    Author Comment

    I got an error message :

    Volume group "vg01" not found
      Volume group vg01 doesn't exist

    LVL 4

    Expert Comment

    first identify your volume group
    LVL 29

    Expert Comment

    by:Michael W
    Please post a copy of the following: 'lvscan' & 'vgdisplay'


    Author Comment

    > lvscan
      ACTIVE            '/dev/sysvg/root' [3.00 GB] inherit
      ACTIVE            '/dev/sysvg/var' [4.00 GB] inherit
      ACTIVE            '/dev/sysvg/data' [14.88 GB] inherit
      ACTIVE            '/dev/sysvg/usr' [4.00 GB] inherit
      ACTIVE            '/dev/sysvg/swap' [2.00 GB] inherit
    > vgdisplay
      --- Volume group ---
      VG Name               sysvg
      System ID            
      Format                lvm2
      Metadata Areas        1
      Metadata Sequence No  6
      VG Access             read/write
      VG Status             resizable
      MAX LV                0
      Cur LV                5
      Open LV               5
      Max PV                0
      Cur PV                1
      Act PV                1
      VG Size               33.78 GB
      PE Size               32.00 MB
      Total PE              1081
      Alloc PE / Size       892 / 27.88 GB
      Free  PE / Size       189 / 5.91 GB
      VG UUID               not1mN-b5dm-b4nB-4x4g-M5DJ-fTsy-T2u1rh

    LVL 29

    Accepted Solution

    The 'sysvg' is the LVM volume group name.

    To extend the 'var' partition, do this:

    'lvextend -L +1G /dev/sysvg/var'
    'resize2fs /dev/sysvg/var'


    Author Comment

    OK, I'll try, no danger to loose some datas ?
    LVL 29

    Expert Comment

    by:Michael W
    Nope. 'lvextend' only extends the logical volume limits.

    However, 'lvreduce' can (and usually does) corrupt data as it is used to reduce the logical volume limits.

    Author Closing Comment

    Thank you, great help, and happy new year !!!

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
    Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
    In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
    In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now