Mdadm and LVM

  • Category: 電腦相關
  • Last Updated: Wednesday, 25 January 2017 22:50
  • Published: Wednesday, 25 January 2017 15:22
  • Written by sam

拆開VG,組成Raid(mdadm)

root@wantgooA:/# vgdisplay 
  --- Volume group ---
  VG Name               sam_new_elk
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               2.00 TiB
  PE Size               4.00 MiB
  Total PE              523774
  Alloc PE / Size       523774 / 2.00 TiB
  Free  PE / Size       0 / 0   
  VG UUID               QLDsV9-m7Y0-Bwwm-hZ2g-7QJJ-jcXo-nNjpe6
root@wantgooA:/# vgs
  VG          #PV #LV #SN Attr   VSize VFree
  sam_new_elk   2   1   0 wz--n- 2.00t    0

這個是目前的PV配置

Read more: Mdadm and LVM

Elashticsearch Erase All Documents

  • Category: 電腦相關
  • Last Updated: Friday, 20 January 2017 13:53
  • Published: Friday, 13 January 2017 10:49
  • Written by sam

Quickly Erase All Documents from an ElasticSearch Index

root@wantgooA:/# curator_cli show_indices
root@wantgooA:/# curl -GET http://localhost:9200/_cat/indices
GET /_cat/indices?v
yellow open   logstash-2016.05.07 UfBUsAKdR7CbYKj3Luxvkw   5   1       1530            0      702kb          702kb
yellow open   logstash-2016.12.05 EfG_fl9fTauE9bBdTlNOFA   5   1   18292843            0      8.1gb          8.1gb
yellow open   logstash-2016.10.23 tbvtpEpBTxKLTOPEeh1ftw   5   1      15940            0      4.3mb          4.3mb
yellow open   logstash-2016.03.29 1yGuXTh1QXabRx5xIftVbg   5   1        260            0      274kb          274kb
yellow open   logstash-2016.09.16 AzzX7nRtQ0Gr8SgyflTM0Q   5   1       3925            0      1.7mb          1.7mb
yellow open   logstash-2016.12.06 NU53zD8kR7O4tmBDnI4iCQ   5   1   11222311            0        5gb            5gb
yellow open   logstash-2016.10.27 Mk2dm4t-T0SpTZG0sUx-DA   5   1       5365            0      2.1mb          2.1mb
yellow open   logstash-2016.12.18 PovV_lijQJS93Ho7CiJv5Q   5   1   14439195            0        4gb            4gb
yellow open   index               zwHfPW0lQHuNd9vL9Fxw4Q   5   1          0            0       800b           800b

If you want erase 2016.03.29 index

Read more: Elashticsearch Erase All Documents