zhhuabj

Untitled

Oct 20th, 2026
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.23 KB | None | 0 0
  1. PR #1162 - self-test
  2.  
  3. 1. Run live tests from the bastion
  4.  
  5. $ set -o pipefail
  6. $ juju ssh ceph-osd/3 "sudo -n python3 -u /tmp/hotsos-review-1122-live.py" 2>&1 | tee ~/hotsos-review-1122-20261021-live.log
  7.  
  8. The following sections show commands executed inside that script as root.
  9. Every snapshot ran this command with PYTHONPATH=/tmp/hotsos-review-1122-20261021:
  10.  
  11. $ /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
  12.  
  13. Each snapshot checked storage.disks, StorageWarnings count and nonempty
  14. local Ceph OSD discovery. Repeated baseline findings and warning text are
  15. omitted from some excerpts below.
  16.  
  17. 2. Baseline
  18.  
  19. $ vgs --noheadings -o vg_name
  20. ceph-563d82c3-59f7-48bb-aaf0-1a8e0b2c90d9
  21. ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216
  22.  
  23. $ /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
  24. storage.disks excerpt:
  25. "unallocated-volume-groups": [
  26. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  27. ]
  28. Script output: PASS 00-baseline
  29.  
  30. 3. Entirely unused disk
  31.  
  32. $ modprobe scsi_debug dev_size_mb=512
  33. $ udevadm settle
  34. $ blockdev --getsize64 /dev/sdd
  35. 536870912
  36. $ lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,MODEL /dev/sdd
  37. NAME SIZE TYPE FSTYPE MOUNTPOINT MODEL
  38. sdd 512M disk scsi_debug
  39.  
  40. $ /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
  41. storage.disks excerpt:
  42. "unused-disks": ["/dev/sdd (512M)"]
  43. Script output: PASS 01-bare-disk
  44.  
  45. 4. GPT with no partitions
  46.  
  47. $ parted -s /dev/sdd mklabel gpt
  48. $ udevadm settle
  49. $ /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
  50. storage.disks excerpt:
  51. "unallocated-disks": ["/dev/sdd (512M)"]
  52. No unused-disks finding.
  53. Script output: PASS 02-empty-gpt
  54.  
  55. 5. Empty partition and remaining unallocated disk space
  56.  
  57. $ parted -s /dev/sdd mkpart primary 1MiB 200MiB
  58. $ udevadm settle
  59. $ /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
  60. storage.disks excerpt:
  61. "empty-partitions": ["/dev/sdd1 (199M)"]
  62. "unallocated-disks": ["/dev/sdd (313M)"]
  63. Script output: PASS 03-empty-partition
  64.  
  65. 6. Format the partition
  66.  
  67. $ mkfs.ext4 -F /dev/sdd1
  68. Creating filesystem with 50944 4k blocks and 50944 inodes
  69.  
  70. $ /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
  71. storage.disks excerpt:
  72. "unallocated-disks": ["/dev/sdd (313M)"]
  73. No empty-partitions finding.
  74. Script output: PASS 04-formatted-partial
  75.  
  76. 7. Allocate the remaining disk space
  77.  
  78. $ parted -s /dev/sdd mkpart primary 200MiB 100%
  79. $ udevadm settle
  80. $ mkfs.ext4 -F /dev/sdd2
  81. Creating filesystem with 79616 4k blocks and 79632 inodes
  82.  
  83. $ /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
  84. storage.disks excerpt (baseline only):
  85. "unallocated-volume-groups": [
  86. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  87. ]
  88. Script output: PASS 05-fully-partitioned
  89.  
  90. 8. LVM volume group with free space
  91.  
  92. $ wipefs -a /dev/sdd1 /dev/sdd2
  93. /dev/sdd1: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef
  94. /dev/sdd2: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef
  95. $ parted -s /dev/sdd rm 2 rm 1
  96. $ wipefs -a /dev/sdd
  97. /dev/sdd: calling ioctl to re-read partition table: Success
  98. $ udevadm settle
  99. $ pvcreate /dev/sdd
  100. Physical volume "/dev/sdd" successfully created.
  101. $ vgcreate hotsos-review1122 /dev/sdd
  102. Volume group "hotsos-review1122" successfully created
  103. $ lvcreate -L 200M -n test-lv hotsos-review1122
  104. Logical volume "test-lv" created.
  105.  
  106. $ vgs -v --config=global{metadata_read_only=1} --nolocking --foreign
  107. Selected columns from output:
  108. VG VSize VFree
  109. ceph-563d82c3-59f7-48bb-aaf0-1a8e0b2c90d9 9.98g 0
  110. ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 1004.00m 104.00m
  111. hotsos-review1122 508.00m 308.00m
  112. WARNING: File locking is disabled.
  113.  
  114. $ /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
  115. storage.disks excerpt:
  116. "unallocated-volume-groups": [
  117. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)",
  118. "hotsos-review1122 (308M)"
  119. ]
  120. Script output: PASS 06-lvm-free
  121.  
  122. 9. Allocate all remaining VG space
  123.  
  124. $ lvextend -l +100%FREE /dev/hotsos-review1122/test-lv
  125. Size of logical volume hotsos-review1122/test-lv changed from 200.00 MiB (50 extents) to 508.00 MiB (127 extents).
  126. Logical volume hotsos-review1122/test-lv successfully resized.
  127.  
  128. $ /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
  129. storage.disks excerpt (baseline only):
  130. "unallocated-volume-groups": [
  131. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  132. ]
  133. Script output: PASS 07-lvm-allocated
  134.  
  135. 10. Cleanup and final snapshot
  136.  
  137. $ vgremove -f hotsos-review1122
  138. Logical volume "test-lv" successfully removed
  139. Volume group "hotsos-review1122" successfully removed
  140. $ pvremove /dev/sdd
  141. Labels on physical volume "/dev/sdd" successfully wiped.
  142. $ udevadm settle
  143. $ rmmod scsi_debug
  144.  
  145. $ /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
  146. storage.disks excerpt (baseline only):
  147. "unallocated-volume-groups": [
  148. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  149. ]
  150. Script output: PASS 08-cleaned-baseline
  151. ALL LIVE CHECKS PASSED: 00-baseline, 01-bare-disk, 02-empty-gpt, 03-empty-partition, 04-formatted-partial, 05-fully-partitioned, 06-lvm-free, 07-lvm-allocated, 08-cleaned-baseline
  152.  
  153. 11. Post-test cluster checks (from the bastion)
  154.  
  155. $ juju status ceph-osd
  156. Result summary: all three OSD units active/idle.
  157.  
  158. $ juju ssh ceph-mon/0 "sudo -n ceph -s"
  159. Result summary: 3 OSDs up/in; 69 PGs active+clean.
  160. Pre-existing HEALTH_WARN: 3 OSD(s) experiencing BlueFS spillover.
  161.  
  162. Not covered: full project test suite, live multipath topology, or Ceph
  163. command-failure injection. These results do not establish coverage of
  164. those cases.
  165.  
  166.  
  167.  
  168. 12, the file /tmp/hotsos-review-1122-live.py
  169.  
  170. import json
  171. import os
  172. from pathlib import Path
  173. import subprocess
  174. import sys
  175.  
  176.  
  177. ROOT = Path('/tmp/hotsos-review-1122-20261021')
  178. VG = 'hotsos-review1122'
  179. BASE_VG = 'ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)'
  180. disk = None
  181. module_created = False
  182. vg_created = False
  183. pv_created = False
  184. results = []
  185.  
  186.  
  187. def require(condition, detail):
  188. if not condition:
  189. raise RuntimeError(str(detail))
  190.  
  191.  
  192. def run(*args):
  193. print('+ ' + ' '.join(args), flush=True)
  194. completed = subprocess.run(args, text=True, capture_output=True, check=False)
  195. if completed.stdout:
  196. print(completed.stdout, end='', flush=True)
  197. if completed.stderr:
  198. print(completed.stderr, end='', file=sys.stderr, flush=True)
  199. completed.check_returncode()
  200. return completed.stdout
  201.  
  202.  
  203. def guard():
  204. require(disk is not None, 'No test disk selected')
  205. model = Path('/sys/class/block', disk.name, 'device/model').read_text().strip()
  206. require(model == 'scsi_debug', (disk, model))
  207. require(int(run('blockdev', '--getsize64', str(disk))) == 512 * 1024**2,
  208. 'Unexpected test disk size')
  209.  
  210.  
  211. def snapshot(stage, expected):
  212. environment = dict(os.environ, PYTHONPATH=str(ROOT))
  213. command = [sys.executable, str(ROOT / 'hotsos/cli.py'), '--storage', '--format', 'json']
  214. print('+ ' + ' '.join(command) + ' [' + stage + ']', flush=True)
  215. completed = subprocess.run(command, env=environment, text=True, capture_output=True, check=False)
  216. (ROOT / (stage + '.stdout')).write_text(completed.stdout)
  217. (ROOT / (stage + '.stderr')).write_text(completed.stderr)
  218. completed.check_returncode()
  219. header, separator, payload = completed.stdout.partition('\n')
  220. require(header == 'INFO: analysing localhost' and separator,
  221. ('Unexpected CLI output prefix', header))
  222. report = json.loads(payload)
  223. (ROOT / (stage + '.json')).write_text(json.dumps(report, indent=2))
  224. storage = report['storage']
  225. actual = storage.get('disks', {})
  226. print(json.dumps({'stage': stage, 'disks': actual,
  227. 'StorageWarnings': storage.get('potential-issues', {}).get('StorageWarnings', [])}, indent=2), flush=True)
  228. require(actual == expected, (stage, actual, expected))
  229. require(storage['ceph']['local-osds'], 'No local Ceph OSDs discovered')
  230. warning_count = len(storage.get('potential-issues', {}).get('StorageWarnings', []))
  231. require(warning_count == len(expected), (stage, warning_count, expected))
  232. results.append(stage)
  233. print('PASS ' + stage, flush=True)
  234.  
  235.  
  236. def state(**extra):
  237. return dict({'unallocated-volume-groups': [BASE_VG]}, **extra)
  238.  
  239.  
  240. require(os.geteuid() == 0, 'Root required')
  241. require(ROOT.is_dir(), 'Missing deployment')
  242. require(not Path('/sys/module/scsi_debug').exists(), 'Existing scsi_debug module must not be reused')
  243. require(VG not in run('vgs', '--noheadings', '-o', 'vg_name').split(), 'Test VG already exists')
  244. before = {device.name for device in Path('/sys/class/block').iterdir()}
  245. try:
  246. snapshot('00-baseline', state())
  247. run('modprobe', 'scsi_debug', 'dev_size_mb=512')
  248. module_created = True
  249. run('udevadm', 'settle')
  250. added = {device.name for device in Path('/sys/class/block').iterdir()} - before
  251. require(len(added) == 1, added)
  252. disk = Path('/dev', added.pop())
  253. guard()
  254. run('lsblk', '-o', 'NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,MODEL', str(disk))
  255. snapshot('01-bare-disk', state(**{'unused-disks': [f'{disk} (512M)']}))
  256. guard()
  257. run('parted', '-s', str(disk), 'mklabel', 'gpt')
  258. run('udevadm', 'settle')
  259. snapshot('02-empty-gpt', state(**{'unallocated-disks': [f'{disk} (512M)']}))
  260. guard()
  261. run('parted', '-s', str(disk), 'mkpart', 'primary', '1MiB', '200MiB')
  262. run('udevadm', 'settle')
  263. snapshot('03-empty-partition', state(**{'empty-partitions': [f'{disk}1 (199M)'],
  264. 'unallocated-disks': [f'{disk} (313M)']}))
  265. guard()
  266. run('mkfs.ext4', '-F', str(disk) + '1')
  267. snapshot('04-formatted-partial', state(**{'unallocated-disks': [f'{disk} (313M)']}))
  268. guard()
  269. run('parted', '-s', str(disk), 'mkpart', 'primary', '200MiB', '100%')
  270. run('udevadm', 'settle')
  271. run('mkfs.ext4', '-F', str(disk) + '2')
  272. snapshot('05-fully-partitioned', state())
  273. guard()
  274. run('wipefs', '-a', str(disk) + '1', str(disk) + '2')
  275. run('parted', '-s', str(disk), 'rm', '2', 'rm', '1')
  276. run('wipefs', '-a', str(disk))
  277. run('udevadm', 'settle')
  278. guard()
  279. run('pvcreate', str(disk))
  280. pv_created = True
  281. run('vgcreate', VG, str(disk))
  282. vg_created = True
  283. run('lvcreate', '-L', '200M', '-n', 'test-lv', VG)
  284. run('vgs', '-v', '--config=global{metadata_read_only=1}', '--nolocking', '--foreign')
  285. snapshot('06-lvm-free', {'unallocated-volume-groups': [BASE_VG, f'{VG} (308M)']})
  286. guard()
  287. run('lvextend', '-l', '+100%FREE', f'/dev/{VG}/test-lv')
  288. snapshot('07-lvm-allocated', state())
  289. finally:
  290. if vg_created:
  291. guard()
  292. run('vgremove', '-f', VG)
  293. if pv_created:
  294. guard()
  295. run('pvremove', str(disk))
  296. if module_created:
  297. run('udevadm', 'settle')
  298. run('rmmod', 'scsi_debug')
  299.  
  300. require({device.name for device in Path('/sys/class/block').iterdir()} == before,
  301. 'Block devices differ from baseline after cleanup')
  302. require(not Path('/sys/module/scsi_debug').exists(), 'Test module remains loaded')
  303. snapshot('08-cleaned-baseline', state())
  304. print('ALL LIVE CHECKS PASSED: ' + ', '.join(results), flush=True)
  305.  
  306.  
  307.  
  308. 13, ~/hotsos-review-1122-20261021-live.log
  309.  
  310. + vgs --noheadings -o vg_name
  311. ceph-563d82c3-59f7-48bb-aaf0-1a8e0b2c90d9
  312. ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216
  313. + /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json [00-baseline]
  314. {
  315. "stage": "00-baseline",
  316. "disks": {
  317. "unallocated-volume-groups": [
  318. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  319. ]
  320. },
  321. "StorageWarnings": [
  322. "The following LVM volume group(s) have significant unallocated free space: ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M). Please inspect the volume group layout and extend existing logical volumes or create new logical volumes to utilize the remaining space if intended, or ignore this warning if the free space is intentionally reserved."
  323. ]
  324. }
  325. PASS 00-baseline
  326. + modprobe scsi_debug dev_size_mb=512
  327. + udevadm settle
  328. + blockdev --getsize64 /dev/sdd
  329. 536870912
  330. + lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,MODEL /dev/sdd
  331. NAME SIZE TYPE FSTYPE MOUNTPOINT MODEL
  332. sdd 512M disk scsi_debug
  333. + /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json [01-bare-disk]
  334. {
  335. "stage": "01-bare-disk",
  336. "disks": {
  337. "unallocated-volume-groups": [
  338. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  339. ],
  340. "unused-disks": [
  341. "/dev/sdd (512M)"
  342. ]
  343. },
  344. "StorageWarnings": [
  345. "The following LVM volume group(s) have significant unallocated free space: ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M). Please inspect the volume group layout and extend existing logical volumes or create new logical volumes to utilize the remaining space if intended, or ignore this warning if the free space is intentionally reserved.",
  346. "The following disk(s) appear entirely unused with no partition table, filesystem, or LVM configuration: /dev/sdd (512M). Please inspect these devices and partition, format, or configure them for use if intended, or ignore this warning if they are intentionally unconfigured."
  347. ]
  348. }
  349. PASS 01-bare-disk
  350. + blockdev --getsize64 /dev/sdd
  351. 536870912
  352. + parted -s /dev/sdd mklabel gpt
  353. + udevadm settle
  354. + /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json [02-empty-gpt]
  355. {
  356. "stage": "02-empty-gpt",
  357. "disks": {
  358. "unallocated-disks": [
  359. "/dev/sdd (512M)"
  360. ],
  361. "unallocated-volume-groups": [
  362. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  363. ]
  364. },
  365. "StorageWarnings": [
  366. "The following LVM volume group(s) have significant unallocated free space: ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M). Please inspect the volume group layout and extend existing logical volumes or create new logical volumes to utilize the remaining space if intended, or ignore this warning if the free space is intentionally reserved.",
  367. "The following partitioned disk(s) have significant unallocated free space not assigned to any partition: /dev/sdd (512M). Please inspect the partition layout and extend existing partitions or create new partitions to utilize the remaining space if intended, or ignore this warning if the space is intentionally left unallocated."
  368. ]
  369. }
  370. PASS 02-empty-gpt
  371. + blockdev --getsize64 /dev/sdd
  372. 536870912
  373. + parted -s /dev/sdd mkpart primary 1MiB 200MiB
  374. + udevadm settle
  375. + /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json [03-empty-partition]
  376. {
  377. "stage": "03-empty-partition",
  378. "disks": {
  379. "empty-partitions": [
  380. "/dev/sdd1 (199M)"
  381. ],
  382. "unallocated-disks": [
  383. "/dev/sdd (313M)"
  384. ],
  385. "unallocated-volume-groups": [
  386. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  387. ]
  388. },
  389. "StorageWarnings": [
  390. "The following LVM volume group(s) have significant unallocated free space: ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M). Please inspect the volume group layout and extend existing logical volumes or create new logical volumes to utilize the remaining space if intended, or ignore this warning if the free space is intentionally reserved.",
  391. "The following partition(s) are created but have not been used with any filesystem or volume configuration: /dev/sdd1 (199M). Please format and mount them, configure them for use, or remove the unused partition(s).",
  392. "The following partitioned disk(s) have significant unallocated free space not assigned to any partition: /dev/sdd (313M). Please inspect the partition layout and extend existing partitions or create new partitions to utilize the remaining space if intended, or ignore this warning if the space is intentionally left unallocated."
  393. ]
  394. }
  395. PASS 03-empty-partition
  396. + blockdev --getsize64 /dev/sdd
  397. 536870912
  398. + mkfs.ext4 -F /dev/sdd1
  399. Creating filesystem with 50944 4k blocks and 50944 inodes
  400. Filesystem UUID: 122e39dd-5e3b-4c24-8473-ccd86f64c67b
  401. Superblock backups stored on blocks:
  402. 32768
  403.  
  404. Allocating group tables: 0/2 done
  405. Writing inode tables: 0/2 done
  406. Creating journal (4096 blocks): done
  407. Writing superblocks and filesystem accounting information: 0/2 done
  408.  
  409. mke2fs 1.46.5 (30-Dec-2021)
  410. + /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json [04-formatted-partial]
  411. {
  412. "stage": "04-formatted-partial",
  413. "disks": {
  414. "unallocated-disks": [
  415. "/dev/sdd (313M)"
  416. ],
  417. "unallocated-volume-groups": [
  418. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  419. ]
  420. },
  421. "StorageWarnings": [
  422. "The following LVM volume group(s) have significant unallocated free space: ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M). Please inspect the volume group layout and extend existing logical volumes or create new logical volumes to utilize the remaining space if intended, or ignore this warning if the free space is intentionally reserved.",
  423. "The following partitioned disk(s) have significant unallocated free space not assigned to any partition: /dev/sdd (313M). Please inspect the partition layout and extend existing partitions or create new partitions to utilize the remaining space if intended, or ignore this warning if the space is intentionally left unallocated."
  424. ]
  425. }
  426. PASS 04-formatted-partial
  427. + blockdev --getsize64 /dev/sdd
  428. 536870912
  429. + parted -s /dev/sdd mkpart primary 200MiB 100%
  430. + udevadm settle
  431. + mkfs.ext4 -F /dev/sdd2
  432. Creating filesystem with 79616 4k blocks and 79632 inodes
  433. Filesystem UUID: bb80aaaf-036b-4ce0-87de-27bc6b20f96f
  434. Superblock backups stored on blocks:
  435. 32768
  436.  
  437. Allocating group tables: 0/3 done
  438. Writing inode tables: 0/3 done
  439. Creating journal (4096 blocks): done
  440. Writing superblocks and filesystem accounting information: 0/3 done
  441.  
  442. mke2fs 1.46.5 (30-Dec-2021)
  443. + /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json [05-fully-partitioned]
  444. {
  445. "stage": "05-fully-partitioned",
  446. "disks": {
  447. "unallocated-volume-groups": [
  448. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  449. ]
  450. },
  451. "StorageWarnings": [
  452. "The following LVM volume group(s) have significant unallocated free space: ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M). Please inspect the volume group layout and extend existing logical volumes or create new logical volumes to utilize the remaining space if intended, or ignore this warning if the free space is intentionally reserved."
  453. ]
  454. }
  455. PASS 05-fully-partitioned
  456. + blockdev --getsize64 /dev/sdd
  457. 536870912
  458. + wipefs -a /dev/sdd1 /dev/sdd2
  459. /dev/sdd1: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef
  460. /dev/sdd2: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef
  461. + parted -s /dev/sdd rm 2 rm 1
  462. + wipefs -a /dev/sdd
  463. /dev/sdd: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
  464. /dev/sdd: 8 bytes were erased at offset 0x1ffffe00 (gpt): 45 46 49 20 50 41 52 54
  465. /dev/sdd: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
  466. /dev/sdd: calling ioctl to re-read partition table: Success
  467. + udevadm settle
  468. + blockdev --getsize64 /dev/sdd
  469. 536870912
  470. + pvcreate /dev/sdd
  471. Physical volume "/dev/sdd" successfully created.
  472. + vgcreate hotsos-review1122 /dev/sdd
  473. Volume group "hotsos-review1122" successfully created
  474. + lvcreate -L 200M -n test-lv hotsos-review1122
  475. Logical volume "test-lv" created.
  476. + vgs -v --config=global{metadata_read_only=1} --nolocking --foreign
  477. VG Attr Ext #PV #LV #SN VSize VFree VG UUID VProfile
  478. ceph-563d82c3-59f7-48bb-aaf0-1a8e0b2c90d9 wz--n- 4.00m 1 1 0 9.98g 0 Koh30S-4b0y-dTR0-0924-QvIi-HYYa-mwTi9X
  479. ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 wz--n- 4.00m 1 1 0 1004.00m 104.00m j7GUeq-d3MD-oWal-voA6-q949-1R03-B87XMF
  480. hotsos-review1122 wz--n- 4.00m 1 1 0 508.00m 308.00m 9IH4m1-32RL-O9cj-WAaR-65yo-fsv8-jtPiSA
  481. Reloading config files
  482. WARNING: File locking is disabled.
  483. Reloading config files
  484. + /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json [06-lvm-free]
  485. {
  486. "stage": "06-lvm-free",
  487. "disks": {
  488. "unallocated-volume-groups": [
  489. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)",
  490. "hotsos-review1122 (308M)"
  491. ]
  492. },
  493. "StorageWarnings": [
  494. "The following LVM volume group(s) have significant unallocated free space: ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M), hotsos-review1122 (308M). Please inspect the volume group layout and extend existing logical volumes or create new logical volumes to utilize the remaining space if intended, or ignore this warning if the free space is intentionally reserved."
  495. ]
  496. }
  497. PASS 06-lvm-free
  498. + blockdev --getsize64 /dev/sdd
  499. 536870912
  500. + lvextend -l +100%FREE /dev/hotsos-review1122/test-lv
  501. Size of logical volume hotsos-review1122/test-lv changed from 200.00 MiB (50 extents) to 508.00 MiB (127 extents).
  502. Logical volume hotsos-review1122/test-lv successfully resized.
  503. + /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json [07-lvm-allocated]
  504. {
  505. "stage": "07-lvm-allocated",
  506. "disks": {
  507. "unallocated-volume-groups": [
  508. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  509. ]
  510. },
  511. "StorageWarnings": [
  512. "The following LVM volume group(s) have significant unallocated free space: ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M). Please inspect the volume group layout and extend existing logical volumes or create new logical volumes to utilize the remaining space if intended, or ignore this warning if the free space is intentionally reserved."
  513. ]
  514. }
  515. PASS 07-lvm-allocated
  516. + blockdev --getsize64 /dev/sdd
  517. 536870912
  518. + vgremove -f hotsos-review1122
  519. Logical volume "test-lv" successfully removed
  520. Volume group "hotsos-review1122" successfully removed
  521. + blockdev --getsize64 /dev/sdd
  522. 536870912
  523. + pvremove /dev/sdd
  524. Labels on physical volume "/dev/sdd" successfully wiped.
  525. + udevadm settle
  526. + rmmod scsi_debug
  527. + /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json [08-cleaned-baseline]
  528. {
  529. "stage": "08-cleaned-baseline",
  530. "disks": {
  531. "unallocated-volume-groups": [
  532. "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
  533. ]
  534. },
  535. "StorageWarnings": [
  536. "The following LVM volume group(s) have significant unallocated free space: ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M). Please inspect the volume group layout and extend existing logical volumes or create new logical volumes to utilize the remaining space if intended, or ignore this warning if the free space is intentionally reserved."
  537. ]
  538. }
  539. PASS 08-cleaned-baseline
  540. ALL LIVE CHECKS PASSED: 00-baseline, 01-bare-disk, 02-empty-gpt, 03-empty-partition, 04-formatted-partial, 05-fully-partitioned, 06-lvm-free, 07-lvm-allocated, 08-cleaned-baseline
  541. Connection to 10.149.144.41 closed.
Advertisement
Add Comment
Please, Sign In to add comment