const char *data;
int errsv = 0;
+ if (strcmp(token, "ID") == 0)
+ return 0; /* non-content tag */
+
pr = blkid_new_probe();
if (!pr)
return -1;
strcpy(dev, _PATH_DEV_BYPARTLABEL "/");
else if (!strcmp(token, "PARTUUID"))
strcpy(dev, _PATH_DEV_BYPARTUUID "/");
+ else if (!strcmp(token, "ID"))
+ strcpy(dev, _PATH_DEV_BYID "/");
else {
DBG(EVALUATE, ul_debug("unsupported token %s", token));
return NULL; /* unsupported tag */
int mnt_valid_tagname(const char *tagname)
{
if (tagname && *tagname && (
+ strcmp("ID", tagname) == 0 ||
strcmp("UUID", tagname) == 0 ||
strcmp("LABEL", tagname) == 0 ||
strcmp("PARTUUID", tagname) == 0 ||
Partition universally unique identifier. This identifier is independent on
filesystem and does not change by mkfs or mkswap operations It's supported
for example for GUID Partition Tables (GPT).
+.TP
+ID=\fIid\fR
+Hardware block device ID as generated by udevd. This identifier is usually
+based on WWN (unique storage identifier) and assigned by the hardware
+manufacturer. See \fBls /dev/disk/by-id\fR for more details, this directory
+and running udevd is required. This identifier is not recommended for generic
+use as the identifier is not strictly defined and it depends on udev, udev rules
+and hardware.
.RE
.sp
The command \fBlsblk \-\-fs\fR provides an overview of filesystems, LABELs and UUIDs
to verify that the UUIDs are really unique in your system.
The recommended setup is to use tags (e.g.\& \fBUUID=\fIuuid\fR) rather than
-.I /dev/disk/by-{label,uuid,partuuid,partlabel}
+.I /dev/disk/by-{label,uuid,id,partuuid,partlabel}
udev symlinks in the
.I /etc/fstab
file. Tags are
.I /etc/fstab
file if both
.I device
-(or LABEL, UUID, PARTUUID or PARTLABEL) and
+(or LABEL, UUID, ID, PARTUUID or PARTLABEL) and
.I dir
are specified. For example, to mount device
.BR foo " at " /dir :
" LABEL=<label> specifies device by filesystem label\n"
" UUID=<uuid> specifies device by filesystem UUID\n"
" PARTLABEL=<label> specifies device by partition label\n"
- " PARTUUID=<uuid> specifies device by partition UUID\n"));
+ " PARTUUID=<uuid> specifies device by partition UUID\n"
+ " ID=<id> specifies device by udev hardware ID\n"));
fprintf(out, _(
" <device> specifies device by path\n"