Hello,
I am facing what I think is a regression with kernels > 4.10.
With kernel-4.10, I am able to mount a UFS image as follow:
host # qemu-nbd -c /dev/nbd0 /opt/images/user_images/instances/d40_R1.qcow2
host # partx -l /dev/nbd0
# 1: 63- 41929649 ( 41929587 sectors, 21467 MB)
# 5: 63- 7547376 ( 7547314 sectors, 3864 MB)
# 6: 7547377- 21384118 ( 13836742 sectors, 7084 MB)
# 7: 21384119- 23480594 ( 2096476 sectors, 1073 MB)
# 8: 23480595- 41929586 ( 18448992 sectors, 9445 MB)
host # mount -t ufs -o ufstype=44bsd /dev/nbd0p7 /mnt/img/
host # df | grep nbd
/dev/nbd0p7 1030638 2 948188 1% /mnt/img
Unfortunately, this doesn't work anymore with 4.11+ (tried 4.13.6 as well,
same qemu version):
host # qemu-nbd -c /dev/nbd0 /opt/images/user_images/instances/d40_R1.qcow2
host # partx -l /dev/nbd0
# 1: 63- 41929649 ( 41929587 sectors, 21467 MB)
# 5: 63- 7547376 ( 7547314 sectors, 3864 MB)
# 6: 7547377- 21384118 ( 13836742 sectors, 7084 MB)
# 7: 21384119- 23480594 ( 2096476 sectors, 1073 MB)
# 8: 23480595- 41929586 ( 18448992 sectors, 9445 MB)
host # mount -t ufs -o ufstype=44bsd /dev/nbd0p7 /mnt/img/
mount: wrong fs type, bad option, bad superblock on /dev/nbd0p7,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
host # dmesg
...
[ 507.252786] ufs: ufs_fill_super(): bad magic number
<-- Looking for magic number on 4.10:
host # hexdump /dev/nbd0p7 | grep -w '1954'
0002550 0001 0000 0000 0000 0000 0000 1954 0001 << magic number at low
offset
0004550 0001 0000 0000 0000 0000 0000 1954 0001 <<
5306550 0001 0000 0000 0000 0000 0000 1954 0001
541ed60 0000 0000 0000 0000 0000 0000 1954 2b49
5447ee0 0000 0000 0000 0000 0000 0000 4ea8 1954
a608550 0001 0000 0000 0000 0000 0000 1954 0001
f90a550 0001 0000 0000 0000 0000 0000 1954 0001
14c0c550 0001 0000 0000 0000 0000 0000 1954 0001
19f0e550 0001 0000 0000 0000 0000 0000 1954 0001
1f210550 0001 0000 0000 0000 0000 0000 1954 0001
1f2c9960 0000 0000 0000 0000 0000 0000 6e0c 1954
1f3037e0 0000 0000 0000 0000 0000 0000 6ff2 1954
24512550 0001 0000 0000 0000 0000 0000 1954 0001
29814550 0001 0000 0000 0000 0000 0000 1954 0001
29873fe0 0000 0000 0000 0000 0000 0000 1954 3292
2eb16550 0001 0000 0000 0000 0000 0000 1954 0001
33e18550 0001 0000 0000 0000 0000 0000 1954 0001
3911a550 0001 0000 0000 0000 0000 0000 1954 0001
3e41c550 0001 0000 0000 0000 0000 0000 1954 0001
3e47fe60 0000 0000 0000 0000 0000 0000 1954 1261
<-- Not there anymore on 4.11:
host # hexdump /dev/nbd0p7 | grep -w '1954'
52fe750 0001 0000 0000 0000 0000 0000 1954 0001 << high offset on the first
match
5416f60 0000 0000 0000 0000 0000 0000 1954 2b49
54400e0 0000 0000 0000 0000 0000 0000 4ea8 1954
a600750 0001 0000 0000 0000 0000 0000 1954 0001
f902750 0001 0000 0000 0000 0000 0000 1954 0001
14c04750 0001 0000 0000 0000 0000 0000 1954 0001
19f06750 0001 0000 0000 0000 0000 0000 1954 0001
1f208750 0001 0000 0000 0000 0000 0000 1954 0001
1f2c1b60 0000 0000 0000 0000 0000 0000 6e0c 1954
1f2fb9e0 0000 0000 0000 0000 0000 0000 6ff2 1954
2450a750 0001 0000 0000 0000 0000 0000 1954 0001
2980c750 0001 0000 0000 0000 0000 0000 1954 0001
2986c1e0 0000 0000 0000 0000 0000 0000 1954 3292
2eb0e750 0001 0000 0000 0000 0000 0000 1954 0001
33e10750 0001 0000 0000 0000 0000 0000 1954 0001
39112750 0001 0000 0000 0000 0000 0000 1954 0001
3e414750 0001 0000 0000 0000 0000 0000 1954 0001
3e478060 0000 0000 0000 0000 0000 0000 1954 1261
3ffa5f50 0001 0000 0000 0000 0000 0000 1954 0001 << magic number now at
the end
3ffa7f50 0001 0000 0000 0000 0000 0000 1954 0001 <<
0x5306550 - 0x52fe750 = 0x7E00 = 32,256
So it looks like the partition is offset by 32,256 bytes in 4.11.
Do I need to submit a bug report?
Thanks in advance,
Yannick
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nbd-general mailing list
Nbd-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nbd-general