Index: uspace/srv/bd/vbd/disk.c
===================================================================
--- uspace/srv/bd/vbd/disk.c	(revision b7a4d06b6d03da11c24ad8eee4f374f7b8a7dc13)
+++ uspace/srv/bd/vbd/disk.c	(revision c43db5f9ec884dbf2d9a67843b408f94641c79eb)
@@ -62,4 +62,6 @@
 static int vbds_bsa_translate(vbds_part_t *, aoff64_t, size_t, aoff64_t *);
 
+static vbd_part_id_t vbds_part_id = 1;
+
 static bd_ops_t vbds_bd_ops = {
 	.open = vbds_bd_open,
@@ -95,11 +97,11 @@
 }
 
-static int vbds_part_by_id(vbds_part_id_t partid, vbds_part_t **rpart)
-{
-	log_msg(LOG_DEFAULT, LVL_NOTE, "vbds_part_by_id(%zu)", partid);
+static int vbds_part_by_pid(vbds_part_id_t partid, vbds_part_t **rpart)
+{
+	log_msg(LOG_DEFAULT, LVL_NOTE, "vbds_part_by_pid(%zu)", partid);
 
 	list_foreach(vbds_parts, lparts, vbds_part_t, part) {
-		log_msg(LOG_DEFAULT, LVL_NOTE, "%zu == %zu ?", part->id, partid);
-		if (part->id == partid) {
+		log_msg(LOG_DEFAULT, LVL_NOTE, "%zu == %zu ?", part->pid, partid);
+		if (part->pid == partid) {
 			log_msg(LOG_DEFAULT, LVL_NOTE, "Found match.");
 			*rpart = part;
@@ -112,4 +114,21 @@
 }
 
+static int vbds_part_by_svcid(service_id_t svcid, vbds_part_t **rpart)
+{
+	log_msg(LOG_DEFAULT, LVL_NOTE, "vbds_part_by_svcid(%zu)", svcid);
+
+	list_foreach(vbds_parts, lparts, vbds_part_t, part) {
+		log_msg(LOG_DEFAULT, LVL_NOTE, "%zu == %zu ?", part->svc_id, svcid);
+		if (part->svc_id == svcid) {
+			log_msg(LOG_DEFAULT, LVL_NOTE, "Found match.");
+			*rpart = part;
+			return EOK;
+		}
+	}
+
+	log_msg(LOG_DEFAULT, LVL_NOTE, "No match.");
+	return ENOENT;
+}
+
 /** Add partition to our inventory based on liblabel partition structure */
 static int vbds_part_add(vbds_disk_t *disk, label_part_t *lpart,
@@ -117,5 +136,5 @@
 {
 	vbds_part_t *part;
-	service_id_t psid;
+	service_id_t psid = 0;
 	label_part_info_t lpinfo;
 	char *name;
@@ -133,25 +152,28 @@
 	}
 
-	/* XXX Proper service name */
-	rc = asprintf(&name, "%sp%u", disk->svc_name, lpart->index);
-	if (rc < 0) {
-		log_msg(LOG_DEFAULT, LVL_ERROR, "Out of memory.");
-		return ENOMEM;
-	}
-
-	rc = loc_service_register(name, &psid);
-	if (rc != EOK) {
-		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering "
-		    "service %s.", name);
+	if (lpinfo.pkind != lpk_extended) {
+		/* XXX Proper service name */
+		rc = asprintf(&name, "%sp%u", disk->svc_name, lpart->index);
+		if (rc < 0) {
+			log_msg(LOG_DEFAULT, LVL_ERROR, "Out of memory.");
+			return ENOMEM;
+		}
+
+		rc = loc_service_register(name, &psid);
+		if (rc != EOK) {
+			log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering "
+			    "service %s.", name);
+			free(name);
+			free(part);
+			return EIO;
+		}
+
 		free(name);
-		free(part);
-		return EIO;
-	}
-
-	free(name);
+	}
 
 	part->lpart = lpart;
 	part->disk = disk;
-	part->id = (vbds_part_id_t)psid;
+	part->pid = ++vbds_part_id;
+	part->svc_id = psid;
 	part->block0 = lpinfo.block0;
 	part->nblocks = lpinfo.nblocks;
@@ -184,7 +206,9 @@
 		return EBUSY;
 
-	rc = loc_service_unregister((service_id_t)part->id);
-	if (rc != EOK)
-		return EIO;
+	if (part->svc_id != 0) {
+		rc = loc_service_unregister(part->svc_id);
+		if (rc != EOK)
+			return EIO;
+	}
 
 	list_remove(&part->ldisk);
@@ -348,5 +372,5 @@
 	list_foreach(disk->parts, ldisk, vbds_part_t, part) {
 		if (pos < buf_cnt)
-			id_buf[pos] = part->id;
+			id_buf[pos] = part->pid;
 		pos++;
 	}
@@ -462,5 +486,5 @@
 	int rc;
 
-	rc = vbds_part_by_id(partid, &part);
+	rc = vbds_part_by_pid(partid, &part);
 	if (rc != EOK)
 		return rc;
@@ -517,5 +541,5 @@
 
 	if (rpart != NULL)
-		*rpart = part->id;
+		*rpart = part->pid;
 	return EOK;
 error:
@@ -530,5 +554,5 @@
 	int rc;
 
-	rc = vbds_part_by_id(partid, &part);
+	rc = vbds_part_by_pid(partid, &part);
 	if (rc != EOK)
 		return rc;
@@ -647,13 +671,13 @@
 	vbds_part_t *part;
 	int rc;
-	service_id_t partid;
+	service_id_t svcid;
 
 	log_msg(LOG_DEFAULT, LVL_NOTE, "vbds_bd_conn()");
 
-	partid = IPC_GET_ARG1(*icall);
-
-	log_msg(LOG_DEFAULT, LVL_NOTE, "vbds_bd_conn() - partid=%zu", partid);
-
-	rc = vbds_part_by_id(partid, &part);
+	svcid = IPC_GET_ARG1(*icall);
+
+	log_msg(LOG_DEFAULT, LVL_NOTE, "vbds_bd_conn() - svcid=%zu", svcid);
+
+	rc = vbds_part_by_svcid(svcid, &part);
 	if (rc != EOK) {
 		log_msg(LOG_DEFAULT, LVL_NOTE, "vbd_bd_conn() - partition "
