Ferret File System/v0.1/SQL/volume: Difference between revisions
< Ferret File System | v0.1 | SQL
Jump to navigation
Jump to search
No edit summary |
m (Woozle moved page FileFerret/SQL/volume to Ferret File System/v0.1/SQL/volume: obsolete) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
===Fields=== | ===Fields=== | ||
* '''Label''': the volume's label, which may not be unique (but may help with identification) | * '''Label''': the volume's label, which may not be unique (but may help with identification) | ||
* '''isInScan''': if TRUE, a scan is in progress and {{l/same|entry}}.didFind flag may not be accurate | |||
===History=== | ===History=== | ||
* '''2013-04-21''' created | * '''2013-04-21''' created | ||
* '''2013-06-30''' added '''[[wikipedia:Universally unique identifier|UUID]]''' and '''Descr''' fields | * '''2013-06-30''' added '''[[wikipedia:Universally unique identifier|UUID]]''' and '''Descr''' fields | ||
** Later, we will probably want to record things like capacity and free space... but later. | ** Later, we will probably want to record things like capacity and free space... but later. | ||
* '''2016-02-27''' Renamed from "vols" -> "volume" | * '''2016-02-27''' Renamed from "vols" -> "volume"; added '''isInScan''' flag | ||
==SQL== | ==SQL== | ||
<mysql>CREATE TABLE `volume` ( | <syntaxhighlight lang=mysql>CREATE TABLE `volume` ( | ||
`ID` | `ID` INT NOT NULL AUTO_INCREMENT, | ||
Label VARCHAR(63), | `Label` VARCHAR(63), | ||
UUID CHAR(36), | `UUID` CHAR(36), | ||
Descr VARCHAR( | `Descr` VARCHAR(255), | ||
PRIMARY KEY(`ID`) | `isInScan` BOOL, | ||
PRIMARY KEY(`ID`), | |||
UNIQUE KEY(`UUID`) | |||
) | ) | ||
ENGINE = MYISAM;</ | ENGINE = MYISAM;</syntaxhighlight> | ||
==Notes== | |||
This command ([https://toot.cat/@jamey/3634665 via]) seems to be usable for pulling up volume information in a rigorous way: | |||
<syntaxhighlight lang=bash>lsblk --json -o NAME,RM,MOUNTPOINT,SIZE,MODEL,LABEL,UUID</syntaxhighlight> |
Latest revision as of 13:40, 25 February 2024
About
- Purpose: record of all known volumes, fixed and removable
Fields
- Label: the volume's label, which may not be unique (but may help with identification)
- isInScan: if TRUE, a scan is in progress and entry.didFind flag may not be accurate
History
- 2013-04-21 created
- 2013-06-30 added UUID and Descr fields
- Later, we will probably want to record things like capacity and free space... but later.
- 2016-02-27 Renamed from "vols" -> "volume"; added isInScan flag
SQL
CREATE TABLE `volume` (
`ID` INT NOT NULL AUTO_INCREMENT,
`Label` VARCHAR(63),
`UUID` CHAR(36),
`Descr` VARCHAR(255),
`isInScan` BOOL,
PRIMARY KEY(`ID`),
UNIQUE KEY(`UUID`)
)
ENGINE = MYISAM;
Notes
This command (via) seems to be usable for pulling up volume information in a rigorous way:
lsblk --json -o NAME,RM,MOUNTPOINT,SIZE,MODEL,LABEL,UUID