• How to resize a soft RAID using mdadm (by replacing the old disks)

    15 min read

    soft raid mdadm resize linux expand replace

    If you have a linux software RAID (in this case RAID 5) and you want to resize it, you can do it by replacing underlying disks with larger ones. This is a step-by-step guide on how to do it without loosing data and without having to copy data across.

    14/04/2025

    Read more...
  • SMART Log Decoder (both Seagate and non-Seagate)

    6 min read

    SMART Seagate Linux drive decoder Raw_Read_Error_Rate Seek_Error_Rate

    On Seagate disks, the SMART attributes are often encoded in a way that requires special handling, such as Raw_Read_Error_Rate and Seek_Error_Rate. This tool helps decode and interpret those attributes for better understanding of the drive's health.

    11/04/2025

    Read more...
  • How to use less with colored output

    2 min read

    If we try to use less on an application with colored output it will get messy like this:

    $ terraform plan | less
    (...)
    Terraform used the selected providers to generate the following execution
    plan. Resource actions are indicated with the following symbols:
      ESC[33m~ESC[0m update in-place
    ESC[0m
    Terraform will perform the following actions:
    
    ESC[1m  # module.spinnaker.kubernetes_default_service_account.default_saESC[0m will be updated in-placeESC[0mESC[0m
    ESC[0m  ESC[33m~ESC[0mESC[0m resource "kubernetes_default_service_account" "default_sa" {
            ESC[1mESC[0midESC[0mESC[0m                              = "spinnaker-green/default"
            ESC[90m# (2 unchanged attributes hidden)ESC[0mESC[0m
    
    
          ESC[31m-ESC[0m ESC[0msecret {
              ESC[31m-ESC[0m ESC[0mESC[1mESC[0mnameESC[0mESC[0m = "default-token-m2z4q" ESC[90m->ESC[0m ESC[0mESC[90mnullESC[0mESC[0m
            }
            ESC[90m# (1 unchanged block hidden)ESC[0mESC[0m
        }
    
    ESC[0mESC[1mPlan:ESC[0m 0 to add, 1 to change, 0 to destroy.
    ESC[0mESC[90m
    
    (...)
    

    22/10/2021

    Read more...

From pet to cattle
Treat your kubernetes clusters like cattle, not pets
Categories
tags related to this category