Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9124467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:34:40+00:00 2026-06-17T06:34:40+00:00

While a Chef recipe is executing, I want to determine if there is sufficient

  • 0

While a Chef recipe is executing, I want to determine if there is sufficient free disk space available to perform an operation.

How best to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:34:41+00:00Added an answer on June 17, 2026 at 6:34 am

    Ohai detects certain properties of a a node each time it is run. These properties are captured as automatic attributes and are available to you as node attributes.

    The attribute node[‘filesystem’] contains information about each of the devices on your system. To get the space available in kb, for a specific device:

    node['filesystem']['/dev/xvda1']['kb_available']
    

    The following is an example of the filesystem attribute JSON from Ohai:

       "filesystem": {
      "/dev/xvda1": {
        "kb_size": "521882300",
        "kb_used": "119914572",
        "kb_available": "375474240",
        "percent_used": "25%",
        "mount": "/",
        "fs_type": "ext4",
        "mount_options": [
          "rw"
        ],
        "uuid": "248b8180-f75f-48fc-a8be-e3ff3506c4d6"
      },
      "tmpfs": {
        "kb_size": "1987292",
        "kb_used": "0",
        "kb_available": "1987292",
        "percent_used": "0%",
        "mount": "/dev/shm",
        "fs_type": "tmpfs",
        "mount_options": [
          "rw",
          "rootcontext=\"system_u:object_r:tmpfs_t:s0\""
        ]
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While running a recipe for Pyramid, the following is failing in chef-solo : ================================================================================
While there is a lot of good resources on traversing the DOM with jQuery
While opening C++ source file in Eclipse editor, there I can see syntax error
While I believe that there is no actually declared limit and the number of
While executing the code below I am getting HTTP 500 Internal Server Error. public
I've got a resource in a chef recipe that I'd like to be optional.
In TIJ4 P1208, there is one consumer (WaitPerson) and one producer (Chef). Each synchronize
I am fairly new to ruby and chef, I wanted to know if there
While debugging and keep pressing F5, if the source code does not exist, eclipse
While trying to build the mysql2 gem with ruby 1.9.2-p320 on Fedora 16, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.