Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: one remaining mystery about the FreeBSD domU failure on NetBSD XEN3_DOM0



At Sun, 11 Apr 2021 13:23:31 -0700, "Greg A. Woods" <woods%planix.ca@localhost> wrote:
Subject: one remaining mystery about the FreeBSD domU failure on NetBSD XEN3_DOM0
>
> In fact it only seems to be fsck that complains, possibly along
> with any attempt to write to a filesystem, that causes problems.

Definitely writing to a FreeBSD domU filesystem, i.e. to a FreeBSD
xbd(4) with a new filesystem created on it, is impossible.

I was able to write 500MB of zeros to the LVM LV backed disk,
overwriting the copy of the .img file I had put there, and only see
500MB of zeros back on the NetBSD side, so writing directly to the raw
/dev/da1 on FreeBSD seems to write data without problem.

However then the following happens when I try to use a new FS there:

# newfs /dev/da1
/dev/da1: 30720.0MB (62914560 sectors) block size 32768, fragment size 4096
        using 50 cylinder groups of 626.09MB, 20035 blks, 80256 inodes.
super-block backups (for fsck_ffs -b #) at:
 192, 1282432, 2564672, 3846912, 5129152, 6411392, 7693632, 8975872, 10258112, 11540352, 12822592, 14104832, 15387072, 16669312,
 17951552, 19233792, 20516032, 21798272, 23080512, 24362752, 25644992, 26927232, 28209472, 29491712, 30773952, 32056192, 33338432,
 34620672, 35902912, 37185152, 38467392, 39749632, 41031872, 42314112, 43596352, 44878592, 46160832, 47443072, 48725312, 50007552,
 51289792, 52572032, 53854272, 55136512, 56418752, 57700992, 58983232, 60265472, 61547712, 62829952
# mount /dev/da1 /mnt
# mount
/dev/ufs/FreeBSD_Install on / (ufs, local, noatime, read-only)
devfs on /dev (devfs, local, multilabel)
tmpfs on /var (tmpfs, local)
tmpfs on /tmp (tmpfs, local)
/dev/da1 on /mnt (ufs, local)
# df
Filesystem               512-blocks   Used    Avail Capacity  Mounted on
/dev/ufs/FreeBSD_Install     782968 737016   -16680   102%    /
devfs                             2      2        0   100%    /dev
tmpfs                         65536    608    64928     1%    /var
tmpfs                         40960      8    40952     0%    /tmp
/dev/da1                   60901560     16 56029424     0%    /mnt
# cp /COPYRIGHT /mnt
UFS /dev/da1 (/mnt) cylinder checksum failed: cg 0, cgp: 0xe66de1a4 != bp: 0xf433acbc
UFS /dev/da1 (/mnt) cylinder checksum failed: cg 1, cgp: 0x89ba8532 != bp: 0x3491fbd0
UFS /dev/da1 (/mnt) cylinder checksum failed: cg 3, cgp: 0xdeaf87a7 != bp: 0x3a071e86
UFS /dev/da1 (/mnt) cylinder checksum failed: cg 7, cgp: 0x7085828d != bp: 0xaaae0f19
UFS /dev/da1 (/mnt) cylinder checksum failed: cg 15, cgp: 0x293dfe28 != bp: 0xe2f25f8b
UFS /dev/da1 (/mnt) cylinder checksum failed: cg 31, cgp: 0x9a4d0762 != bp: 0x4119c6e
[[ .... and on and on .... ]]
UFS /dev/da1 (/mnt) cylinder checksum failed: cg 49, cgp: 0x931f84e5 != bp: 0xb48687df

/mnt: create/symlink failed, no inodes free
cp: /mnt/COPYRIGHT: No space left on device
# Apr 11 20:37:28  syslogd: last message repeated 4 times
Apr 11 20:37:59  kernel: pid 713 (cp), uid 0 inumber 2 on /mnt: out of inodes
# df -i
Filesystem               512-blocks   Used    Avail Capacity iused   ifree %iused  Mounted on
/dev/ufs/FreeBSD_Install     782968 737016   -16680   102%   12129     285   98%   /
devfs                             2      2        0   100%       0       0  100%   /dev
tmpfs                         65536    608    64928     1%      75  114613    0%   /var
tmpfs                         40960      8    40952     0%       6   71674    0%   /tmp
/dev/da1                   60901560     16 56029424     0%       2 4012796    0%   /mnt




NetBSD can actually make some sense of this FreeBSD filesystem though:

# fsck -n /dev/mapper/rscratch-fbsd--test.0
** /dev/mapper/rscratch-fbsd--test.0 (NO WRITE)
Invalid quota magic number

CONTINUE? yes

** File system is already clean
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
SUMMARY INFORMATION BAD
SALVAGE? no

BLK(S) MISSING IN BIT MAPS
SALVAGE? no

** Phase 6 - Check Quotas

CLEAR SUPERBLOCK QUOTA FLAG? no

2 files, 2 used, 7612693 free (21 frags, 951584 blocks, 0.0% fragmentation)

***** UNRESOLVED INCONSISTENCIES REMAIN *****



I'm not sure if those problems are to be expected with a FreeBSD-created
filesystem or not.  Probably the "Invalid quota magic number" is normal,
but I'm not sure about the "BLK(s) MISSING IN BIT MAPS".  Have FreeBSD
and NetBSD FFS diverged this much?  I won't try to mount it, especially
not from the dom0.

Dumpfs shows the following:

file system: /dev/mapper/rscratch-fbsd--test.0
format  FFSv2
endian  little-endian
location 65536  (-b 128)
magic   19540119        time    Sun Apr 11 13:46:15 2021
superblock location     65536   id      [ 60735d32 358197c4 ]
cylgrp  dynamic inodes  FFSv2   sblock  FFSv2   fslevel 5
nbfree  951584  ndir    2       nifree  4012796 nffree  21
ncg     50      size    7864320 blocks  7612695
bsize   32768   shift   15      mask    0xffff8000
fsize   4096    shift   12      mask    0xfffff000
frag    8       shift   3       fsbtodb 3
bpg     20035   fpg     160280  ipg     80256
minfree 8%      optim   time    maxcontig 4     maxbpg  4096
symlinklen 120  contigsumsize 4
maxfilesize 0x000800800805ffff
nindir  4096    inopb   128
avgfilesize 16384       avgfpdir 64
sblkno  24      cblkno  32      iblkno  40      dblkno  5056
sbsize  4096    cgsize  32768
csaddr  5056    cssize  4096
cgrotor 0       fmod    0       ronly   0       clean   0x01
wapbl version 0x0       location 0      flags 0x0
wapbl loc0 7864320      loc1 6408       loc2 0  loc3 0
usrquota 0      grpquota 0
flags   quotas
fsmnt   /mnt
volname         swuid   0
cs[].cs_(nbfree,ndir,nifree,nffree):
        (19400,2,80252,21) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0) (19406,0,80256,0)
        (19406,0,80256,0) (696,0,80256,0)


