|
@@ -21,6 +21,7 @@ import (
|
|
"github.com/docker/docker/daemon/graphdriver"
|
|
"github.com/docker/docker/daemon/graphdriver"
|
|
"github.com/docker/docker/dockerversion"
|
|
"github.com/docker/docker/dockerversion"
|
|
"github.com/docker/docker/pkg/devicemapper"
|
|
"github.com/docker/docker/pkg/devicemapper"
|
|
|
|
+ "github.com/docker/docker/pkg/dmesg"
|
|
"github.com/docker/docker/pkg/idtools"
|
|
"github.com/docker/docker/pkg/idtools"
|
|
"github.com/docker/docker/pkg/loopback"
|
|
"github.com/docker/docker/pkg/loopback"
|
|
"github.com/docker/docker/pkg/mount"
|
|
"github.com/docker/docker/pkg/mount"
|
|
@@ -1199,7 +1200,7 @@ func (devices *DeviceSet) growFS(info *devInfo) error {
|
|
options = joinMountOptions(options, devices.mountOptions)
|
|
options = joinMountOptions(options, devices.mountOptions)
|
|
|
|
|
|
if err := mount.Mount(info.DevName(), fsMountPoint, devices.BaseDeviceFilesystem, options); err != nil {
|
|
if err := mount.Mount(info.DevName(), fsMountPoint, devices.BaseDeviceFilesystem, options); err != nil {
|
|
- return fmt.Errorf("Error mounting '%s' on '%s': %s", info.DevName(), fsMountPoint, err)
|
|
|
|
|
|
+ return fmt.Errorf("Error mounting '%s' on '%s': %s\n%v", info.DevName(), fsMountPoint, err, string(dmesg.Dmesg(256)))
|
|
}
|
|
}
|
|
|
|
|
|
defer unix.Unmount(fsMountPoint, unix.MNT_DETACH)
|
|
defer unix.Unmount(fsMountPoint, unix.MNT_DETACH)
|
|
@@ -2390,7 +2391,7 @@ func (devices *DeviceSet) MountDevice(hash, path, mountLabel string) error {
|
|
options = joinMountOptions(options, label.FormatMountLabel("", mountLabel))
|
|
options = joinMountOptions(options, label.FormatMountLabel("", mountLabel))
|
|
|
|
|
|
if err := mount.Mount(info.DevName(), path, fstype, options); err != nil {
|
|
if err := mount.Mount(info.DevName(), path, fstype, options); err != nil {
|
|
- return fmt.Errorf("devmapper: Error mounting '%s' on '%s': %s", info.DevName(), path, err)
|
|
|
|
|
|
+ return fmt.Errorf("devmapper: Error mounting '%s' on '%s': %s\n%v", info.DevName(), path, err, string(dmesg.Dmesg(256)))
|
|
}
|
|
}
|
|
|
|
|
|
if fstype == "xfs" && devices.xfsNospaceRetries != "" {
|
|
if fstype == "xfs" && devices.xfsNospaceRetries != "" {
|