0

I have a server that processes data and it started giving me this error:

write error: no space left on device
cannot create temp file for here-document: no space left on device

Though I use ubuntu 14.04 as my primary OS, managing the file system is beyond my understanding and hence this question.

df -h 

prints

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       99G   94G   16M 100% /
/dev/sda2             477M   39M  413M   9% /boot
/dev/sda1             200M  264K  200M   1% /boot/efi
/dev/mapper/VolGroup-lv_home
                      1.5T  453G  996G  32% /home
shmfs                  30G     0   30G   0% /dev/shm
shmfs                  30G     0   30G   0% /dev/shm
shmfs                  30G     0   30G   0% /dev/shm

Apparently I do not have much space left on my lv_root. I ran

df -i

Filesystem              Inodes  IUsed     IFree IUse% Mounted on
/dev/mapper/VolGroup-lv_root
                       6553600 143617   6409983    3% /
/dev/sda2               128016     22    127994    1% /boot
/dev/sda1                    0      0         0     - /boot/efi
/dev/mapper/VolGroup-lv_home
                     101588992  44952 101544040    1% /home
shmfs                  4085528      1   4085527    1% /dev/shm
shmfs                  4085528      1   4085527    1% /dev/shm
shmfs                  4085528      1   4085527    1% /dev/shm

And this indicates that I have lots of free space left (not sure if my understanding is correct).

I tried removing files from /var/log but since those files were not much bigger in size, nothing much happened. I read about lvextend and thought I could increase the size of lv_root VolGroup.

sudo lvs --segments

gives me

LV      VG       Attr       #Str Type   SSize  
  lv_home VolGroup -wi-ao----    1 linear   1.36t
  lv_home VolGroup -wi-ao----    1 linear 157.78g
  lv_root VolGroup -wi-ao----    1 linear 100.00g
  lv_swap VolGroup -wi-ao----    1 linear  20.00g

sudo vgdisplay VolGroup

gives me

 VG Name               VolGroup
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               1.63 TiB
  PE Size               4.00 MiB
  Total PE              427545
  Alloc PE / Size       427545 / 1.63 TiB
  Free  PE / Size       0 / 0   

After knowing all my partitions sharing the same volume group name, VolGroup and the VG Size is 1.63 TiB, I tried increasing the lv_root space by 400Gib

sudo lvextend -L +400G /dev/mapper/VolGroup-lv_root

but got this error message

Insufficient free space: 102400 extents needed, but only 0 available

The same message with different extents needed for 40G.

The operating system of the server is RHEL 6, and I am processing data which is inputting to Oracle DB.

1

I'll try to answer your question the best I can, here is the first one:

Apparently I do not have much space left on my lv_root. I ran

[...]

And this indicates that I have lots of free space left (not sure if my understanding is correct).

So you do not have much space left on your lv_root volume, mounted on root: 16MB are left, while you still have nearly a TB free on your /home mounted volume( lv_home). The second command with the switch "-i" is actually not indicative of the space you have left but the number of inodes left on your disk, while a shortage of them can also result in a "no space left on device message" this is not the problem here.

Next issue here:

After knowing all my partitions sharing the same volume group name, VolGroup and the VG Size is 1.63 TiB, I tried increasing the lv_root space by 400Gib

The VG size IS 1.63TB, however you cannot allocate 400GB to any LV because all of this space is currently allocated as returned by the last line of your vgdisplay command:

**Free PE / Size 0 / 0 **

You can see the actual repartition of this space in your lvs--segments command:

  • 1.36TB being assigned to your lv_home
  • 157.78GB also assigned to your lv_home
  • 100GB being assigned to your lv_root, which are almost depleted
  • 20GB assigned to your swap

Now to solve your issue here you could(at least the solutions I think of, not meaning it's all of them):

  1. free some space from your / mount by deleting files like you already tried
  2. free some space from your / mount by moving them to /home
  3. Add a new disk to your machine, then create a new PV on it, extend the VG and then the LV prior to resizing the partition(note: edited to update regarding to ignacio's comment)
  4. Assuming it's a VM and you can: extend the disk and then all the underlying PV, VG, LV etc...
  • 1
    "then add it to the PV" Or rather create a new PV on it. – Ignacio Vazquez-Abrams May 11 '18 at 11:14
  • @Ignacio Thanks for pointing that out, corrected my post. – Lencell May 11 '18 at 11:21
  • @Lencell Thank you...I actually tried only 1 and 2 of your suggestions and made some more space. Suggestions 3 and 4 are beyond my current comprehension and hence would not do that. Besides, removing files, there were some files which I could actually move to the home partition, which I did. The problem is temporarily solved, though will be teething soon. Thanks a ton again. – Apricot May 11 '18 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.