From 1c4e242181c183b3f4497a120e773556766bd943 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 22 Sep 2015 08:41:27 +0200 Subject: nlplug: look for raid and lvm2 members --- nlplug.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/nlplug.c b/nlplug.c index e699c1a..4e8bc49 100644 --- a/nlplug.c +++ b/nlplug.c @@ -143,7 +143,6 @@ int is_searchdev(const char *devname, const char *searchdev) } type = blkid_get_tag_value(cache, "TYPE", devname); -// uuid = blkid_get_tag_value(cache, "UUID", devname); if (type || label || uuid) { printf("DEBUG:%s: (%s)\n" "\ttype='%s'\n" @@ -155,7 +154,17 @@ int is_searchdev(const char *devname, const char *searchdev) } if (type) { - load_kmod(type); + if (strcmp("linux_raid_member", type) == 0) { + printf("Start mdadm\n"); + /* start raid */ + /* mdadm --incremental --export $devnode */ + } else if (strcmp("LVM2_member", type) == 0) { + printf("Start LVM2\n"); + /* start LVM2 */ + /* lvm pvscan --background --cache --activate ay --major $major --minor $minor */ + } else { + load_kmod(type); + } free(type); } -- cgit v1.2.3