Port-xen archive

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

Re: swap file for linux stopped working: mail #2



Johan Ihren wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On 6 Oct 2008, at 21:26, Marcin M. Jessa wrote:

I used to create a separate SWAP file for linux and define it in my domU config: disk = [ 'file:/linux/ubuntu.img,0x301,w','file:/linux/swap.img,sda2,w' ]
Then just defined swap device as hda2 in linux's fstab.
But this does not seem to work anymore but I am actually not sure when it stopped working since I until now
didn't use linux domU to anything serious.
Any idea what may have broken this config and how to make this work again?

I forgot to mention one thing. The root device on Linux is sda1 and the swap device is sda2.
Trying to initialize it manually I get following error:

# swapon  -a
swapon: /dev/sda2: No such device or address

# ls -l /dev/sda2
brw-rw---- 1 root root 8, 2 Sep 28  2007 /dev/sda2

Just to make sure: you have made sure that the swap file has the magic swap signature that Linux requires? I seem to remember that I needed to "mkswap /dev/sda2" or similar before the first attempt to swapon last time I had to run a Linux DOMU with swap.

The same file used to work just fine and it still does when I scp it over from dom0 to domU and use it directly in Linux
/swap.img       none    swap    sw                      0       0

What's strange is I have my / mounted as /dev/sda1 [1] but when I once had to run fsck manually, Linux told me it doesn't exist:
fsck.ext3: No such device or address while trying to open /dev/sda1
and then I had to fsck /dev/shm/root instead.

All the sudden something's strange with device names here.
Is that something Xen changed? Should I maybe try to create some other block devices? Dmesg [2] says nothing about sd* either.... but Linux still mounts / as sda1.


[1]:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1             10079084   3346472   6220612  35% /
varrun                   65636        40     65596   1% /var/run
varlock                  65636         0     65636   0% /var/lock
devshm                   65636         0     65636   0% /dev/shm


[2]:
Linux version 2.6.18-xen (root%lapdance.fast.no@localhost) (gcc version 4.1.3 20070831 (prerelease) (Ubuntu 4.1.2-16ubuntu1)) #1 SMP Mon Sep 24 23:00:11 CEST 2007
BIOS-provided physical RAM map:
Xen: 0000000000000000 - 0000000008800000 (usable)
0MB HIGHMEM available.
136MB LOWMEM available.
On node 0 totalpages: 34816
 DMA zone: 34816 pages, LIFO batch:7
ACPI in unprivileged domain disabled
Allocating PCI resources starting at 10000000 (gap: 08800000:f7800000)
Detected 2194.646 MHz processor.
Built 1 zonelists.  Total pages: 34816
Kernel command line: root=/dev/hda1 rw
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 1024 (order: 10, 4096 bytes)
Xen reported: 2194.500 MHz processor.
Console: colour dummy device 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Software IO TLB disabled
vmalloc area: c9000000-fb7fe000, maxmem 33ffe000
Memory: 126020k/139264k available (1984k kernel code, 4904k reserved, 657k data, 200k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 4390.49 BogoMIPS (lpj=21952458)
Security Framework v1.0.0 initialized
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: After generic identify, caps: bfebc3f1 20100000 00000000 00000000 0000e3bd 00000000 00000001 CPU: After vendor identify, caps: bfebc3f1 20100000 00000000 00000000 0000e3bd 00000000 00000001
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 4096K
CPU: After all inits, caps: bfebc3f1 20100000 00000000 00000940 0000e3bd 00000000 00000001
Checking 'hlt' instruction... OK.
SMP alternatives: switching to UP code
Freeing SMP alternatives: 12k freed
Brought up 1 CPUs
migration_cost=0
NET: Registered protocol family 16
PCI: setting up Xen PCI frontend stub
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
xen_mem: Initialising balloon driver.
PCI: System does not support PCI
PCI: System does not support PCI
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 4096)
TCP reno registered
IA-32 Microcode Update Driver: v1.14a-xen <tigran%veritas.com@localhost>
audit: initializing netlink socket (disabled)
audit(1223364614.889:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Floppy drive(s): fd0 is unknown type 15 (usb?), fd1 is unknown type 15 (usb?)
Failed to obtain physical IRQ 6
floppy0: no floppy controllers found
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
Xen virtual console successfully installed as tty1
Event-channel device installed.
netfront: Initialising virtual ethernet driver.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
PNP: No PS/2 controller found. Probing ports directly.
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
xen-vbd: registered block device major 3
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI Shortcut mode
xen-vbd: registered block device major 8
netfront: device eth0 has flipping receive path.
XENBUS: Device with no driver: device/console/0
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
EXT2-fs warning (device hda1): ext2_fill_super: mounting ext3 filesystem as ext2
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 200k freed
Adding 1023992k swap on /swap.img.  Priority:-1 extents:703 across:1160276k



Home | Main Index | Thread Index | Old Index