Failed online backup(hypervvssd) when the guest mount udf/squashfs type

Bug #1400628 reported by Kylie Liang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
Medium
Unassigned

Bug Description

RHEL7.0 reports below issue and this should be a common issue.
https://bugzilla.redhat.com/show_bug.cgi?id=1160584

And 2 patches are accepted by community. Could you please include those patches in
OL7? Thank you.

Revision history for this message
Kylie Liang (kyliel) wrote :

This is a note to let you know that I've just added the patch titled

    Tools: hv: vssdaemon: report freeze errors

to my char-misc git tree which can be found at
    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.

The patch will show up in the next release of the linux-next tree (usually
sometime within the next 24 hours during the week.)

The patch will be merged to the char-misc-next branch sometime soon, after it
pasts testing, and the merge window is open.

If you have any questions about this process, please let me know.

From 7a401744d517864f8f2f2afba589e58a71d03aa6 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <email address hidden>
Date: Mon, 10 Nov 2014 17:37:01 +0100
Subject: Tools: hv: vssdaemon: report freeze errors

When ioctl(fd, FIFREEZE, 0) results in an error we cannot report it to syslog
instantly since that can cause write to a frozen disk.
However, the name of the filesystem which caused the error and errno are
valuable and we would like to get a nice human-readable message in the log.
Save errno before calling vss_operate(VSS_OP_THAW) and report the error right
after.

Unfortunately, FITHAW errors cannot be reported the same way as we need to
finish thawing all filesystems before calling syslog().

We should also avoid calling endmntent() for the second time in case we
encountered an error during freezing of '/' as it usually results in SEGSEGV.

Signed-off-by: Vitaly Kuznetsov <email address hidden>
Signed-off-by: K. Y. Srinivasan <email address hidden>
Acked-by: Dexuan Cui <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
---
 tools/hv/hv_vss_daemon.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c index
b720d8f0f901..ee44f0d730ef 100644
--- a/tools/hv/hv_vss_daemon.c
+++ b/tools/hv/hv_vss_daemon.c
@@ -82,7 +82,7 @@ static int vss_operate(int operation)
     FILE *mounts;
     struct mntent *ent;
     unsigned int cmd;
- int error = 0, root_seen = 0;
+ int error = 0, root_seen = 0, save_errno = 0;

     switch (operation) {
     case VSS_OP_FREEZE:
@@ -114,7 +114,6 @@ static int vss_operate(int operation)
         if (error && operation == VSS_OP_FREEZE)
             goto err;
     }
- endmntent(mounts);

     if (root_seen) {
         error |= vss_do_freeze("/", cmd);
@@ -122,10 +121,19 @@ static int vss_operate(int operation)
             goto err;
     }

- return error;
+ goto out;
 err:
- endmntent(mounts);
+ save_errno = errno;
     vss_operate(VSS_OP_THAW);
+ /* Call syslog after we thaw all filesystems */
+ if (ent)
+ syslog(LOG_ERR, "FREEZE of %s failed; error:%d %s",
+ ent->mnt_dir, save_errno, strerror(save_errno));
+ else
+ syslog(LOG_ERR, "FREEZE of / failed; error:%d %s", save_errno,
+ strerror(save_errno));
+out:
+ endmntent(mounts);
     return error;
 }

--
2.1.3

Revision history for this message
Kylie Liang (kyliel) wrote :

This is a note to let you know that I've just added the patch titled

    Tools: hv: vssdaemon: skip all filesystems mounted readonly

to my char-misc git tree which can be found at
    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.

The patch will show up in the next release of the linux-next tree (usually
sometime within the next 24 hours during the week.)

The patch will be merged to the char-misc-next branch sometime soon, after it
pasts testing, and the merge window is open.

If you have any questions about this process, please let me know.

From 9e5db05aae4657c7ade34ccc4b93f27ab647498e Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <email address hidden>
Date: Mon, 10 Nov 2014 17:37:02 +0100
Subject: Tools: hv: vssdaemon: skip all filesystems mounted readonly

Instead of making a list of exceptions for readonly filesystems in addition to
iso9660 we already have it is better to skip freeze operation for all
readonly-mounted filesystems.

Signed-off-by: Vitaly Kuznetsov <email address hidden>
Signed-off-by: K. Y. Srinivasan <email address hidden>
Acked-by: Dexuan Cui <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
---
 tools/hv/hv_vss_daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c index
ee44f0d730ef..5e63f70bd956 100644
--- a/tools/hv/hv_vss_daemon.c
+++ b/tools/hv/hv_vss_daemon.c
@@ -102,7 +102,7 @@ static int vss_operate(int operation)
     while ((ent = getmntent(mounts))) {
         if (strncmp(ent->mnt_fsname, match, strlen(match)))
             continue;
- if (strcmp(ent->mnt_type, "iso9660") == 0)
+ if (hasmntopt(ent, MNTOPT_RO) != NULL)
             continue;
         if (strcmp(ent->mnt_type, "vfat") == 0)
             continue;
--
2.1.3

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1400628

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key
Andy Whitcroft (apw)
Changed in linux (Ubuntu):
assignee: nobody → Andy Whitcroft (apw)
assignee: Andy Whitcroft (apw) → nobody
milestone: none → ubuntu-15.01
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.