Re: [zfs] Mounting from (...) failed with error 19

2010-10-20 Thread KOT MATPOCKuH
Hello!

 I fixed it with attached patch.
Omg... Why You are using strcmp, but not strncmp(fs, zfs, strlen(zfs))?
-- 
MATPOCKuH
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [zfs] Mounting from (...) failed with error 19

2010-10-20 Thread Andrey V. Elsukov
On 20.10.2010 10:50, KOT MATPOCKuH wrote:
 Hello!
 
 I fixed it with attached patch.
 Omg... Why You are using strcmp, but not strncmp(fs, zfs, strlen(zfs))?

:)

Just because it is not first access to the fs variable in this function.
And it is already checked with strcmp.

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature


Re: [zfs] Mounting from (...) failed with error 19

2010-10-20 Thread Marcel Moolenaar

On Oct 19, 2010, at 9:38 PM, Andrey V. Elsukov wrote:

 On 20.10.2010 2:33, Marcel Moolenaar wrote:
 What about the attached patch?  I'm going to give it a swirl soon.  The
 difference is that it tests whether dev begins with /dev/.
 
 Interesting. I've been thinking about this too, but isn't
 exactly fool-proof. When devfs is the root file system,
 you can use ufs:da0s1a to refer to the device special
 file. It seems inconsistent to have ufs:da0s1 fail when
 ufs:/dev/da0s1 works (a real scenario with USB based mass
 storage devices -- root mount is unheld as soon as umass
 is created, but before daX exists for it).
 
 This patch at least covers the problem cases with a single
 strstr(), and we may get away with the inconsistency given
 above by documenting it properly.
 
 Andrey: any thoughts?
 
 Currently usage information in parse_dir_ask() says that device should
 be specified with /dev/. But conf0 does not use /dev/. Also,  Marcel,
 do you have any plans write some documentation with examples about using
 of new features?

Yes, this will be documented.

-- 
Marcel Moolenaar
xcl...@mac.com



___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [zfs] Mounting from (...) failed with error 19

2010-10-20 Thread Peter Jeremy
On 2010-Oct-20 10:50:38 +0400, KOT MATPOCKuH matpoc...@gmail.com wrote:
 I fixed it with attached patch.
Omg... Why You are using strcmp, but not strncmp(fs, zfs, strlen(zfs))?

Can you explain why you think it should be strncmp() please.

-- 
Peter Jeremy


pgpYP2SOEntZd.pgp
Description: PGP signature


Re: [zfs] Mounting from (...) failed with error 19

2010-10-20 Thread Garrett Cooper
On Wed, Oct 20, 2010 at 12:45 PM, Peter Jeremy peterjer...@acm.org wrote:
 On 2010-Oct-20 10:50:38 +0400, KOT MATPOCKuH matpoc...@gmail.com wrote:
 I fixed it with attached patch.
Omg... Why You are using strcmp, but not strncmp(fs, zfs, strlen(zfs))?

 Can you explain why you think it should be strncmp() please.

I'd say that strcmp is perfectly fine because zfs is a 3 character (4
if you count NUL) string. The comparison logic is dang near the same:

/*
 * Compare strings.
 */
int
strcmp(const char *s1, const char *s2)
{
while (*s1 == *s2++)
if (*s1++ == '\0')
return (0);
return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1));
}

int
strncmp(const char *s1, const char *s2, size_t n)
{

if (n == 0)
return (0);
do {
if (*s1 != *s2++)
return (*(const unsigned char *)s1 -
*(const unsigned char *)(s2 - 1));
if (*s1++ == '\0')
break;
} while (--n != 0);
return (0);
}

Weird how n == 0 with strcmp returns 0...

-Garrett
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [zfs] Mounting from (...) failed with error 19

2010-10-20 Thread Garrett Cooper
On Wed, Oct 20, 2010 at 1:39 PM, Garrett Cooper gcoo...@freebsd.org wrote:
 On Wed, Oct 20, 2010 at 12:45 PM, Peter Jeremy peterjer...@acm.org wrote:
 On 2010-Oct-20 10:50:38 +0400, KOT MATPOCKuH matpoc...@gmail.com wrote:
 I fixed it with attached patch.
