How to check what consumed disk space in HA

Hi, I have installed HA with Home Assistant Operating System approach on pi4, 128GB SD card. My recorder is set at 10 days. I configured some backup and store only one copy on local and the rest to Google drive.

Recently I got warning about usable space is low (<10GB), I have no idea what eat up my space the most. I checked my log and only a few MB used. Is there a way to check the usage detail?

I would start with installing add on Samba, FTP or terminal and check the folder sizes, so you can see where the storage is being consumed. You can also install the system sensors, but that is just to alert, not to solve the issue.

System Monitor - Home Assistant (home-assistant.io)

1 Like

I have those installed. However I did check on each folder, not found any suspicious. I wonder I can check add-on stuff which is installed on separate container. Those one I don’t have visibility. 128GB SD card is big considered 10 days retention and one backup copy though.

you can do a full backup, and then export the file, to see what addon is eating
i use portainer addon to clean up old images left

1 Like

Good idea. Let me try. By the way did add-on portainer work in HA in your case? I tried it last year but no luck.

yeah, i still have it, but seems deprecated now

I agree with the use of system monitor inside your config just add:

  - platform: systemmonitor
    resources:
      - type: disk_use_percent
        arg: /
      - type: disk_use_percent
        arg: /config
      - type: disk_use
        arg: /
      - type: disk_free
        arg: /
      - type: memory_free
      - type: memory_use
      - type: memory_use_percent
      - type: load_1m
      - type: load_5m
      - type: load_15m
      - type: processor_use
      - type: last_boot

use swiss army knife (hacs frontend?) to display with


title: Power
path: sake7
panel: false
theme: 'NM - Dark Steelblue'
cards:
#------------------------------------------------------------------------------
- type: vertical-stack
  cards:
# =================================
    - type: custom:decluttering-card
      template: header_template
      variables:
        - content: 'Servers'

    - type: custom:decluttering-card
      template: header_template
      variables:
        - content: 'HASS IO'
        - font_color: var(--secondary-text-color)
        - font_size: 3em

    - type: horizontal-stack
      cards:
        #
        # Multiple circles with system cpu monitoring. NIce for easy CPU changes in graph
        #
        #######################################################################

        - type: 'custom:swiss-army-knife-card'
          entities:
            # Memory
            - entity: sensor.memory_use_percent
              decimals: 0
              name: 'NUC'
              area: 'Main Server'
              icon: mdi:memory
            # Disk
            - entity: sensor.disk_use_percent
              decimals: 0
              icon: mdi:harddisk
            # CPU
            - entity: sensor.processor_use
              decimals: 0
            # System Load
            - entity: sensor.load_1m
              decimals: 2
              unit: '1m'
            - entity: sensor.load_5m
              decimals: 2
              unit: '5m'
            - entity: sensor.load_15m
              decimals: 2
              unit: '15m'

            # Disk
            - entity: sensor.disk_use
              name: 'Used:'
              decimals: 0
              icon: mdi:harddisk
            - entity: sensor.disk_free
              name: 'Free:'
              decimals: 0
              icon: mdi:harddisk

            # Memory
            - entity: sensor.memory_use
              name: 'Used:'
              decimals: 0
              icon: mdi:memory
            - entity: sensor.memory_free
              name: 'Free:'
              decimals: 0
              icon: mdi:memory


          # Developer settings. Should be removed in production
          dev:
            debug: false
            ts: true
            performance: false
          
          # Set relative x/y aspectratio: twice as wide as it is high
          aspectratio: 2/1

          # Define the layout of the card
          # ==============================================================================
          layout:
            # Define global card styles.
            # The card gets a Neumorphic overall filter, which only works on the 1st level
            # of SVG objects it sees. As a result these objects morph visually into single
            # objects if they are (partially) drawn over each other.
            #
            # The Used/Free rectangle and disk free percentage segmented arc are an example
            # of this: the segmented arc is partially drawn on top of the rectangle.
            styles:
              card:
              toolsets:
                filter: url(#nm-1)
            
            # Finally, the toolsets definitions
            toolsets:

              # ==============================================================================
              - toolset: memory-free-used
                position:
                  cx: 35
                  cy: 74
                tools:
                  - type: rectex
                    id: 0
                    position:
                      cx: 50
                      cy: 50
                      width: 60
                      height: 20
                      radius:
                        all: 2
                  # Used
                  - type: name
                    id: 1
                    position:
                      cx: 25
                      cy: 45
                    entity_index: 8
                    # Define css style of the name tool.
                    # Each part of the tool has its own style definition. For single part tools
                    # like the 'name' tool, the style definition equals the tool type.
                    # For multi-part tools, each part has its own style definition.
                    styles:
                      name:
                        font-size: 5.0em
                        text-anchor: start
                  - type: state
                    id: 2
                    position:
                      cx: 63
                      cy: 45
                    entity_index: 8
                    styles:
                      state:
                        font-size: 6em
                        font-weight: 700
                        text-anchor: end

                  # Free
                  - type: name
                    id: 3
                    position:
                      cx: 25
                      cy: 55
                    entity_index: 9
                    styles:
                      name:
                        font-size: 5em
                        text-anchor: start
                  - type: state
                    id: 4
                    position:
                      cx: 63
                      cy: 55
                    entity_index: 9
                    styles:
                      state:
                        font-size: 6em
                        font-weight: 700
                        text-anchor: end

              # ==============================================================================
              - toolset: memory
                # Use pre-defined template for this part.
                # Template has variables.
                template:
                  name: toolset_segarc_icon_state
                  variables:
                    - entity: 0
                    - show_scale: false
                position:
                  cx: 72.5
                  cy: 74
                  # Scale to 80% of toolset template.
                  scale: .8
                # Overwrite template with the following configuration not covered by the template
                # variables. id is required to make this work. So much possibilities...
                tools:
                  - type: segarc
                    id: 0
                    show:
                      scale: true
                      style: 'colorstops'
                    segments:
                      colorstops:
                        gap: 1
                        # arc can be 'followcolorstop', or 'followvalue'
                        arc_color: 'followcolorstop'
                        colors:
                          00: 'DarkSeaGreen'
                          70: 'yellow'
                          80: 'orange'
                          90: 'red'

              # ==============================================================================
              - toolset: areatoolset
                position:
                  cx: 195
                  cy: 95
                  scale: 1
                tools:
                  # Areas 0 refers to the first entity in the list, ie index 0
                  - type: area
                    id: 0
                    entity_index: 0
                    position:
                      cx: 50
                      cy: 50
                    styles:
                      area:
                        font-size: 6em
                        text-anchor: end
              
              # ==============================================================================
              - toolset: disc-free-used
                position:
                  cx: 35
                  cy: 26
                tools:
                  - type: rectex
                    id: 0
                    position:
                      cx: 50
                      cy: 50
                      width: 60
                      height: 20
                      radius:
                        all: 2
                  # Used
                  - type: name
                    id: 1
                    position:
                      cx: 25
                      cy: 45
                    entity_index: 6
                    styles:
                      name:
                        font-size: 5em
                        text-anchor: start
                  - type: state
                    id: 2
                    position:
                      cx: 63
                      cy: 45
                    entity_index: 6
                    styles:
                      state:
                        font-size: 6em
                        font-weight: 700
                        text-anchor: end

                  # Free
                  - type: name
                    id: 3
                    position:
                      cx: 25
                      cy: 55
                    entity_index: 7
                    styles:
                      name:
                        font-size: 5em
                        text-anchor: start
                  - type: state
                    id: 4
                    position:
                      cx: 63
                      cy: 55
                    entity_index: 7
                    styles:
                      state:
                        font-size: 6em
                        font-weight: 700
                        text-anchor: end
                    
              # ==============================================================================
              - toolset: disc
                template:
                  name: toolset_segarc_icon_state
                  variables:
                    - entity: 1
                    - show_scale: true
                position:
                  cx: 72.5
                  cy: 26
                  scale: .8
                tools:
                  - type: segarc
                    id: 0
                    show:
                      scale: true
                      style: 'colorstops'
                    segments:
                      colorstops:
                        gap: 1
                        # arc can be 'followcolorstop', or 'followvalue'
                        arc_color: 'followcolorstop'
                        colors:
                          00: 'DarkSeaGreen'
                          70: 'yellow'
                          80: 'orange'
                          90: 'red'

              # ==============================================================================
              - toolset: cpu
                template:
                  name: toolset_segarc_icon_state
                  variables:
                    - entity: 2
                    - show_scale: true
                position:
                  cx: 127.50
                  cy: 50
                  scale: 1
                tools:
                  - type: segarc
                    id: 0
                    show:
                      scale: true
                      style: 'colorstops'
                      lastcolor: true
                    segments:
                      colorstops:
                        gap: 1
                        # arc can be 'followcolorstop', or 'followvalue'
                        arc_color: 'followcolorstop'
                        colors:
                          00: '#FFF6E3'
                          10: '#FFE9B9'
                          15: '#FFDA8A'
                          20: '#FFCB5B'
                          22.5: '#FFBF37'
                          25: '#ffb414'
                          60: '#FFAD12'
                          70: '#FFA40E'
                          80: '#FF9C0B' 
                          90: '#FF8C06' 

              # ==============================================================================
              - toolset: load1m
                template:
                  name: toolset_segarc_icon_state
                  variables:
                    - entity: 3
                    - show_scale: false
                position:
                  cx: 165
                  cy: 22.5
                  scale: .7
                tools:
                  - type: segarc
                    id: 0
                    show:
                      style: 'colorlist'
                    scale:
                      min: 0
                      max: 2
                    segments:
                      colorlist:
                        gap: 1
                        colors:
                          - '#FFE9B9'
                          - '#FFCB5B'
                          - '#ffb414'
                          - '#FFA40E'
                          - '#FF8C06' 

              # ==============================================================================
              - toolset: load5m
                template:
                  name: toolset_segarc_icon_state
                  variables:
                    - entity: 4
                    - show_scale: false
                position:
                  cx: 171
                  cy: 58
                  scale: .6
                tools:
                  - type: segarc
                    id: 0
                    show:
                      style: 'colorlist'
                    scale:
                      min: 0
                      max: 2
                    segments:
                      colorlist:
                        gap: 1
                        colors:
                          - '#FFE9B9'
                          - '#FFCB5B'
                          - '#ffb414'
                          - '#FFA40E'
                          - '#FF8C06' 

              # ==============================================================================
              - toolset: load15m
                template:
                  name: toolset_segarc_icon_state
                  variables:
                    - entity: 5
                    - show_scale: false
                position:
                  cx: 152.5
                  cy: 82.5
                  scale: .5
                tools:
                  - type: segarc
                    id: 0
                    show:
                      style: 'colorlist'
                    scale:
                      min: 0
                      max: 2
                    segments:
                      colorlist:
                        gap: 1
                        colors:
                          - '#FFE9B9'
                          - '#FFCB5B'
                          - '#ffb414'
                          - '#FFA40E'
                          - '#FF8C06' 

i used their template and just added sensors. you may have to change a little bit around if you use this but i think they have a great gui here

1 Like

how did you set the recorder “at 10 days” ?

Dont know how to read the howto Recorder - Home Assistant

No longer supported.

The System Monitor YAML configuration is removed
This no longer works in version 2024.7.0. Please adjust before upgrading.
Configuring System Monitor using YAML is removed.
Your existing YAML configuration is automatically imported into the UI.
Remove the systemmonitor configuration from your configuration.yaml file and restart Home Assistant to resolve this issue.

Use “sensor.system_monitor_…”

does the glances integration still work?