Skip to content
Snippets Groups Projects
maintenance.md 1.24 KiB
Newer Older
  • Learn to ignore specific revisions
  • Antonio Falabella's avatar
    Antonio Falabella committed
    ### Check mon status from socket
    ```
    sudo ceph --admin-daemon /var/run/ceph/ceph-mon.qn-cnfslhc.asok config help
    sudo ceph --admin-daemon /var/run/ceph/ceph-mon.qn-cnfslhc.asok config show
    sudo ceph --admin-daemon /var/run/ceph/ceph-mon.qn-cnfslhc.asok
    
    ```
    
    Antonio Falabella's avatar
    Antonio Falabella committed
    ### Enable msgr2
    Enable msgr2 in nautilus
    ```
    ceph mon enable-msgr2
    ```
    
    Antonio Falabella's avatar
    Antonio Falabella committed
    ### OSD remove
    ```
    $ ceph osd out osd.<ID>
    $ systemctl stop osd.<ID>
    $ ceph osd down osd.<ID>
    $ ceph osd purge osd.<ID>
    $ ceph auth rm  osd.<ID>
    ```
    
    ### Disk clean up
    check spurious partitions with `lsblk` and then remove them with
    ```
    dmsetup remove <partition hash>
    
    
    for line in $(lsblk | grep block | awk '{print $1;}'); do id=${line:2} && dmsetup remove $id; done
    
    
    Antonio Falabella's avatar
    Antonio Falabella committed
    ```
    Zap the the disk with `gdisk`
    ```
    gdisk  /dev/sdbe < input
    ```
    where input is a file with this content:
    ```
    x
    z
    y
    y
    ```
    
    Antonio Falabella's avatar
    Antonio Falabella committed
    ### Pools
    ```
    ceph pool list
    ceph pool status
    ceph osd pool delete  --yes-i-really-really-mean-it
    ```
    
    ### OSD PG recreate
    This is a destructive operation, to recover a severely degraded cluster.
    Retrieve the list of inactive PGs for a given <state> :
    ```
    ceph pg dump_stuck inactive | grep <state>
    ```
    ```
    for i in `ceph pg dump_stuck inactive | grep <state> | awk '{print $1}'`;do ceph osd force-create-pg $i --yes-i-really-mean-it;done
    ```