Omg... Why You are using strcmp, but not strncmp(fs, zfs, strlen(zfs))?

 Can you explain why you think it should be strncmp() please.

 I'd say that strcmp is perfectly fine because zfs is a 3 character (4
 if you count NUL) string. The comparison logic is dang near the same:

 /*
  * Compare strings.
  */
 int
 strcmp(const char *s1, const char *s2)
 {
        while (*s1 == *s2++)
                if (*s1++ == '\0')
                        return (0);
        return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1));
 }

 int
 strncmp(const char *s1, const char *s2, size_t n)
 {

        if (n == 0)
                return (0);
        do {
                if (*s1 != *s2++)
                        return (*(const unsigned char *)s1 -
                                *(const unsigned char *)(s2 - 1));
                if (*s1++ == '\0')
                        break;
        } while (--n != 0);
        return (0);
 }

 Weird how n == 0 with strcmp returns 0...

s/strcmp/strncmp/

-Garrett
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [zfs] Mounting from (...) failed with error 19

2010-10-20 Thread Matthew Fleming
On Wed, Oct 20, 2010 at 1:39 PM, Garrett Cooper gcoo...@freebsd.org wrote:
 On Wed, Oct 20, 2010 at 12:45 PM, Peter Jeremy peterjer...@acm.org wrote:
 On 2010-Oct-20 10:50:38 +0400, KOT MATPOCKuH matpoc...@gmail.com wrote:
 I fixed it with attached patch.
Omg... Why You are using strcmp, but not strncmp(fs, zfs, strlen(zfs))?

 Can you explain why you think it should be strncmp() please.

 I'd say that strcmp is perfectly fine because zfs is a 3 character (4
 if you count NUL) string. The comparison logic is dang near the same:

It wouldn't be about the length of the string, but whether you want a
match on other strings like zfs2, zfs_foo, and anything else
prefixed with zfs.  That's the difference between strcmp and
strncmp(... strlen()).

Thanks,
matthew
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [zfs] Mounting from (...) failed with error 19

2010-10-20 Thread Garrett Cooper
On Wed, Oct 20, 2010 at 3:18 PM, Matthew Fleming mdf...@gmail.com wrote:
 On Wed, Oct 20, 2010 at 1:39 PM, Garrett Cooper gcoo...@freebsd.org wrote:
 On Wed, Oct 20, 2010 at 12:45 PM, Peter Jeremy peterjer...@acm.org wrote:
 On 2010-Oct-20 10:50:38 +0400, KOT MATPOCKuH matpoc...@gmail.com wrote:
 I fixed it with attached patch.
Omg... Why You are using strcmp, but not strncmp(fs, zfs, strlen(zfs))?

 Can you explain why you think it should be strncmp() please.

 I'd say that strcmp is perfectly fine because zfs is a 3 character (4
 if you count NUL) string. The comparison logic is dang near the same:

 It wouldn't be about the length of the string, but whether you want a
 match on other strings like zfs2, zfs_foo, and anything else
 prefixed with zfs.  That's the difference between strcmp and
 strncmp(... strlen()).

Well, yeah... the because using the above strategy would introduce
parsing bugs as you so elegantly put it :).
-Garrett
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [zfs] Mounting from (...) failed with error 19

2010-10-19 Thread Andrey V. Elsukov
On 19.10.2010 09:03, Andrey V. Elsukov wrote:
  Mounting from (...) failed with error 19

 On boot.  The system is using pure ZFS setup.  It seems that 19 means
 ENODEV but according to the dmesg the device do exist.
 
 Yes, i have the same problem.

I fixed it with attached patch.

-- 
WBR, Andrey V. Elsukov
Index: vfs_mountroot.c
===
--- vfs_mountroot.c (revision 214058)
+++ vfs_mountroot.c (working copy)
@@ -713,7 +713,8 @@
goto out;
}
 
