Skip to content

Commit ef3e200

Browse files
committed
Merge branch 'main' into dev-hutch
2 parents e63c918 + ccc83a2 commit ef3e200

3 files changed

Lines changed: 63 additions & 3 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
#rocksdb-resharding
3+
4+
ceph osd set noout
5+
6+
for i in $(ceph osd ls-tree $(hostname -s)); do
7+
echo "Resharding OSD $i"
8+
OSD_DIR="/var/lib/ceph/osd/ceph-$i";
9+
if [ ! -d "$OSD_DIR" ]; then
10+
echo "$OSD_DIR does not exist on $(hostname -s), skipping"
11+
continue
12+
fi
13+
echo "$OSD_DIR exists on $(hostname -s), running reshard"
14+
set -x
15+
systemctl stop ceph-osd@$i
16+
ceph-bluestore-tool --path $OSD_DIR fsck
17+
ceph-bluestore-tool --path $OSD_DIR --sharding="m(3) p(3,0-12) O(3,0-13)=block_cache={type=binned_lru} L=min_write_buffer_number_to_merge=32 P=min_write_buffer_number_to_merge=32" reshard
18+
ceph-bluestore-tool --path $OSD_DIR show-sharding
19+
ceph-bluestore-tool --path $OSD_DIR fsck
20+
systemctl start ceph-osd@$i
21+
set +x
22+
done
23+
ceph osd unset noout

rbd_info.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
# Define formatting for the table
4+
printf "%-35s %-22s %-22s %-22s\n" "IMAGE NAME" "CREATED" "ACCESSED (Meta)" "MODIFIED (Meta)"
5+
printf "%-35s %-22s %-22s %-22s\n" "----------" "-------" "---------------" "---------------"
6+
7+
# 1. Find all enabled RBD storages from Proxmox config
8+
pvesm status -content images | awk '$2=="rbd" {print $1}' | while read STOREID; do
9+
10+
# Get the actual Ceph pool name for this storage
11+
POOL=$(grep -A5 "rbd: $STOREID" /etc/pve/storage.cfg | grep "pool" | awk '{print $2}')
12+
13+
# Fallback if pool detection fails (default is often 'rbd')
14+
if [ -z "$POOL" ]; then POOL="rbd"; fi
15+
16+
# 2. List all images in the pool
17+
rbd -p "$POOL" --namespace pve ls | while read IMAGE; do
18+
19+
# 3. Get Info from RBD
20+
# We capture the whole output to a variable to avoid calling rbd info 3 times
21+
INFO=$(rbd info "$POOL/$IMAGE" --namespace pve 2>/dev/null)
22+
23+
# Extract timestamps
24+
c_time=$(echo "$INFO" | grep "create_timestamp" | awk -F': ' '{print $2}')
25+
a_time=$(echo "$INFO" | grep "access_timestamp" | awk -F': ' '{print $2}')
26+
m_time=$(echo "$INFO" | grep "modify_timestamp" | awk -F': ' '{print $2}')
27+
28+
# Handle empty results (older Ceph versions might not show all 3)
29+
if [ -z "$c_time" ]; then c_time="-"; fi
30+
if [ -z "$a_time" ]; then a_time="-"; fi
31+
if [ -z "$m_time" ]; then m_time="-"; fi
32+
33+
# Print row
34+
printf "%-35s %-22s %-22s %-22s\n" "${IMAGE:0:34}" "$c_time" "$a_time" "$m_time"
35+
36+
done
37+
done

rocky9-preconfig.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ install_zfs() {
149149
# Enable the zfs repo if not already
150150
dnf config-manager --set-enabled zfs
151151

152-
echo "Installing dependencies: dkms, kernel headers, ZFS"
152+
echo "Installing dependencies: dkms, kernel headers, ZFS, ZFS-dkms"
153153
dnf install -y epel-release
154-
dnf install -y dkms gcc make perl kernel-devel kernel-headers zfs
154+
dnf install -y dkms gcc make perl kernel-devel kernel-headers zfs zfs-dkms
155155
res=$?
156156
if [[ $res != 0 ]]; then
157157
echo "ZFS and dependencies install failed"
@@ -195,7 +195,7 @@ houston_configuration() {
195195
crb enable
196196
dnf install -y \
197197
cockpit cockpit-benchmark cockpit-navigator cockpit-file-sharing \
198-
cockpit-45drives-hardware cockpit-identities cockpit-bridge cockpit-storaged cockpit-scheduler cockpit-zfs zfs zfs-dkms nano tuned
198+
cockpit-45drives-hardware cockpit-identities cockpit-bridge cockpit-storaged cockpit-scheduler cockpit-zfs nano tuned
199199
res=$?
200200
if [[ $res != 0 ]]; then
201201
echo "Error Installing Cockpit"

0 commit comments

Comments
 (0)