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

Re: [Xen-devel] the /dev/xvda can not be mounted and read/write when using xl create domU



On 04/16/2014 10:29 AM, duqi wrote:
Hello everyone,

I have tried to boot the domU folow the below instrctions:
The domU kernel that I used is from 
https://github.com/linux-sunxi/linux-sunxi.git  and the 'sunxi-devel' branch. I 
 have compiled the ramdisk with the domu kernel to boot the domu.

When I xl console the domU , I tried to mount the /dev/xvda to the /mnt and I 
met this error:
# mount /dev/xvda /mnt
[  681.934232] end_request: I/O error, dev xvda, sector 2
[  681.934401] EXT3-fs (xvda): error: unable to read superblock
[  681.947103] end_request: I/O error, dev xvda, sector 2
[  681.947244] EXT2-fs (xvda): error: unable to read superblock
[  681.967089] end_request: I/O error, dev xvda, sector 2
[  681.967226] EXT4-fs (xvda): unable to read superblock
mount: mounting /dev/xvda on /mnt failed: Invalid argument
#

Then I tried "# dd if=/dev/zero of=/dev/xvda bs=1 count=1000 seek=10000" to 
test the read and write of /dev/xvda, it also met error:
[  632.851166] end_request: I/O error, dev xvda, sector 16
dd: writing '/dev/xvda': Input/output error
1+0 records in
0+0 records out

(2) the domu_all.cfg is here:
root@linaro-alip:~# cat domu_all.cfg
kernel = "/root/zImage"
memory = "64"
name = "dom11"
vcpus = 1
serial="pty"
root="/dev/xvda"
extra = "4 console=hvc0,xencons=tty"
disk = [ 'phy:/dev/loop2,xvda,w' ]
vif=[ 'mac=00:16:3e:56:af:69,bridge=xenbr0,type=netfront', ]

Based on the log, I think your loop2 might have problem. If you are using image from Linaro, you should specify the offset in losetup. Here is one:

> losetup -o 54525952 /dev/loop2 ./rootfs.img

You can also try to mount /dev/loop2 in Dom0. If it is successful, DomU should work.


Then I boot the domU follow the instructions:
losetup /dev/loop2 /root/domU/rootfs.img
xl -vvv create domu_all.cfg


Add some information : I want to use the raring rootfs as the rootfs of domu, 
and the /dev/xvda as the root device of domu, now I compiled the kernel with ramdisk 
for debug.

Could you give me some advices ? Thank you very much.

Here is the kernel dump of domU:

root@linaro-alip:~# xl console dom11
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.15.0-rc1-128773-gf7b9c0f-dirty 
(root@Lenovo-G480) (gcc version 4.8.2 20131014 (prerelease) (cross4
[    0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing 
instruction cache
[    0.000000] Machine model: XENVM-4.4
[    0.000000] cma: CMA: failed to reserve 64 MiB
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing function IDs from device-tree
[    0.000000] PERCPU: Embedded 8 pages/cpu @c3f6f000 s8896 r8192 d15680 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 16256
[    0.000000] Kernel command line: root=/dev/xvda 4 console=hvc0,xencons=tty
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 52384K/65536K available (6317K kernel code, 787K rwdata, 
2416K rodata, 2692K init, 292K bss, 13152K reser)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc0a8f994   (8735 kB)
[    0.000000]       .init : 0xc0a90000 - 0xc0d312c0   (2693 kB)
[    0.000000]       .data : 0xc0d32000 - 0xc0df6ea0   ( 788 kB)
[    0.000000]        .bss : 0xc0df6ea8 - 0xc0e40110   ( 293 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] Architected cp15 timer(s) running at 24.00MHz (virt).
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 
2863311519744ns
[    0.000016] Switching to timer-based delay loop
[    0.000152] Console: colour dummy device 80x30
[    0.000181] Calibrating delay loop (skipped), value calculated using timer 
frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000194] pid_max: default: 32768 minimum: 301
[    0.000321] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000332] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000879] CPU: Testing write buffer coherency: ok
[    0.001145] /cpus/cpu@0 missing clock-frequency property
[    0.001163] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.001205] Xen 4.4 support found, events_irq=31 gnttab_frame=0xb0000000
[    0.001285] xen:grant_table: Grant tables using version 1 layout
[    0.001332] Grant table initialized
[    0.001416] xen:events: Using FIFO-based ABI
[    0.001439] Xen: initializing cpu0
[    0.001553] Setting up static identity map for 0x807fe120 - 0x807fe1b8
[    0.002319] Brought up 1 CPUs
[    0.002332] SMP: Total of 1 processors activated.
[    0.002341] CPU: All CPU(s) started in SVC mode.
[    0.002957] devtmpfs: initialized
[    0.003728] VFP support v0.3: implementor 41 architecture 2 part 30 variant 
7 rev 4
[    0.003991] pinctrl core: initialized pinctrl subsystem
[    0.004395] regulator-dummy: no parameters
[    0.005068] NET: Registered protocol family 16
[    0.005187] DMA: failed to allocate 256 KiB pool for atomic coherent 
allocation
[    0.007939] No ATAGs?
[    0.008417] Serial: AMBA PL011 UART driver
[    0.016931] edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM dummy 
slot
[    0.016969] edma-dma-engine: probe of edma-dma-engine.0 failed with error -5
[    0.017090] xen:balloon: Initialising balloon driver
[    0.022741] vgaarb: loaded
[    0.023384] SCSI subsystem initialized
[    0.024138] usbcore: registered new interface driver usbfs
[    0.024224] usbcore: registered new interface driver hub
[    0.024584] usbcore: registered new device driver usb
[    0.025051] Linux video capture interface: v2.00
[    0.025101] pps_core: LinuxPPS API ver. 1 registered
[    0.025111] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti 
<giometti@xxxxxxxx>
[    0.025146] PTP clock support registered
[    0.025204] EDAC MC: Ver: 3.0.0
[    0.026062] Advanced Linux Sound Architecture Driver Initialized.
[    0.027270] Switched to clocksource arch_sys_counter
[    0.038473] NET: Registered protocol family 2
[    0.039042] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.039076] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.039100] TCP: Hash tables configured (established 1024 bind 1024)
[    0.039157] TCP: reno registered
[    0.039172] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.039206] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.039376] NET: Registered protocol family 1
[    0.039780] RPC: Registered named UNIX socket transport module.
[    0.039795] RPC: Registered udp transport module.
[    0.039802] RPC: Registered tcp transport module.
[    0.039809] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.184584] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.196325] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.197108] NFS: Registering the id_resolver key type
[    0.197176] Key type id_resolver registered
[    0.197185] Key type id_legacy registered
[    0.197234] msgmni has been set to 102
[    0.197970] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 
249)
[    0.197986] io scheduler noop registered
[    0.197994] io scheduler deadline registered
[    0.198189] io scheduler cfq registered (default)
[    0.260058] console [hvc0] enabled
[    0.260155] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.261940] msm_serial: driver initialized
[    0.262148] STMicroelectronics ASC driver initialized
[    0.262568] serial: Freescale lpuart driver
[    0.262771] [drm] Initialized drm 1.1.0 20060810
[    0.267247] loop: module loaded
[    0.283758] xen_netfront: Initialising Xen virtual ethernet driver
[    0.299796] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet 
driver
[    0.299970] usbcore: registered new interface driver pegasus
[    0.300080] usbcore: registered new interface driver asix
[    0.300152] usbcore: registered new interface driver ax88179_178a
[    0.300220] usbcore: registered new interface driver cdc_ether
[    0.300302] usbcore: registered new interface driver smsc75xx
[    0.300384] usbcore: registered new interface driver smsc95xx
[    0.300447] usbcore: registered new interface driver net1080
[    0.300511] usbcore: registered new interface driver cdc_subset
[    0.300626] usbcore: registered new interface driver zaurus
[    0.300787] usbcore: registered new interface driver cdc_ncm
[    0.300841] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.300865] ehci-pci: EHCI PCI platform driver
[    0.300953] ehci-platform: EHCI generic platform driver
[    0.301107] ehci-omap: OMAP-EHCI Host Controller driver
[    0.301196] ehci-orion: EHCI orion driver
[    0.301271] SPEAr-ehci: EHCI SPEAr driver
[    0.301342] tegra-ehci: Tegra EHCI driver
[    0.301803] usbcore: registered new interface driver usb-storage
[    0.303013] mousedev: PS/2 mouse device common for all mice
[    0.304514] i2c /dev entries driver
[    0.304994] usbcore: registered new interface driver uvcvideo
[    0.305020] USB Video Class driver (1.1.1)
[    0.305034] gspca_main: v2.14.0 registered
[    0.305669] xen_wdt: Xen WatchDog Timer Driver v0.01
[    0.306421] xen_wdt: initialized (timeout=60s, nowayout=0)
[    0.307004] sdhci: Secure Digital Host Controller Interface driver
[    0.307036] sdhci: Copyright(c) Pierre Ossman
[    0.307504] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.307947] usbcore: registered new interface driver usbhid
[    0.307973] usbhid: USB HID core driver
[    0.311044] TCP: cubic registered
[    0.311084] NET: Registered protocol family 17
[    0.311387] Key type dns_resolver registered
[    0.311502] ThumbEE CPU extension supported.
[    0.323687] Registering SWP/SWPB emulation handler
[    0.329080] blkfront: xvda: flush diskcache: enabled; persistent grants: 
enabled; indirect descriptors: enabled;
[    0.347192]  xvda: unknown partition table
[    0.367730] Setting capacity to 10240
[    0.367787] xvda: detected capacity change from 0 to 5242880
[    0.417924] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    0.418071] ALSA device list:
[    0.418093]   No soundcards found.
[    0.421706] Freeing unused kernel memory: 2692K (c0a90000 - c0d31000)


duqi.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.