-   if (dev[0] != '\0'  !parse_mount_dev_present(dev)) {
+   if (strcmp(fs, zfs)  dev[0] != '\0' 
+   !parse_mount_dev_present(dev)) {
printf(mountroot: waiting for device %s ...\n, dev);
delay = hz / 10;
timeout = root_mount_timeout * hz;


signature.asc
Description: OpenPGP digital signature


Re: [zfs] Mounting from (...) failed with error 19

2010-10-19 Thread Marcel Moolenaar

On Oct 18, 2010, at 10:03 PM, Andrey V. Elsukov wrote:

 On 19.10.2010 3:50, Xin LI wrote:
 With latest kernel I got:
 
  Mounting from (...) failed with error 19
 
 On boot.  The system is using pure ZFS setup.  It seems that 19 means
 ENODEV but according to the dmesg the device do exist.
 
 Yes, i have the same problem.

Can you both boot verbose and send me the output.
Also, please boot with -a and show me the console
output, as well as the output of the '?' command.

Thanks,

-- 
Marcel Moolenaar
xcl...@mac.com



___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [zfs] Mounting from (...) failed with error 19

2010-10-19 Thread Andrey V. Elsukov
On 19.10.2010 19:43, Marcel Moolenaar wrote:
 Yes, i have the same problem.
 
 Can you both boot verbose and send me the output.
 Also, please boot with -a and show me the console
 output, as well as the output of the '?' command.

It is ZFS-only system and I have this line in /boot/loader.conf:
vfs.root.mountfrom=zfs:zroot

With boot -a -v -s I got the same result that with boot -s -v
but when I enter zfs:zroot in mountroot prompt it printed:

Trying to mount root from zfs:zroot []...
mountroot: waiting for device zroot ...
Mounting from zfs:zroot failed with error 19.
Trying to mount root from zfs:zroot []...
mountroot: waiting for device zroot ...
Mounting from zfs:zroot failed with error 19.
panic: mountroot: unable to (re-)mount root.

So, it seems that waiting for device when we are booting from zfs
is not necessary..

-- 
WBR, Andrey V. Elsukov
Copyright (c) 1992-2010 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-CURRENT #8 r214013: Wed Oct 20 00:06:20 MSD 2010
root@:/usr/obj/usr/src/sys/BTR i386
Table 'FACP' at 0x7f7a0200
Table 'APIC' at 0x7f7a0390
Table 'MCFG' at 0x7f7a03f0
Table 'OEMB' at 0x7f7ae040
Table 'HPET' at 0x7f7a5900
Table 'SSDT' at 0x7f7aeb80
ACPI: No SRAT table found
Preloaded elf kernel /boot/kernel/kernel at 0x83d7c000.
Preloaded elf module /boot/kernel/zfs.ko at 0x83d7c198.
Preloaded elf module /boot/kernel/opensolaris.ko at 0x83d7c240.
Preloaded elf module /boot/kernel/linux.ko at 0x83d7c2f0.
Preloaded elf module /boot/kernel/snd_hda.ko at 0x83d7c39c.
Preloaded elf module /boot/kernel/sound.ko at 0x83d7c448.
Preloaded elf module /boot/kernel/coretemp.ko at 0x83d7c4f4.
Preloaded elf module /boot/kernel/acpi_video.ko at 0x83d7c5a4.
Preloaded /boot/zfs/zpool.cache /boot/zfs/zpool.cache at 0x83d7c654.
Preloaded elf module /boot/kernel/drm.ko at 0x83d7c6ac.
Preloaded elf module /boot/kernel/i915.ko at 0x83d7c754.
Preloaded elf module /boot/kernel/acpi_asus.ko at 0x83d7c800.
Preloaded elf module /boot/modules/video4bsd.ko at 0x83d7c8b0.
Preloaded elf module /boot/kernel/usb.ko at 0x83d7c960.
Preloaded elf module /boot/kernel/usb_quirk.ko at 0x83d7ca08.
Preloaded elf module /boot/kernel/ehci.ko at 0x83d7cab8.
Preloaded elf module /boot/kernel/umass.ko at 0x83d7cb64.
Calibrating TSC clock ... TSC clock: 1596041208 Hz
CPU: Intel(R) Atom(TM) CPU N270   @ 1.60GHz (1596.04-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0x106c2  Family = 6  Model = 1c  Stepping = 2
  
Features=0xbfe9fbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE
  Features2=0x40c39dSSE3,DTES64,MON,DS_CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE
  AMD Features=0x10NX
  AMD Features2=0x1LAHF
  TSC: P-state invariant

1st-level instruction cache: 32 KB, 8-way set associative, 64 byte line size
L2 cache: 512 kbytes, 16-way associative, 64 bytes/line
real memory  = 2147483648 (2048 MB)
Physical memory chunk(s):
0x1000 - 0x0009efff, 647168 bytes (158 pages)
0x0010 - 0x003f, 3145728 bytes (768 pages)
0x01026000 - 0x7d36, 2083823616 bytes (508746 pages)
avail memory = 2079625216 (1983 MB)
Table 'FACP' at 0x7f7a0200
Table 'APIC' at 0x7f7a0390
APIC: Found table at 0x7f7a0390
MP Configuration Table version 1.4 found at 0x830f1160
APIC: Using the MADT enumerator.
MADT: Found CPU APIC ID 0 ACPI ID 1: enabled
SMP: Added CPU 0 (AP)
MADT: Found CPU APIC ID 1 ACPI ID 2: enabled
SMP: Added CPU 1 (AP)
Event timer LAPIC quality 400
ACPI APIC Table: A_M_I_ OEMAPIC 
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 1 core(s) x 2 HTT threads
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP/HT): APIC ID:  1
APIC: CPU 0 has ACPI ID 1
APIC: CPU 1 has ACPI ID 2
bios32: Found BIOS32 Service Directory header at 0x830f
bios32: Entry = 0xf0010 (830f0010)  Rev = 0  Len = 1
pcibios: PCI BIOS entry at 0xf+0x31
pnpbios: Found PnP BIOS data at 0x830f88b0
pnpbios: Entry = f:996a  Rev = 1.0
Other BIOS signatures found:
ULE: setup cpu 0
ULE: setup cpu 1
ACPI: RSDP 0xfb9e0 00014 (v00 ACPIAM)
ACPI: RSDT 0x7f7a 0003C (v01 A_M_I_ OEMRSDT  03000903 MSFT 0097)
ACPI: FACP 0x7f7a0200 00084 (v02 A_M_I_ OEMFACP  03000903 MSFT 0097)
ACPI: DSDT 0x7f7a05b0 05342 (v01  A1028 A1028000  INTL 20051117)
ACPI: FACS 0x7f7ae000 00040
ACPI: APIC 0x7f7a0390 0005C (v01 A_M_I_ OEMAPIC  03000903 MSFT 0097)
ACPI: MCFG 0x7f7a03f0 0003C (v01 A_M_I_ OEMMCFG  03000903 MSFT 0097)
ACPI: OEMB 0x7f7ae040 00061 (v01 A_M_I_ AMI_OEM  03000903 MSFT 0097)
ACPI: HPET 0x7f7a5900 00038 (v01 A_M_I_ OEMHPET  03000903 MSFT 0097)
ACPI: SSDT 0x7f7aeb80 004F0 (v01  PmRefCpuPm 3000 INTL 20051117)
MADT: Found IO APIC ID 2, Interrupt 0 at 0xfec0
ioapic0: Changing APIC ID to 2
ioapic0: Routing external 8259A's - intpin 

Re: [zfs] Mounting from (...) failed with error 19

2010-10-19 Thread Marcel Moolenaar

On Oct 19, 2010, at 7:55 AM, Andrey V. Elsukov wrote:

 On 19.10.2010 09:03, Andrey V. Elsukov wrote:
 Mounting from (...) failed with error 19
 
 On boot.  The system is using pure ZFS setup.  It seems that 19 means
 ENODEV but according to the dmesg the device do exist.
 
 Yes, i have the same problem.
 
 I fixed it with attached patch.

Makes sense. tank (or its namesake) isn't a real device.
Feel free to commit to unbreak things, but we may want to
rethink this from a generality point of view. Listing
exceptions doesn't scale and we now have 2 (the first was
the empty device name as used by nfs, and now also zfs).

Good catch, BTW.

-- 
Marcel Moolenaar
xcl...@mac.com



___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [zfs] Mounting from (...) failed with error 19

2010-10-19 Thread KOT MATPOCKuH
On my sparc64 system with today kernel I also got this problem.
With old kernel system boots properly.
boot -sv log attached.

-- 
MATPOCKuH


boot-sv.log
Description: Binary data
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

Re: [zfs] Mounting from (...) failed with error 19

2010-10-19 Thread KOT MATPOCKuH

On 19.10.2010 03:50, Xin LI wrote:

Escaping to boot loader prompt, and load old kernel, old opensolaris.ko,
old zfs.ko doesn't work.

I think you forgot to load zpool.cache:
load -t /boot/zfs/zpool.cache /boot/zfs/zpool.cache
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [zfs] Mounting from (...) failed with error 19

2010-10-19 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 10/19/10 08:49, Marcel Moolenaar wrote:
 
 On Oct 19, 2010, at 7:55 AM, Andrey V. Elsukov wrote:
 
 On 19.10.2010 09:03, Andrey V. Elsukov wrote:
Mounting from (...) failed with error 19

 On boot.  The system is using pure ZFS setup.  It seems that 19 means
 ENODEV but according to the dmesg the device do exist.

 Yes, i have the same problem.

 I fixed it with attached patch.
 
 Makes sense. tank (or its namesake) isn't a real device.
 Feel free to commit to unbreak things, but we may want to
 rethink this from a generality point of view. Listing
 exceptions doesn't scale and we now have 2 (the first was
 the empty device name as used by nfs, and now also zfs).
 
 Good catch, BTW.

Yes good catch, it fixed the problem for me as well.

What about the attached patch?  I'm going to give it a swirl soon.  The
difference is that it tests whether dev begins with /dev/.

Note that I'm not quite convinced with this yet as we may want to wait
for the devices from a zpool be ready, which may also need some yielding
during boot.  A better way of solving this might be to register a
watchlist of devices (so that ZFS can register its vdev devices for
example) and have mountroot wait for that list?  Or perhaps a set of
EVENTHANDLER callback?

Cheers,
- -- 
Xin LI delp...@delphij.nethttp://www.delphij.net/
FreeBSD - The Power to Serve!  Live free or die
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.16 (FreeBSD)

iQEcBAEBCAAGBQJMvgvkAAoJEATO+BI/yjfBX/gIAIRnS4eQVBe/Zh6RrT8BjI91
J1r7wNz1AYXda2t4/RUVnPZYr97GG1quEewtgcxTxW2nkii1ZkftjMg6Ik4Gio6Y
AxNdjEB35tXqhVUV1oS8JS09ejZij2Y43SHxWxOkhUnFEmuhjK4+euM/+obpJ4Kl
AR61E/DYqwv/8bqhofknylroDsveN3Vhd1n7dK4s+e3YcmANnZxTCWcxroD7C2yb
gCH6TDZPDVKVbfyS73QFoyic2Jml5eK/dkmlLMRubP5qs5aIgy0P1zcjhvRrrgOf
bYLM3IUEbVhPSQnO8d2sDhXytgCI/s6p39rMdKPR3jrf2+UnW6IM46NvVkSaOP8=
=cAxC
-END PGP SIGNATURE-
Index: sys/kern/vfs_mountroot.c
===
--- sys/kern/vfs_mountroot.c(revision 214082)
+++ sys/kern/vfs_mountroot.c(working copy)
@@ -713,8 +713,7 @@ parse_mount(char **conf)
goto out;
}
 