cg 0:
magic   90255   tell    20000   time    Sun Apr 11 13:33:54 2021
cgx     0       niblk   80256   ndblk   160280
nbfree  19400   ndir    2       nifree  80252   nffree  21
rotor   0       irotor  0       frotor  0
frsum   0       0       0       0       0       0       3
sum of frsum: 21
clusters 1-3:   -1      -1      -1
clusters size 4 and over: -1
clusters free:  0-16247, 16352, 17019-20034
iused:  0-3, 15680-15682, 15686, 15691, 15694-15702, 15704-15706,
        15708-15709, 17728, 17731, 17733, 17735-17737, 17739,
        17744, 17747, 17750-17754, 17756-17759, 19779-19781, 19783-19786,
        19791, 19794-19795, 19797-19800, 19802, 19804-19806, 21824-21828,
        21830-21832, 21834-21835, 21840, 21843-21844, 21847-21848, 21851-21852,
        21854, 23874-23881, 23885-23887, 23892-23898, 23900, 23902-23903,
        25921, 25923, 25929, 25931-25932, 25936-25938, 25941-25943,
        25946-25947, 25949-25950, 27969-27970, 27973, 27975-27979, 27981-27982,
        27986, 27990-27991, 27998-27999, 30017, 30021, 30024-30028,
        30030, 30033, 30035, 30037, 30039, 30041,
        30044-30045, 30047
free:   21441-21447, 21449-21455, 21457-160279

[[[ and so on ]]]


--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgphbWBle_zEB.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index