no file system for xbd0 (dev 0x8e00)

2013-05-30 Thread Emile `iMil' Heitor


Hi,

Since yesterday, a NetBSD 6.0.1/amd64 domU of mine can't mount its root fs
anymore:

boot device: xbd0
root on xbd0a dumps on xbd0b
Your machine does not initialize mem_clusters; sparse_dumps disabled
Supported file systems: union umap tmpfs smbfs puffs ptyfs procfs overlay null 
ntfs nfs msdos mfs lfs kernfs fdesc ext2fs ffs coda cd9660
no file system for xbd0 (dev 0x8e00)
cannot mount root, error = 79
root device (default xbd0a):

That domU used to boot / work peacefully, but for an unknown reason, the
virtual block device is not recognized anymore. When trying to mount that
device in another virtual machine, I get the following:

[~] mount -o log /dev/xbd1a /mnt
mount_ffs: /dev/xbd1a on /mnt: incorrect super block

Whereas disklabel indicates:

[~] disklabel /dev/xbd1
# /dev/xbd1d:
type: unknown
disk: Xen Virtual ESD
label: 
flags:

bytes/sector: 512
sectors/track: 2048
tracks/cylinder: 1
sectors/cylinder: 2048
cylinders: 20480
total sectors: 41943040
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0   # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#sizeoffset fstype [fsize bsize cpg/sgs]
 a:  37748736 0 4.2BSD   2048 16384 0  # (Cyl.  0 -  18431)
 b:   4194304  37748736   swap # (Cyl.  18432 -  20479)
 c:  41943040 0 unused  0 0# (Cyl.  0 -  20479)
 d:  41943040 0 unused  0 0# (Cyl.  0 -  20479)

The virtual block device is a LVM logical volume, I use that setup in almost
all of the domUs I run, it is declared very simply in domU's configuration
file:

disk = [ 'phy:/dev/mapper/vg1-webserver,hda,w' ]

Running fsck_ffs gives:

[~] fsck_ffs /dev/xbd1a 
** /dev/rxbd1a

BAD SUPER BLOCK: CAN'T FIND SUPERBLOCK
/dev/rxbd1a: CANNOT FIGURE OUT SECTORS PER CYLINDER

And specifying another superblock doesn't change anything:

[~] fsck_ffs -b 32 /dev/xbd1a 
Alternate super block location: 32

** /dev/rxbd1a
BAD SUPER BLOCK: MAGIC NUMBER WRONG

Any idea on what can I try in order to recover that virtual drive?

--
Emile `iMil' Heitor .°. 
_
  | http://imil.net| ASCII ribbon campaign ( )
  | http://www.NetBSD.org  |  - against HTML email  X
  | http://gcu.info|  & vCards / \



Re: no file system for xbd0 (dev 0x8e00)

2013-05-30 Thread Harry Waddell
On Thu, 30 May 2013 13:27:44 +0200 (CEST)
"Emile `iMil' Heitor"  wrote:

> 
> Hi,
> 
> Since yesterday, a NetBSD 6.0.1/amd64 domU of mine can't mount its root fs
> anymore:
> 
> boot device: xbd0
> root on xbd0a dumps on xbd0b
> Your machine does not initialize mem_clusters; sparse_dumps disabled
> Supported file systems: union umap tmpfs smbfs puffs ptyfs procfs overlay 
> null ntfs nfs msdos mfs lfs kernfs fdesc ext2fs ffs coda cd9660
> no file system for xbd0 (dev 0x8e00)
> cannot mount root, error = 79
> root device (default xbd0a):
> 
> That domU used to boot / work peacefully, but for an unknown reason, the
> virtual block device is not recognized anymore. When trying to mount that
> device in another virtual machine, I get the following:
> 
> [~] mount -o log /dev/xbd1a /mnt
> mount_ffs: /dev/xbd1a on /mnt: incorrect super block
> 
> Whereas disklabel indicates:
> 
> [~] disklabel /dev/xbd1
> # /dev/xbd1d:
> type: unknown
> disk: Xen Virtual ESD
> label: 
> flags:
> bytes/sector: 512
> sectors/track: 2048
> tracks/cylinder: 1
> sectors/cylinder: 2048
> cylinders: 20480
> total sectors: 41943040
> rpm: 3600
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0 # microseconds
> track-to-track seek: 0# microseconds
> drivedata: 0
> 
> 16 partitions:
> #sizeoffset fstype [fsize bsize cpg/sgs]
>   a:  37748736 0 4.2BSD   2048 16384 0  # (Cyl.  0 -  
> 18431)
>   b:   4194304  37748736   swap # (Cyl.  18432 -  
> 20479)
>   c:  41943040 0 unused  0 0# (Cyl.  0 -  
> 20479)
>   d:  41943040 0 unused  0 0# (Cyl.  0 -  
> 20479)
> 
> The virtual block device is a LVM logical volume, I use that setup in almost
> all of the domUs I run, it is declared very simply in domU's configuration
> file:
> 
> disk = [ 'phy:/dev/mapper/vg1-webserver,hda,w' ]
> 
> Running fsck_ffs gives:
> 
> [~] fsck_ffs /dev/xbd1a 
> ** /dev/rxbd1a
> BAD SUPER BLOCK: CAN'T FIND SUPERBLOCK
> /dev/rxbd1a: CANNOT FIGURE OUT SECTORS PER CYLINDER
> 
> And specifying another superblock doesn't change anything:
> 
> [~] fsck_ffs -b 32 /dev/xbd1a 
> Alternate super block location: 32
> ** /dev/rxbd1a
> BAD SUPER BLOCK: MAGIC NUMBER WRONG
> 
> Any idea on what can I try in order to recover that virtual drive?

I suggest checking this from a dom0 perspective first before continuing the 
hunt for weird and uncommon file system corruption issues in the domU.

In the dom0, make sure your lvm is active, e.g. marked with an 'a' rather than 
a 'd'
in the output of lvm lvs. I suspect you couldn't even get a disklabel if it 
wasn't, but it can't hurt to check the lvm status in dom0 anyway. 

I'd also suggest in dom0 dd'ing the lvm's raw device to /dev/null to make sure 
there are no i/o errors.

Good luck!

Harry Waddell 


Re: no file system for xbd0 (dev 0x8e00)

2013-05-30 Thread Emile `iMil' Heitor



I suggest checking this from a dom0 perspective first before continuing the 
hunt for weird and uncommon file system corruption issues in the domU.

In the dom0, make sure your lvm is active, e.g. marked with an 'a' rather than 
a 'd'
in the output of lvm lvs. I suspect you couldn't even get a disklabel if it 
wasn't, but it can't hurt to check the lvm status in dom0 anyway.

I'd also suggest in dom0 dd'ing the lvm's raw device to /dev/null to make sure 
there are no i/o errors.


lvs output, from the dom0, seems ok:

  webserver   vg1  owi-ao  20.00g

The `o'rigin attribute is set because I've just done a snapshot just in case..

dd from the vbd to /dev/null went well also.

I have a bad feeling about this...

--
Emile `iMil' Heitor .°. 
_
  | http://imil.net| ASCII ribbon campaign ( )
  | http://www.NetBSD.org  |  - against HTML email  X
  | http://gcu.info|  & vCards / \



Re: no file system for xbd0 (dev 0x8e00)

2013-05-30 Thread Jean-Yves Migeon

Le 30/05/13 16:16, Emile `iMil' Heitor a écrit :



I suggest checking this from a dom0 perspective first before
continuing the hunt for weird and uncommon file system corruption
issues in the domU.

In the dom0, make sure your lvm is active, e.g. marked with an 'a'
rather than a 'd'
in the output of lvm lvs. I suspect you couldn't even get a disklabel
if it wasn't, but it can't hurt to check the lvm status in dom0 anyway.

I'd also suggest in dom0 dd'ing the lvm's raw device to /dev/null to
make sure there are no i/o errors.


lvs output, from the dom0, seems ok:

   webserver   vg1  owi-ao  20.00g

The `o'rigin attribute is set because I've just done a snapshot just in
case..

dd from the vbd to /dev/null went well also.

I have a bad feeling about this...


Do you get the same output between "disklabel /dev/xbd1" and "disklabel 
-Ar /dev/xbd1"?


I would also try dd'ing the LV and pass it through vnconfig(8) (never 
did it, YMMV).


I've seen weird behavior from domU when it falls on specific forbidden 
operations from dom0's backend (like trying to overwrite the disk's 
disklabel after a silent corruption).


--
Jean-Yves Migeon


Unable to dynamically set CPU frequency

2013-05-30 Thread Tim R
I installed NetBSD on a HPNX9420 laptop with a dual core 
CentrinoT2600/2.16GHzCPU 
With the Generic kernel both cores revs up to maximum frequency and stays 
there. 
This result in high temperatures within a few minutes and the fan is constantly 
on 
max speed and noise. I installed estd-0.7 from pkgsrc. When I ran estd for the 
first 
time it said it can not guess CPU-scaling technology. Ok, so I built a new 
kernel 
where I enabled odcm0 in the conf file. est0 was already enabled. I rebooted 
and ran 
estd again. Same message, can not guess CPU-scaling. Now I built a new kernel 
where 
I added the following options to the conf file: ENHANCED_SPEEDSTEP, 
EST_FREQ_USERWRITE and INTEL_ONDEMAND_CLOCKMOD. Rebooted and ran estd again, 
same 
result, can not guess CPU-scaling.

This laptop runs pretty cool on other os' including Ubuntu and Windows so 
clearly 
THOSE os' are able to modulate the frequency. What are my options here? Are 
there 
other configuration options I should compile in? Any other programs out there I 
can try in order to control cpu frequency? Any help appriciated.

Here is some of the dmesg output

NetBSD 6.0.1 (HPNX9420)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Hewlett-Packard HP Compaq nx9420 (ES446EA#ABM) (F.12)
cpu0 at mainbus0 apid 0: Genuine Intel(R) CPU T2600 @ 2.16GHz, id 0x6e8
cpu1 at mainbus0 apid 1: Genuine Intel(R) CPU T2600 @ 2.16GHZ, id 0x6e8
acpi0 at mainbus0: Intel ACPICA 20110623
acpi0: X/RSDT: OemId , AslId 
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 100
acpiec0 at acpi0 (C006, PNP0C09): io 0x62,0x66
C01F (PNP0C01) at acpi0 not configured

This is the output from cpuid

Vendor ID: "GenuineIntel"; CPUID level 10

Intel-specific functions:
Version 06e8:
Type 0 - Original OEM
Family 6 - Pentium Pro
Model 14 -
Stepping 8
Reserved 0

CLFLUSH instruction cache line size: 8
Initial APIC ID:1
Hyper threading siblings: 2

Feature flags bfe9fbff:
FPU
VME
DE
PSE
TSC
MSR
PAE
MCE
CX8
APIC
SEP
MTRR
PGE
MCA
CMOV
FGPAT
CLFSH
DS
ACPI
MMX
FXSR
SSE
SSE2
SS
HT
TM
31



Re: no file system for xbd0 (dev 0x8e00)

2013-05-30 Thread Emile `iMil' Heitor

