Skip to content

Commit 61eae10

Browse files
api.md: regenerate from nasty@34bad20
1 parent 018a350 commit 61eae10

1 file changed

Lines changed: 68 additions & 4 deletions

File tree

api.md

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,8 +1361,14 @@ Remove a device from a filesystem. The device should be fully evacuated first.
13611361

13621362
| Field | Type | Required | Description |
13631363
|-------|------|:--------:|-------------|
1364-
| `device` | string | yes | Absolute path of the block device (e.g. `/dev/sdb`). |
1364+
| `device` | string | yes | The device to act on: an absolute block-device path (e.g. `/dev/sdb`)
1365+
or, for a missing/dead member with no current path, its numeric
1366+
bcachefs member index. |
13651367
| `filesystem` | string | yes | Name of the filesystem containing the device. |
1368+
| `force` | boolean | no | Force removal even when data/metadata can't be migrated off first —
1369+
required for a *missing* member (the disk is gone, nothing to
1370+
evacuate; safe while enough replicas remain on surviving devices).
1371+
Ignored by non-remove actions. |
13661372

13671373
**Returns:**
13681374

@@ -1392,8 +1398,14 @@ Evacuate all data from a device to the remaining filesystem members. Long-runnin
13921398

13931399
| Field | Type | Required | Description |
13941400
|-------|------|:--------:|-------------|
1395-
| `device` | string | yes | Absolute path of the block device (e.g. `/dev/sdb`). |
1401+
| `device` | string | yes | The device to act on: an absolute block-device path (e.g. `/dev/sdb`)
1402+
or, for a missing/dead member with no current path, its numeric
1403+
bcachefs member index. |
13961404
| `filesystem` | string | yes | Name of the filesystem containing the device. |
1405+
| `force` | boolean | no | Force removal even when data/metadata can't be migrated off first —
1406+
required for a *missing* member (the disk is gone, nothing to
1407+
evacuate; safe while enough replicas remain on surviving devices).
1408+
Ignored by non-remove actions. |
13971409

13981410

13991411
### `fs.device.set_state`
@@ -1470,8 +1482,14 @@ Bring a device back online.
14701482

14711483
| Field | Type | Required | Description |
14721484
|-------|------|:--------:|-------------|
1473-
| `device` | string | yes | Absolute path of the block device (e.g. `/dev/sdb`). |
1485+
| `device` | string | yes | The device to act on: an absolute block-device path (e.g. `/dev/sdb`)
1486+
or, for a missing/dead member with no current path, its numeric
1487+
bcachefs member index. |
14741488
| `filesystem` | string | yes | Name of the filesystem containing the device. |
1489+
| `force` | boolean | no | Force removal even when data/metadata can't be migrated off first —
1490+
required for a *missing* member (the disk is gone, nothing to
1491+
evacuate; safe while enough replicas remain on surviving devices).
1492+
Ignored by non-remove actions. |
14751493

14761494
**Returns:**
14771495

@@ -1501,8 +1519,14 @@ Take a device offline.
15011519

15021520
| Field | Type | Required | Description |
15031521
|-------|------|:--------:|-------------|
1504-
| `device` | string | yes | Absolute path of the block device (e.g. `/dev/sdb`). |
1522+
| `device` | string | yes | The device to act on: an absolute block-device path (e.g. `/dev/sdb`)
1523+
or, for a missing/dead member with no current path, its numeric
1524+
bcachefs member index. |
15051525
| `filesystem` | string | yes | Name of the filesystem containing the device. |
1526+
| `force` | boolean | no | Force removal even when data/metadata can't be migrated off first —
1527+
required for a *missing* member (the disk is gone, nothing to
1528+
evacuate; safe while enough replicas remain on surviving devices).
1529+
Ignored by non-remove actions. |
15061530

15071531
**Returns:**
15081532

@@ -5680,6 +5704,30 @@ field — that's the comparison we make. |
56805704
``VolumeMismatch`[]`
56815705

56825706

5707+
### `apps.check_compose`
5708+
5709+
Validate a docker-compose YAML the way deploy will: in-process YAML syntax check, then `docker compose config` schema validation, returning per-line diagnostics for the editor to underline.
5710+
5711+
**Role:** `any`
5712+
5713+
**Params:**
5714+
5715+
| Field | Type | Required | Description |
5716+
|-------|------|:--------:|-------------|
5717+
| `compose` | string | yes | Full docker-compose YAML text, as it sits in the editor. |
5718+
5719+
**Returns:**
5720+
5721+
| Field | Type | Required | Description |
5722+
|-------|------|:--------:|-------------|
5723+
| `diagnostics` | `ComposeDiagnostic`[] | yes | |
5724+
| `schema_checked` | boolean | yes | False when schema validation couldn't run (docker compose not
5725+
on PATH — apps disabled, or a stripped-down box). YAML syntax is
5726+
still checked in-process; the UI shouldn't claim "fully valid"
5727+
when this is false. |
5728+
| `valid` | boolean | yes | |
5729+
5730+
56835731
### `apps.enable`
56845732

56855733
Enable the apps runtime on this box (optionally pinning the storage filesystem) and start Docker.
@@ -6526,6 +6574,10 @@ at runtime that rustic_backend reads via its `cacert` option. |
65266574
| `dev_type` | string | yes | lsblk device type: `disk` or `part`. |
65276575
| `device_class` | string | yes | Device speed class: "nvme", "ssd", or "hdd". |
65286576
| `fs_type` | string | no | Filesystem type detected on the device (e.g. `bcachefs`, `ext4`). |
6577+
| `fs_uuid` | string | no | Filesystem UUID from lsblk — for bcachefs members this is the
6578+
*external* (whole-filesystem) UUID, so a candidate disk can be
6579+
matched against an existing pool's `Filesystem.uuid` to tell an
6580+
offline/former member apart from a foreign disk (#472). |
65296581
| `in_use` | boolean | yes | Whether the device is currently in use (mounted, in a filesystem, or has partitions in use). |
65306582
| `model` | string | no | Drive model from lsblk (e.g. "Samsung SSD 970 EVO Plus 1TB"). None
65316583
for partitions and for virtual disks that don't expose a model. |
@@ -6629,6 +6681,14 @@ ends in a `reverse_proxy` handler. `None` for `file_server`,
66296681
| `id` | string | yes | |
66306682
| `name` | string | yes | |
66316683

6684+
### `ComposeDiagnostic`
6685+
6686+
| Field | Type | Required | Description |
6687+
|-------|------|:--------:|-------------|
6688+
| `line` | integer | no | 1-based line in the compose text, when the validator names one.
6689+
Schema-level findings (e.g. an unknown property) often don't. |
6690+
| `message` | string | yes | |
6691+
66326692
### `CpuStats`
66336693

66346694
| Field | Type | Required | Description |
@@ -6799,6 +6859,10 @@ reboots and independent of the kernel device name, so it
67996859
disambiguates "is this the same member?" when a disk is removed
68006860
and re-added — possibly in a different physical slot. From
68016861
show-super, so available mounted or not. See #452. |
6862+
| `missing` | boolean | no | True when this is a *missing* member: the bcachefs superblock still
6863+
lists it (phantom `dev-N` in sysfs) but its block device is gone
6864+
(pulled/dead). `path` then carries a synthetic placeholder, not a
6865+
real `/dev` node — remove it by `member_index` with force. See #466. |
68026866
| `path` | string | yes | |
68036867
| `read_errors` | integer | no | Cumulative read IO errors (since filesystem creation), from
68046868
`/sys/fs/bcachefs/<uuid>/dev-N/io_errors`. Only populated while

0 commit comments

Comments
 (0)