Skip to content

Instantly share code, notes, and snippets.

@dthpulse
dthpulse / cephfs_transcoder.py
Created October 8, 2025 20:05 — forked from marcan/cephfs_transcoder.py
Transcoder (layout migrator) for CephFS
# CephFS pool/layout migration tool ("transcoder")
#
# Loosely inspired by:
# https://git.sr.ht/~pjjw/cephfs-layout-tool/tree/master/item/cephfs_layout_tool/migrate_pools.py
# https://gist.github.com/ervwalter/5ff6632c930c27a1eb6b07c986d7439b
#
# MIT license (https://opensource.org/license/mit)
import os, stat, time, signal, shutil, logging, sys
from concurrent.futures import ThreadPoolExecutor
@dthpulse
dthpulse / block_device_sector_size.py
Created April 21, 2022 09:18 — forked from shimarin/block_device_sector_size.py
Determining block device's sector size in Linux+Python
#!/usr/bin/python
import fcntl
import os
import struct
import array
import sys
BLKGETSIZE=0x1260
BLKGETSIZE64=0x80081272
BLKSSZGET=0x1268