On Thu, 30 May 2013, Jean-Yves Migeon wrote:

Do you get the same output between "disklabel /dev/xbd1" and "disklabel -Ar 
/dev/xbd1"?


I would also try dd'ing the LV and pass it through vnconfig(8) (never did it, 
YMMV).


I've seen weird behavior from domU when it falls on specific forbidden 
operations from dom0's backend (like trying to overwrite the disk's disklabel 
after a silent corruption).


I finally fixed the domU's fs, it appears that the superblock list given by
newfs -N was wrong, and I found a working alternative superblock. Luckily,
only the /dev directory and a couple of files have been wiped by fsck(8)
and I've been able to boot the virtual machine and put it to work again.
Nevertheless, that story is a bit frightening, because no error message has
never showed neither on the domU nor on the dom0, the fs corruption just
"happened silently", just like you said.

Thanks for your help anyway!

--
Emile `iMil' Heitor .°. 
_
  | http://imil.net| ASCII ribbon campaign ( )
  | http://www.NetBSD.org  |  - against HTML email  X
  | http://gcu.info|  & vCards / \



Re: Unable to dynamically set CPU frequency

2013-05-30 Thread Dave B
On Thu, May 30, 2013 at 05:50:55PM +, Tim R wrote:
> I installed NetBSD on a HPNX9420 laptop with a dual core 
> CentrinoT2600/2.16GHzCPU 
> With the Generic kernel both cores revs up to maximum frequency and stays 
> there. 
> This result in high temperatures within a few minutes and the fan is 
> constantly on 
> max speed and noise. I installed estd-0.7 from pkgsrc. When I ran estd for 
> the first 
> time it said it can not guess CPU-scaling technology. Ok, so I built a new 
> kernel 

  Does lowering the clock speed manually via sysctl succeed?  E.g.,

host# freqs=$(sysctl -n machdep.est.frequency.available)
host# minfreq=$(echo $freqs | rs 0 1 | sort -n | head -1)
host# sysctl -w machdep.est.frequency.target=$minfreq

-Dave B.

-- 
Boston, MA


Re: Unable to dynamically set CPU frequency

2013-05-30 Thread Tim R
On 2013-05-30, Dave B  wrote:
>
>   Does lowering the clock speed manually via sysctl succeed?  E.g.,
>
> host# freqs=$(sysctl -n machdep.est.frequency.available)
> host# minfreq=$(echo $freqs | rs 0 1 | sort -n | head -1)
> host# sysctl -w machdep.est.frequency.target=$minfreq
>
> -Dave B.
>

I get the message "second level name 'est' is invalid.
What I have related in sysctl are 

machdep.tsc_freq = 2161452540
hw.acpi.cpu.dynamic = 1
hw.acpi.cpu.passive = 1


Kind Regards 
 Tim



Re: Unable to dynamically set CPU frequency

2013-05-30 Thread Dave B
On Fri, May 31, 2013 at 12:27:17AM +, Tim R wrote:
> 
> I get the message "second level name 'est' is invalid.
> What I have related in sysctl are 
> 
> machdep.tsc_freq = 2161452540
> hw.acpi.cpu.dynamic = 1
> hw.acpi.cpu.passive = 1

  Hmm.  Absence of "est" under machdep sure sounds like it means
the kernel didn't recognize Enhanced Speed Step on the chip...

  Can you change something in your kernel config of which you'd
then see evidence on a subsequent reboot--to be absolutely positive
you're getting the kernel with the relevant config?  E.g.: comment
out something benign in the config (maybe the sound drivers?) and
look for them to disappear from dmesg's output?

-D