-   if (strcmp(fs, zfs) != 0  dev[0] != '\0' 
-   !parse_mount_dev_present(dev)) {
+   if ((strstr(dev, /dev/) == dev)  !parse_mount_dev_present(dev)) {
printf(mountroot: waiting for device %s ...\n, dev);
delay = hz / 10;
timeout = root_mount_timeout * hz;
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

Re: [zfs] Mounting from (...) failed with error 19

2010-10-19 Thread Marcel Moolenaar

On Oct 19, 2010, at 2:21 PM, Xin LI wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 On 10/19/10 08:49, Marcel Moolenaar wrote:
 
 On Oct 19, 2010, at 7:55 AM, Andrey V. Elsukov wrote:
 
 On 19.10.2010 09:03, Andrey V. Elsukov wrote:
   Mounting from (...) failed with error 19
 
 On boot.  The system is using pure ZFS setup.  It seems that 19 means
 ENODEV but according to the dmesg the device do exist.
 
 Yes, i have the same problem.
 
 I fixed it with attached patch.
 
 Makes sense. tank (or its namesake) isn't a real device.
 Feel free to commit to unbreak things, but we may want to
 rethink this from a generality point of view. Listing
 exceptions doesn't scale and we now have 2 (the first was
 the empty device name as used by nfs, and now also zfs).
 
 Good catch, BTW.
 
 Yes good catch, it fixed the problem for me as well.
 
 What about the attached patch?  I'm going to give it a swirl soon.  The
 difference is that it tests whether dev begins with /dev/.

Interesting. I've been thinking about this too, but isn't
exactly fool-proof. When devfs is the root file system,
you can use ufs:da0s1a to refer to the device special
file. It seems inconsistent to have ufs:da0s1 fail when
ufs:/dev/da0s1 works (a real scenario with USB based mass
storage devices -- root mount is unheld as soon as umass
is created, but before daX exists for it).

This patch at least covers the problem cases with a single
strstr(), and we may get away with the inconsistency given
above by documenting it properly.

Andrey: any thoughts?

-- 
Marcel Moolenaar
xcl...@mac.com



___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [zfs] Mounting from (...) failed with error 19

2010-10-19 Thread Andrey V. Elsukov
On 20.10.2010 2:33, Marcel Moolenaar wrote:
 What about the attached patch?  I'm going to give it a swirl soon.  The
 difference is that it tests whether dev begins with /dev/.
 
 Interesting. I've been thinking about this too, but isn't
 exactly fool-proof. When devfs is the root file system,
 you can use ufs:da0s1a to refer to the device special
 file. It seems inconsistent to have ufs:da0s1 fail when
 ufs:/dev/da0s1 works (a real scenario with USB based mass
 storage devices -- root mount is unheld as soon as umass
 is created, but before daX exists for it).
 
 This patch at least covers the problem cases with a single
 strstr(), and we may get away with the inconsistency given
 above by documenting it properly.
 
 Andrey: any thoughts?

Currently usage information in parse_dir_ask() says that device should
be specified with /dev/. But conf0 does not use /dev/. Also,  Marcel,
do you have any plans write some documentation with examples about using
of new features?

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature


[zfs] Mounting from (...) failed with error 19

2010-10-18 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

With latest kernel I got:

Mounting from (...) failed with error 19

On boot.  The system is using pure ZFS setup.  It seems that 19 means
ENODEV but according to the dmesg the device do exist.

At the beginning I thought it was because that zpool.cache was destroyed
somehow, so I have tried to use LiveFS and mkdir /boot/zfs, hostid
start, zpool import -f, mount pool/root, and copy /boot/zfs/zpool.cache
over it but unluckily this failed.

Escaping to boot loader prompt, and load old kernel, old opensolaris.ko,
old zfs.ko doesn't work.  However, using LiveFS to restore the whole
kernel back to previous version fixed the problem (mv kernel kernel.bad
 mv kernel.old kernel).

Looking at the change log, I find that there is no intrusive changes to
ZFS itself but there are some changes against mountroot logic, but I'm
not convinced since loading kernel.old/kernel at boot loader should have
override this :-/

Any idea?

Cheers,
- -- 
Xin LI delp...@delphij.nethttp://www.delphij.net/
FreeBSD - The Power to Serve!  Live free or die
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.16 (FreeBSD)

iQEcBAEBCAAGBQJMvN06AAoJEATO+BI/yjfBkuAH/0437KphO+sPWv+M0UNEW/Zi
FO6c6TErSl4cZiTyGUSUjjDMAM71E+OXMin5ELjSDQbB05Dd96uLUKiCObEYdz1o
hovpjbGy+ZNIeIBUvrCvdg14o8m9WipWGwVZDXEdHY9GOjcEJdWcmcL6xpsLMN7F
BadVL1c/FunVXjeRwhDwhO7YmFgzfE6rBJjbtPflCj2PeKPsyk7he0hL3iNyBbAx
5IvwHvd0bu3EkGk9slc9ogahJjOdq3SRPiiSnkKIZyRjCeeC+ptSvI9ri1evIpIX
EFoY1oEmNAkmtIBiVxNlRPeJ2kWQxDCkqWsDUgpwXrKKS5FL7cKssb9PYog/mVE=
=Buo+
-END PGP SIGNATURE-
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [zfs] Mounting from (...) failed with error 19

2010-10-18 Thread Andrey V. Elsukov
On 19.10.2010 3:50, Xin LI wrote:
 With latest kernel I got:
 
   Mounting from (...) failed with error 19
 
 On boot.  The system is using pure ZFS setup.  It seems that 19 means
 ENODEV but according to the dmesg the device do exist.

Yes, i have the same problem.

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature