fatal: write error: No space left on device & fatal: index-pack failed

Sara H 1 Reputation point
2022-01-04T01:18:30.557+00:00

I am running Redhat 8.4 on a D1v2 Azure VM and I am getting the following error message as a result of a "git clone"command:

162071-image.png

even though the disk is not full:

161960-image.png

and free inodes are still available:

162025-image.png

I have rebooted the VM once but the error persists. Would appreciate your assistance and thanks in advance.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,151 questions
Azure Red Hat OpenShift
Azure Red Hat OpenShift
An Azure service that provides a flexible, self-service deployment of fully managed OpenShift clusters.
71 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 23,491 Reputation points Microsoft Employee
    2022-01-06T00:54:56.743+00:00

    Hello, @Sara H !

    The "write error: No space left on device" that you are getting can be due to a lot of different causes. Most of these are related to the OS/Linux or Git but you can check the drive for errors as well. This is the troubleshooting list that I would run through (and it sounds like you've already done some of this).

    Linux/OS

    • Confirm that there is actually space available.
      Run du and df to confirm that you have available space on your OS.
    • Check to see if space is in use by a process.
      Check open files to see if a deleted file has been reserved by a process with lsof / | grep deleted.
    • Check inodes.
      See if you hit the max allocation of inodes with df -i /.

    Git

    • Run git gc to remove unreachable objects.
      Running git gc will perform a number of housekeeping tasks within your current repository, including compressing file revisions and removing unreachable objects.
    • Check the size of your Git repository to see if it's larger than 1GB.
      There's no file size or file number limit for Git, but if your repository is above 1GB or has more than 100MB per file, there are some tips that can be found in this thread (and some have suggested adding large files to .gitignore).

    VM Disk

    • Check for bad blocks (fsck).
      You can use fsck to check for bad filesystem blocks.

    Additional resources:

    0 comments No comments