|
|
0e0d81 |
diff -Naurp pcp-3.11.3.orig/src/pmdas/linux/filesys.c pcp-3.11.3/src/pmdas/linux/filesys.c
|
|
|
0e0d81 |
--- pcp-3.11.3.orig/src/pmdas/linux/filesys.c 2016-02-29 11:53:04.000000000 +1100
|
|
|
0e0d81 |
+++ pcp-3.11.3/src/pmdas/linux/filesys.c 2016-07-07 16:46:00.633663707 +1000
|
|
|
0e0d81 |
@@ -1,7 +1,7 @@
|
|
|
0e0d81 |
/*
|
|
|
0e0d81 |
* Linux Filesystem Cluster
|
|
|
0e0d81 |
*
|
|
|
0e0d81 |
- * Copyright (c) 2014-2015 Red Hat.
|
|
|
0e0d81 |
+ * Copyright (c) 2014-2016 Red Hat.
|
|
|
0e0d81 |
* Copyright (c) 2000,2004,2007-2008 Silicon Graphics, Inc. All Rights Reserved.
|
|
|
0e0d81 |
*
|
|
|
0e0d81 |
* This program is free software; you can redistribute it and/or modify it
|
|
|
0e0d81 |
@@ -90,8 +90,12 @@ refresh_filesys(pmInDom filesys_indom, p
|
|
|
0e0d81 |
}
|
|
|
0e0d81 |
else if (strncmp(device, "/dev", 4) != 0)
|
|
|
0e0d81 |
continue;
|
|
|
0e0d81 |
- if (realpath(device, src) != NULL)
|
|
|
0e0d81 |
- device = src;
|
|
|
0e0d81 |
+
|
|
|
0e0d81 |
+ /* keep dm and md persistent names, RHBZ#1349932 */
|
|
|
0e0d81 |
+ if (strncmp(device, "/dev/mapper", 11) != 0 && strncmp(device, "/dev/md", 7) != 0) {
|
|
|
0e0d81 |
+ if (realpath(device, src) != NULL)
|
|
|
0e0d81 |
+ device = src;
|
|
|
0e0d81 |
+ }
|
|
|
0e0d81 |
|
|
|
0e0d81 |
sts = pmdaCacheLookupName(indom, device, NULL, (void **)&fs);
|
|
|
0e0d81 |
if (sts == PMDA_CACHE_ACTIVE) /* repeated line in /proc/mounts? */
|
|
|
0e0d81 |
diff -Naurp pcp-3.11.3.orig/src/pmdas/mounts/mounts.c pcp-3.11.3/src/pmdas/mounts/mounts.c
|
|
|
0e0d81 |
--- pcp-3.11.3.orig/src/pmdas/mounts/mounts.c 2016-02-29 11:53:04.000000000 +1100
|
|
|
0e0d81 |
+++ pcp-3.11.3/src/pmdas/mounts/mounts.c 2016-07-07 16:46:00.633663707 +1000
|
|
|
0e0d81 |
@@ -1,7 +1,7 @@
|
|
|
0e0d81 |
/*
|
|
|
0e0d81 |
* Mounts PMDA, info on current tracked filesystem mounts
|
|
|
0e0d81 |
*
|
|
|
0e0d81 |
- * Copyright (c) 2012,2015 Red Hat.
|
|
|
0e0d81 |
+ * Copyright (c) 2012,2015-2016 Red Hat.
|
|
|
0e0d81 |
* Copyright (c) 2001,2003,2004 Silicon Graphics, Inc. All Rights Reserved.
|
|
|
0e0d81 |
* Copyright (c) 2001 Alan Bailey (bailey@mcs.anl.gov or abailey@ncsa.uiuc.edu)
|
|
|
0e0d81 |
* All rights reserved.
|
|
|
0e0d81 |
@@ -323,7 +323,8 @@ mounts_refresh_mounts(void)
|
|
|
0e0d81 |
if (strcmp(path, mounts[item].i_name) != 0)
|
|
|
0e0d81 |
continue;
|
|
|
0e0d81 |
strncpy(mp->type, type, MAXFSTYPE-1);
|
|
|
0e0d81 |
- if (realpath(device, mp->device) == NULL)
|
|
|
0e0d81 |
+ /* don't resolve dm symlinks - we want the persistent device name, not the dm-* name */
|
|
|
0e0d81 |
+ if (strncmp(device, "/dev/mapper", 11) == 0 || realpath(device, mp->device) == NULL)
|
|
|
0e0d81 |
strncpy(mp->device, device, MAXPATHLEN-1);
|
|
|
0e0d81 |
strncpy(mp->options, options, MAXOPTSTR-1);
|
|
|
0e0d81 |
mp->flags = MOUNTS_FLAG_UP;
|