Port-xen archive

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

Re: I think I've found why Xen domUs can't mount some file-backed disk images! (vnd(4) hides labels!)



On the other hand NetBSD's own .img files work OK.

However interestingly there's a small, but apparently insignificant
(because it works OK) difference between how fdisk sees the disk image
and the vnd0 device:

# fdisk -F images/NetBSD-9.99.81-amd64-live.img
Disk: images/NetBSD-9.99.81-amd64-live.img
NetBSD disklabel disk geometry:
cylinders: 972, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 15624192, bytes/sector: 512

BIOS disk geometry:
cylinders: 973, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 15624192

Partitions aligned to 2048 sector boundaries, offset 2048

Partition table:
0: NetBSD (sysid 169)
    start 2048, size 15622144 (7628 MB, Cyls 0-972/143/3), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
First active partition: 0
Drive serial number: 0 (0x00000000)
# vndconfig -cv vnd0 images/NetBSD-9.99.81-amd64-live.img
/dev/rvnd0: 7999586304 bytes on images/NetBSD-9.99.81-amd64-live.img
# fdisk vnd0
Disk: /dev/rvnd0
NetBSD disklabel disk geometry:
cylinders: 7629, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
total sectors: 15624192, bytes/sector: 512

BIOS disk geometry:
cylinders: 973, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 15624192

Partitions aligned to 2048 sector boundaries, offset 2048

Partition table:
0: NetBSD (sysid 169)
    start 2048, size 15622144 (7628 MB, Cyls 0-972/143/3), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
First active partition: 0
Drive serial number: 0 (0x00000000)
21:10 [1.1496] # disklabel vnd0
# /dev/rvnd0:
type: ESDI
disk: image
label: 
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 7629
total sectors: 15624192
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

8 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  15622144      2048     4.2BSD   1024  8192    16  # (Cyl.      1 -   7628)
 c:  15622144      2048     unused      0     0        # (Cyl.      1 -   7628)
 d:  15624192         0     unused      0     0        # (Cyl.      0 -   7628)
# disklabel images/NetBSD-9.99.81-amd64-live.img
# images/NetBSD-9.99.81-amd64-live.img:
type: ESDI
disk: image
label: 
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 7629
total sectors: 15624192
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

8 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  15622144      2048     4.2BSD   1024  8192    16  # (Cyl.      1 -   7628)
 c:  15622144      2048     unused      0     0        # (Cyl.      1 -   7628)
 d:  15624192         0     unused      0     0        # (Cyl.      0 -   7628)



From inside the NetBSD live image:

[   1.4412586] xbd4 at xenbus0 id 4: Xen Virtual Block Device Interface
[   1.4422594] xbd4: using event channel 20
[   1.7112647] entropy: xbd4 attached as an entropy source (collecting without estimation)
[   1.7112647] xbd4: 7629 MB, 512 bytes/sect x 15624192 sectors
[   1.7112647] xbd4: backend features 0x9<CACHE-FLUSH,INDIRECT>



# df
Filesystem      1K-blocks         Used        Avail %Cap Mounted on
/dev/xbd4a        7562414      4699114      2485180  65% /
ptyfs                   1            1            0 100% /dev/pts
# fdisk xbd4
Disk: /dev/rxbd4
NetBSD disklabel disk geometry:
cylinders: 7629, heads: 1, sectors/track: 2048 (2048 sectors/cylinder)
total sectors: 15624192, bytes/sector: 512

BIOS disk geometry:
cylinders: 973, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 15624192

Partitions aligned to 2048 sector boundaries, offset 2048

Partition table:
0: NetBSD (sysid 169)
    start 2048, size 15622144 (7628 MB, Cyls 0-972/143/3), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
First active partition: 0
Drive serial number: 0 (0x00000000)



The NetBSD live.img root filesystem seems fine and clean:

# fsck -n /dev/rxbd4a
** /dev/rxbd4a (NO WRITE)
** Last Mounted on /
** Root file system
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
32740 files, 2349557 used, 1431650 free (538 frags, 178889 blocks, 0.0% fragmentation)


-- 
					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: pgpZEyXfCvUA9.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index