Posts

Showing posts from May, 2025

Expand EBS volume and extend logical volume

 1. Modify the target EBS volume to increase it's size 2.  sudo pvs  --> to check the pv that needs to be resized inside the instance 3. sudo pvresize /dev/xxxxxxx  displayed in the step 2 4. sudo pvs  -> to the the new volume size 5. sudo vgs  -> to see the detailed vgs 6. sudo lvextend -L +20G /dev/vg_name/lv_name 7. df -kh  -> to check the current value before  extending 8. sudo xfs_growfs /dev/vg_name/lv_name df -h to check the current value after extending #IF YOUR filesystem is ext4, please change the xfs_growfs to another value

Understand Persistent Volume, Volume Group, Logical volume

 We can have multiple persitent volumes to be attached to an EC2 instance Then we will group some of the volumes into a volume group After that we can create multiple logical volumes from that volume group

Resize EBS volume is AWS

 sudo file -s /dev/nvme0n1 -> xfs sudo lsblk if the file system is mounted directly to the EBS volume, then we can use the command below  sudo xfs_growfs -d /your-folder-path df -hT sudo lsblk  ---------- Can not resize down the EBS volume Before making changes, please take a snapshot

Wp

------------------Sheet Workplan----------------- Date 1. Overview     Purpose:     Contents: Environment:  WorkTargets Current issues, Analysis Result, Joblist Reviewer: 2. Working Schedule:     Service impact     Checker     Supervisor:    3. Pre-backup job Backup target Backup method Backup time Remark 4. Working process and recover process 5. Emergency contact list 6. Othes ------------------Sheet Job Detail list----------------- ------------------Sheet Job process----------------- No: Prework Job Title: Setup Job Content: Details about the job Worker: The person in charge, or a group of people Start-time: End-time: Time:  System job:          Where: Servers, urls          Commands:  Checkers:  Who reviews the Job  Checking method:           Where:           Commands: Check expected:  ...

Elasticsearch version migration

1. Prepare files and packages and plugins 2. Extract elasticsearch and install plugin       sudo bin/elasticsearch-plugin install file:///path/to/plugin.zip 3. Compress the elasticsearch after installing plugins 4. Move the compressed elasticsearch to the remote servers 5. Extract the compressed elasticsearch on the remote servers 6. Update concurrent recovery for the current cluster 7. Disable shard allocation 8. Node flush curl -X POST "localhost:9200/_flush/synced?pretty" GET /_cluster/health?pretty 9. Shutdown 10. Startup and tail logs 11. health_check node GET /_cluster/health?pretty 12. enable shard allocation host=$1 port=$2 curl -XPUT "http://YY.XX.ZZZ.YXZ:9200/_cluster/settings" -H 'Content-Type: application/json' -d '{ "transient" : { "cluster.routing.allocation.enable" : null } }' curl -XPUT "http://YY.XX.ZZZ.YXZ:9200/_cluster/settings" -H 'Content-Type: application/json' -d '{ ...

Reroute index shard from one node to another node

  POST /_cluster/reroute {    "commands": [    {       "move": {          "index": "my_index",          "shard": 0,          "from_node":  "node1",          "to_node": "node2"        }    }   ]  } { "commands": [ { "move": { "index": "my_index", "shard": 0, "from_node": "node1", "to_node": "node2" } } ] }