Sitemap

Moving a xen geust (domU) from a debian jessie host (dom0) to a debian stretch dom0

2 min readJul 13, 2017

--

Nice new freshly installed debian stretch server with Xen on it so I went ahead to move a guest from a different xen host, this dom0 was however still running on debian wheezy. Once I tried to boot up the guest via pvgrub I was greeted by this a error message while trying to mount /

[   47.768360] EXT4-fs (xvda2): couldn't mount RDWR because of unsupported optional features (400)

wait what?

Comapring features with tune2fs shows two features that the ext4 filesystem created on the jessie host doesn’t have, which the stretch server does.

  • metadata_csum
  • 64bit

so, let’s get rid of these features so that the older kernel can mount the ext4 FS.

First FSCK, you need to pass the -f argument to force fsck to run

e2fsck -f /dev/vg1/...
tune2fs -O ^metadata_csum /dev/vg1/...
tune2fs -O ^64bit /dev/vg1/...

After the last tune2fs you will be prompted to run resize2fs so let’s do that as well.

resize2fs -s /dev/vg1/...

Now when booting the guest it might happen that you will see a new error message

Journal superblock has an unknown incompatible feature flag set.
/dev/xvda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)

so, let’s do that as well, run fsck manually without the -a option.

(initramfs) fsck.ext4 /dev/xvda2
e2fsck 1.42.12 (29-Aug-2014)
Journal superblock has an unknown incompatible feature flag set.
Abort<y>? no
Journal superblock is corrupt.
Fix<y>? yes
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

after exiting initram the system will boot up without any issues.

What about debian wheezy?

Apparently this solved the issue only for my debian jessie guest. The wheezy guest still complained during boot

[ 1.683594] JBD2: Unrecognised features on journal
[ 1.683601] EXT4-fs (xvda2): error loading journal

I expected this but didn’t expect initramfs to not contain fsck. So the solution was to boot up a jessie guest which has the LVM from the wheezy system, then run e2fsck, shut down jessie and boot up with wheezy again.

root@jessie:~# e2fsck /dev/xvda3
e2fsck 1.42.12 (29-Aug-2014)
Journal superblock has an unknown incompatible feature flag set.
Abort<y>? no
Journal superblock is corrupt.
Fix<y>? yes
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/xvda3: ***** FILE SYSTEM WAS MODIFIED *****
/dev/xvda3: 56968/3932160 files (0.2% non-contiguous), 1141635/15728640 blocks

--

--

Responses (1)