Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # define where to export
- restorepath=/home/restore
- # define path where your problematic osd mounted
- osdpath=/var/lib/ceph/osd/ceph-3
- # getting problem pgs
- pgs=$(ceph health detail | grep ^pg | grep down | grep -v stuck | sort)
- #echo "$pgs"
- # cycling thourgh them
- echo "$pgs" | while read -r pg; do
- # get pg id
- pgid=$(echo $pg | awk '{print $2}')
- # or simply restore on current machine
- ceph-objectstore-tool --op export --pgid $pgid --data-path $osd --journal-path /var/lib/ceph/osd/ceph-3/journal --file $restorepath/$pgid.export
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement