diff options
| author | Christoph Hellwig <hch@lst.de> | 2014-08-13 10:49:21 -0400 |
|---|---|---|
| committer | Steve Dickson <steved@redhat.com> | 2014-08-13 10:53:01 -0400 |
| commit | b2b7d7f75a2df81704fdd67e7723a3172b4da5a2 (patch) | |
| tree | b6d604777cb002d338431f6bd7eeeab5c5a3f2f0 /utils | |
| parent | 66b2df42911298c29c756d7b8cbdb7f6801264ed (diff) | |
| download | nfs-utils-b2b7d7f75a2df81704fdd67e7723a3172b4da5a2.tar.gz nfs-utils-b2b7d7f75a2df81704fdd67e7723a3172b4da5a2.tar.xz nfs-utils-b2b7d7f75a2df81704fdd67e7723a3172b4da5a2.zip | |
blkmapd: dump useful device information to syslog
Dump some information about used devices to syslog so that an admin
can troubleshoot failing blocklayout mounts.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/blkmapd/device-discovery.c | 6 | ||||
| -rw-r--r-- | utils/blkmapd/device-process.c | 2 | ||||
| -rw-r--r-- | utils/blkmapd/dm-device.c | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c index bcfb060..b52afe2 100644 --- a/utils/blkmapd/device-discovery.c +++ b/utils/blkmapd/device-discovery.c @@ -148,7 +148,11 @@ void bl_add_disk(char *filepath) dev = sb.st_rdev; serial = bldev_read_serial(fd, filepath); - if (dm_is_dm_major(major(dev))) + if (!serial) { + BL_LOG_ERR("%s: no serial found for %s\n", + __func__, filepath); + ap_state = BL_PATH_STATE_PASSIVE; + } else if (dm_is_dm_major(major(dev))) ap_state = BL_PATH_STATE_PSEUDO; else ap_state = bldev_read_ap_state(fd); diff --git a/utils/blkmapd/device-process.c b/utils/blkmapd/device-process.c index 5fe3dff..f53a616 100644 --- a/utils/blkmapd/device-process.c +++ b/utils/blkmapd/device-process.c @@ -181,6 +181,8 @@ static int map_sig_to_device(struct bl_sig *sig, struct bl_volume *vol) /* FIXME: should we use better algorithm for disk scan? */ mapped = verify_sig(disk, sig); if (mapped) { + BL_LOG_INFO("%s: using device %s\n", + __func__, disk->valid_path->full_path); vol->param.bv_dev = disk->dev; vol->bv_size = disk->size; break; diff --git a/utils/blkmapd/dm-device.c b/utils/blkmapd/dm-device.c index 0f4f148..24ffcbf 100644 --- a/utils/blkmapd/dm-device.c +++ b/utils/blkmapd/dm-device.c @@ -400,6 +400,8 @@ uint64_t dm_device_create(struct bl_volume *vols, int num_vols) } dev = node->bv_vols[0]->param.bv_dev; tmp = table->params; + BL_LOG_INFO("%s: major %lu minor %lu", __func__, + MAJOR(dev), MINOR(dev)); if (!dm_format_dev(tmp, DM_PARAMS_LEN, MAJOR(dev), MINOR(dev))) { free(table); @@ -459,6 +461,8 @@ uint64_t dm_device_create(struct bl_volume *vols, int num_vols) strcpy(table->target_type, "linear"); tmp = table->params; dev = node->bv_vols[i]->param.bv_dev; + BL_LOG_INFO("%s: major %lu minor %lu", __func__, + MAJOR(dev), MINOR(dev)); if (!dm_format_dev(tmp, DM_PARAMS_LEN, MAJOR(dev), MINOR(dev))) { free(table); |
