Results 1 to 2 of 2

Thread: lvextend "write error failed: No space left on device"

  1. #1
    Join Date
    Jan 2019
    Beans
    1

    lvextend "write error failed: No space left on device"

    My root directory has run out of space. I have been trying to extend the space available to my root volume.

    lvdisplay output:
    Code:
    pciadmin@phabricator2:~$ sudo lvdisplay
      --- Logical volume ---
      LV Path                /dev/phabricator2-vg/root
      LV Name                root
      VG Name                phabricator2-vg
      LV UUID                fcl37J-r6yY-qmxP-8Sxa-lOgi-bduJ-vyze44
      LV Write Access        read/write
      LV Creation host, time phabricator2, 2019-01-23 12:59:28 -0700
      LV Status              available
      # open                 1
      LV Size                5.16 GiB
      Current LE             1320
      Segments               2
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Block device           252:0
    
    
      --- Logical volume ---
      LV Path                /dev/phabricator2-vg/swap_1
      LV Name                swap_1
      VG Name                phabricator2-vg
      LV UUID                GNK5cA-qbcy-jSr8-vk4t-wVZ7-HPmF-gD9mYG
      LV Write Access        read/write
      LV Creation host, time phabricator2, 2019-01-23 12:59:28 -0700
      LV Status              available
      # open                 2
      LV Size                4.36 GiB
      Current LE             1117
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Block device           252:1
    df output:
    Code:
    pciadmin@phabricator2:~$ sudo df
    Filesystem                        1K-blocks    Used Available Use% Mounted on
    udev                                2127356       0   2127356   0% /dev
    tmpfs                                429480    6108    423372   2% /run
    /dev/mapper/phabricator2--vg-root   5166504 5150120         0 100% /
    tmpfs                               2147392       0   2147392   0% /dev/shm
    tmpfs                                  5120       0      5120   0% /run/lock
    tmpfs                               2147392       0   2147392   0% /sys/fs/cgroup
    /dev/xvda1                           482922   58225    399763  13% /boot
    tmpfs                                429584       0    429584   0% /run/user/1000
    pvdisplay output:
    Code:
    pciadmin@phabricator2:~$ sudo pvdisplay
      --- Physical volume ---
      PV Name               /dev/xvda5
      VG Name               phabricator2-vg
      PV Size               9.52 GiB / not usable 2.00 MiB
      Allocatable           yes (but full)
      PE Size               4.00 MiB
      Total PE              2437
      Free PE               0
      Allocated PE          2437
      PV UUID               zT75Qa-ZU2C-uEes-WhCS-aEe3-joyw-PGKexG
    
    
      --- Physical volume ---
      PV Name               /dev/xvda3
      VG Name               phabricator2-vg
      PV Size               9.06 GiB / not usable 1.34 MiB
      Allocatable           yes
      PE Size               4.00 MiB
      Total PE              2319
      Free PE               2319
      Allocated PE          0
      PV UUID               dDHJtE-agLF-tcAo-kCrG-07ji-Dl8e-XNMgYd
    vgdisplay output:
    Code:
    pciadmin@phabricator2:~$ sudo vgdisplay
      --- Volume group ---
      VG Name               phabricator2-vg
      System ID
      Format                lvm2
      Metadata Areas        2
      Metadata Sequence No  5
      VG Access             read/write
      VG Status             resizable
      MAX LV                0
      Cur LV                2
      Open LV               2
      Max PV                0
      Cur PV                2
      Act PV                2
      VG Size               18.58 GiB
      PE Size               4.00 MiB
      Total PE              4756
      Alloc PE / Size       2437 / 9.52 GiB
      Free  PE / Size       2319 / 9.06 GiB
      VG UUID               jiyC26-q1Q4-huAX-l7iM-UIEE-3Jcv-E0CiLg
    When I try to run lvextend on root, I get the following error:
    Code:
    pciadmin@phabricator2:~$ sudo lvextend -L+8G /dev/phabricator2-vg/root
      /etc/lvm/archive/.lvm_phabricator2_2193_124559942: write error failed: No space left on device
      Volume group "phabricator2-vg" metadata archive failed.
    I'm not sure what I'm missing.

  2. #2
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: lvextend "write error failed: No space left on device"

    Delete or move some files from root to make room to write additions to /etc/lvm/archive

    Then, when extending the lv, you have to resize the filesystem too. Try:
    Code:
     sudo lvextend --resizefs --extents= +2000 /dev/phabricator2-vg/root
    This adds 2000 of the 2319 free extents, which is about 8 GB, and resizes the file system at the same time.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •