Re: Kernel/World Upgrade causes Hang
Well, I would suggest you try this: cd /usr/src make buildkernel KERNCONF=GENERIC make installkernel KERNCONF=GENERIC cd /boot mv kernel test mv kernel.old kernel nextboot -k test Then, you can reboot. This will ensure you can boot a stock kernel just fine. If you can, obviously there is something wrong with your custom kernel and you should start from a fresh GENERIC kernel and remove devices and drivers little by little. On 12/28/10 2:05 AM, Troy wrote: Sorry. I am on the RELENG_8 tree and I believe it was building 8.2pre. I did the build about 4 days ago. I am building a custom kernel. Yes I definitely built the world before the kernel and it worked. I did not use -J anything. There is no boot message, it just hangs with what I wrote below. Below is the kernel config I'm using. machine amd64 cpu HAMMER ident servername-removed # To statically compile in device wiring instead of /boot/device.hints #hints GENERIC.hints # Default places to look for devices. makeoptions DEBUG=-g# Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET# InterNETworking options SCTP# Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL# Enable gjournal-based UFS journaling options MD_ROOT # MD is a potential root device options NFSCLIENT # Network Filesystem Client options NFSSERVER # Network Filesystem Server options NFSLOCKD# Network Lock Manager options NFS_ROOT# NFS usable as /, requires NFSCLIENT options NTFS# NT File System options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS# Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY# BSD 4.3 TTY compat (sgtty) options COMPAT_IA32 # Compatible with i386 binaries options COMPAT_43 # Needed by COMPAT_LINUX32 options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 options COMPAT_FREEBSD7 # Compatible with FreeBSD7 options COMPAT_LINUX32 # Compatible with i386 linux binaries options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options P1003_1B_SEMAPHORES # POSIX-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128# Prevent printf output being interspersed. options KBD_INSTALL_CDEV# install a CDEV entry in /dev options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework options FLOWTABLE # per-cpu routing cache options INCLUDE_CONFIG_FILE # Include this file in kernel options IPSTEALTH options INVARIANTS options INVARIANT_SUPPORT # Make an SMP-capable kernel by default optionsSMP # Symmetric MultiProcessor Kernel # CPU frequency control device cpufreq # For SMBFS - mount_smbfs to work by users options SMBFS # SMB/CIFS filesystem options NETSMB # SMB/CIFS requester options LIBMCHAIN # MBUF management library options LIBICONV# Kernel side iconv library # Workarounds for some known-to-be-broken chipsets (nVidia nForce3-Pro150) device atpic # 8259A compatability # Linux 32-bit ABI support options LINPROCFS # Cannot be a
Re: Accidentally aborted upgrade via freebsd-update - how to recover?
On 12/28/10 7:20 AM, Jason Helfman wrote: On Mon, Dec 27, 2010 at 04:52:03PM -0800, Doug Barton thus spake: On 12/27/2010 16:40, Damien Fleuriot wrote: On 12/27/10 11:58 PM, Clifton Royston wrote: OK, and oh well... I wish there were some way to automate the diffing out of the $FreeBSD lines. I suppose those might be the artifact of some previous upgrade, so that the file version present is not the one expected for FreeBSD 6.1. -- Clifton Wait, do you mean like, mergemaster -F ? Excerpt from the manual: -F If the files differ only by VCS Id ($FreeBSD) install the new file. I've discovered this rather recently, it's a *lifesaver* This comes from fbsd7's version though, I can not say for the one you're still running on fbsd6 You always want to run mergemaster from the version you are upgrading _to_. It doesn't happen often (by design) but occasionally mergemaster has to grow special knowledge of specific files/directories/etc. in a new FreeBSD version. As far as I can tell, freebsd-update doesn't use mergemaster. /usr/src/usr.sbin/freebsd-update/freebsd-update.sh Source installation does, however I don't believe a binary upgrade does. Wouldn't it be possible for him to invoke mergemaster manually though, so that his configuration changes get merged much easier ? This implies having a current version of mergemaster and the new configuration files to compare though... ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
zfsboot from 8.2RC1 freeze at boot time
Hello and merry Xmas to everybody, I upgrade a remote server from 8.1-RELEASE to 8.2-RC1. This server have one disk: [r...@tignes ~]# gpart show = 63 488397105 ada0 MBR (233G) 63 12583809 1 freebsd (6.0G) 12583872 475813296 2 freebsd [active] (227G) = 0 12583809 ada0s1 BSD (6.0G) 0 8388608 1 freebsd-ufs (4.0G) 8388608 4195201 2 freebsd-swap (2.0G) =0 475813296 ada0s2 BSD (227G) 0 475813296 1 freebsd-zfs (227G) It boot with zfsboot from ada0s2 containing a zfs pool. After upgrading the zfsboot just to be able to upgrade the pool to v15, the server don't boot anymore. It is a remote server, so I reproduce this config under VirtualBox. The boot freeze after zfsboot displaying -. I grab a old zfsboot from another server running 8.1-STABLE (r213582) which boot fine. I put the zfsboot from r213582 (zpool v15 aware) on ada0s2 and bingo, the server boot normally. Henri ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: New ZFSv28 patchset for 8-STABLE: ARRRGG HELP !!
Well Today I added the log device: zpool add pool log /dev/ada1s1 (8GB slice on a SSD Intel X25 disk).. then added the cache (32GB) zpool add pool cache /dev/ada1s2 So far so good. zpool status - all good. Reboot : it hangs booted in single user mode, zpool status: ZFS filesystem version 5 ZFS storage pool version 28 and that's it no more.. Just like before when I thought that removing the log disk had failed. This time no error nothing... just a nasty hang and unusable system again... :( ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: New ZFSv28 patchset for 8-STABLE: Kernel Panic
Hi On 27 December 2010 16:04, jhell jh...@dataix.net wrote: 1) Set vfs.zfs.recover=1 at the loader prompt (OK set vfs.zfs.recover=1) 2) Boot into single user mode without opensolaris.ko and zfs.ko loaded 3) ( mount -w / ) to make sure you can remove and also write new zpool.cache as needed. 3) Remove /boot/zfs/zpool.cache 4) kldload both zfs and opensolaris i.e. ( kldload zfs ) should do the trick 5) verify that vfs.zfs.recover=1 is set then ( zpool import pool ) 6) Give it a little bit monitor activity using Ctrl+T to see activity. Ok.. I've got into the same situation again, no idea why this time. I've followed your instructions, and sure enough I could do an import of my pool again. However, wanted to find out what was going on.. So I did: zpool export pool followed by zpool import And guess what ... hanged zpool again.. can't Ctrl-C it, have to reboot.. So here we go again. Rebooted as above. zpool import pool - ok this time, I decided that maybe that what was screwing things up was the cache. zpool remove pool ada1s2 - ok zpool status: # zpool status pool: pool state: ONLINE scan: scrub repaired 0 in 18h20m with 0 errors on Tue Dec 28 10:28:05 2010 config: NAMESTATE READ WRITE CKSUM poolONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 ada2ONLINE 0 0 0 ada3ONLINE 0 0 0 ada4ONLINE 0 0 0 ada5ONLINE 0 0 0 ada6ONLINE 0 0 0 ada7ONLINE 0 0 0 logs ada1s1ONLINE 0 0 0 errors: No known data errors # zpool export pool - ok # zpool import pool - ok # zpool add pool cache /dev/ada1s2 - ok # zpool status pool: pool state: ONLINE scan: scrub repaired 0 in 18h20m with 0 errors on Tue Dec 28 10:28:05 2010 config: NAMESTATE READ WRITE CKSUM poolONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 ada2ONLINE 0 0 0 ada3ONLINE 0 0 0 ada4ONLINE 0 0 0 ada5ONLINE 0 0 0 ada6ONLINE 0 0 0 ada7ONLINE 0 0 0 logs ada1s1ONLINE 0 0 0 cache ada1s2ONLINE 0 0 0 errors: No known data errors # zpool export pool - ok # zpool import load: 0.00 cmd: zpool 405 [spa_namespace_lock] 15.11r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 15.94r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 16.57r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 16.95r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 32.19r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 32.72r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 40.13r 0.00u 0.03s 0% 2556k ah ah ! it's not the separate log that make zpool crash, it's the cache ! Having the cache in prevent from importing the pool again rebooting: same deal... can't access the pool any longer ! Hopefully this is enough hint for someone to track done the bug ... ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: root mount error
On Tue, Dec 28, 2010 at 01:36:01AM +0100, Damien Fleuriot wrote: On 12/27/10 9:18 PM, Michael BlackHeart wrote: I've got trouble with FreeBSD 8 Stable First I've put on notebook 8.2 RELEASE amd64, then SVN'ed src's to yesterday revision I don't remember exact number, but I've have this problem aobut week or two so it's not so important, also as it doesn't work on i386 too. After installing new kernel I've just build - indeed it always was GENERIC for both arch's on clean system - I've got an a kernel painc caused by disability to mount root partition because kernel couldn't see the drive. By pressing '?' I've sen only acd0 that represents CD-ROM. In debug messages I haven't found anything about ad0 - than hdd was identified before new kernel was installed. I've got an HP 6720s notebook with SATA 160GB Hitachi HDD that is working with diabled SATA native mode. I've not found any info 'bout this error in recent 8.Stable so I don't know how to handle this one. First, I'd advise making use of FreeBSD's nextboot utility to test new kernels: http://fuse4bsd.creo.hu/localcgi/man-cgi.cgi?nextboot+8 Second, I would suggest reading the handbook's excellent section on upgrading your machine or rebuilding the kernel: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading.html Now, a likely cause of your problem is the installation of a custom kernel with removed support for whatever your hard disk drive or raid controller is recognized as. Did you reinstall your old, working kernel, or are you actually asking for help doing just that ? What kind of laptop? For information, I had a similar problem when I updated my laptop (HP Compaq 6910p) to 8.2-PRERELEASE as of 14 December. For some reason, the system was no longer seeing the main hard drive. I solved the problem by setting 'SATA Native Mode' (or some such) in the BIOS, which then led my (SATA) drive to be seen at '/dev/ad8'. After booting from ad8 and modifying my 'fstab', everything works fine. So you might try the same thing. At least change the setting in your BIOS to see if you can see a drive. -greg -- greg byshenk - gbysh...@byshenk.net - Leiden, NL ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: /libexec/ld-elf.so.1: Cannot execute objects on /
On Saturday, December 25, 2010 6:43:25 am Miroslav Lachman wrote: John Baldwin wrote: On Saturday, December 11, 2010 11:51:41 am Miroslav Lachman wrote: Miroslav Lachman wrote: Garrett Cooper wrote: 2010/4/20 Miroslav Lachman000.f...@quip.cz: I have large storage partition (/vol0) mounted as noexec and nosuid. Then one directory from this partition is mounted by nullfs as exec and suid so anything on it can be executed. The directory contains full installation of jail. Jail is running fine, but some ports (PHP for example) cannot be compiled inside the jail with message: /libexec/ld-elf.so.1: Cannot execute objects on / The same apply to executing of apxs r...@rainnew ~/# /usr/local/sbin/apxs -q MPM_NAME /libexec/ld-elf.so.1: Cannot execute objects on / apxs:Error: Sorry, no shared object support for Apache. apxs:Error: available under your platform. Make sure. apxs:Error: the Apache module mod_so is compiled into. apxs:Error: your server binary '/usr/local/sbin/httpd'.. (it should return prefork) So I think there is some bug in checking the mountpoint options, where the check is made on parent of the nullfs instead of the nullfs target mountpoint. It is on 6.4-RELEASE i386 GENERIC. I did not test it on another release. This is list of related mount points: /dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates) /vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local) /usr/ports on /vol0/jail/rain_new/usr/ports (nullfs, local) devfs on /vol0/jail/rain_new/dev (devfs, local) If I changed /vol0 options to (ufs, local, soft-updates) the above error is gone and apxs / compilation works fine. Can somebody look at this problem? Can you please provide output from ktrace / truss for the issue? I did # ktrace /usr/local/sbin/apxs -q MPM_NAME The output is here http://freebsd.quip.cz/ld-elf/ktrace.out Let me know if you need something else. Thank you for your interest! The problem is still there in FreeBSD 8.1-RELEASE amd64 GENERIC (and in 7.x). Can somebody say if this is a bug or an expected feature? I think this is the expected behavior as nullfs is simply re-exposing /vol0 and it shouldn't be able to create a more privileged mount than the underlying mount I think (e.g. a read/write nullfs mount of a read-only filesystem would not make the underlying files read/write). It can be used to provide less privilege (e.g. a readonly nullfs mount of a read/write filesystem does not allow writes via the nullfs layer). That said, I'm not sure exactly where the permission check is failing. execve() only checks MNT_NOEXEC on the upper vnode's mountpoint (i.e. the nullfs mountpoint) and the VOP_ACCESS(.., V_EXEC) check does not look at MNT_NOEXEC either. I do think there might be bugs in that a nullfs mount that specifies noexec or nosuid might not enforce the noexec or nosuid bits if the underlying mount point does not have them set (from what I can see). Thank you for your explanation. Then it is strange, that there is bug, that allows execution on originally non executable mountpoint. It should be mentioned in the bugs section of the mount_nullfs man page. It would be useful, if 'mount' output shows inherited options for nullfs. If parent is: /dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates) Then nullfs line will be: /vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local, noexec, nosuid) instead of just /vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local) Then I can understand what is expected behavior, but our current state is half working, if I can execute scripts and binaries, run jail on it, but can't execute apxs -q MPM_NAME and few others. Hmm, so I was a bit mistaken. The kernel is not failing to exec the binary. Instead, rtld is reporting the error here: static Obj_Entry * do_load_object(int fd, const char *name, char *path, struct stat *sbp, int flags) { Obj_Entry *obj; struct statfs fs; /* * but first, make sure that environment variables haven't been * used to circumvent the noexec flag on a filesystem. */ if (dangerous_ld_env) { if (fstatfs(fd, fs) != 0) { _rtld_error(Cannot fstatfs \%s\, path); return NULL; } if (fs.f_flags MNT_NOEXEC) { _rtld_error(Cannot execute objects on %s\n, fs.f_mntonname); return NULL; } } I wonder if the fstatfs is falling down to the original mount rather than being caught by nullfs. Hmm, nullfs' statfs method returns the flags for the underlying mount, not the flags for the nullfs mount. This is possibly broken, but it is the behavior nullfs has always had and the behavior it still has on other BSDs. -- John Baldwin ___ freebsd-stable@freebsd.org
Re: MCA messages after upgrade to 8.2-BEAT1
On Friday, December 24, 2010 3:47:16 am Matthew D. Fuller wrote: On Wed, Dec 22, 2010 at 09:57:26AM -0500 I heard the voice of John Baldwin, and lo! it spake thus: You are getting corrected ECC errors in your RAM. Actually, don't CPU 0 0 data cache ADDR 236493c0 Data cache ECC error (syndrome 1c) CPU 0 1 instruction cache ADDR 2a1c9440 Instruction cache ECC error CPU 0 2 bus unit L2 cache ECC error CPU 1 0 data cache ADDR 23649640 Data cache ECC error (syndrome 1c) CPU 1 1 instruction cache ADDR 2a1c9440 Instruction cache ECC error CPU 1 2 bus unit L2 cache ECC error suggest CPU cache, not RAM? (that's actually a question; I don't know, but that's what a naive reading suggests...) Hmm, I don't know for certain. My interpretation is that the CPU errors were just secondary errors from a memory error like this one that was in the middle of his reported errors. It was also only reported on CPU 0 and not CPU 1: STATUS d0004863 MCGSTATUS 0 MCGCAP 105 APICID 0 SOCKETID 0 CPUID Vendor AMD Family 15 Model 67 HARDWARE ERROR. This is NOT a software problem! Please contact your hardware vendor CPU 0 4 northbridge MISC e00d0fff ADDR 2cac9678 Northbridge RAM ECC error ECC syndrome = 1c bit33 = err cpu1 bit46 = corrected ecc error bit59 = misc error valid bit62 = error overflow (multiple errors) bus error 'local node origin, request didn't time out generic read mem transaction memory access, level generic' On Intel systems (which I am much more familiar with as far as machine checks go), corrected ECC errors did not result in additional events in the CPU caches themselves, but I don't know if AMD is different in this regard. It could be that both CPUs and a DIMM are failing, but replacing a DIMM is cheaper and simpler and you can always replace the CPUs later if CPU errors continue. Of course, I can't tell you which DIMM to replace from these messages, but in this case since they are so easily reproducible, you could probably swap them out one at a time to test. -- John Baldwin ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: Kernel/World Upgrade causes Hang
The generic kernel worked. What's the easiest way to try and figure out which line is causing the hang in my custom kernel? When it hangs it gives me nothing other than what I put in the initial email. I've been using this custom kernel config for years on this server. On 12/28/2010 4:13 AM, Damien Fleuriot wrote: Well, I would suggest you try this: cd /usr/src make buildkernel KERNCONF=GENERIC make installkernel KERNCONF=GENERIC cd /boot mv kernel test mv kernel.old kernel nextboot -k test Then, you can reboot. This will ensure you can boot a stock kernel just fine. If you can, obviously there is something wrong with your custom kernel and you should start from a fresh GENERIC kernel and remove devices and drivers little by little. On 12/28/10 2:05 AM, Troy wrote: Sorry. I am on the RELENG_8 tree and I believe it was building 8.2pre. I did the build about 4 days ago. I am building a custom kernel. Yes I definitely built the world before the kernel and it worked. I did not use -J anything. There is no boot message, it just hangs with what I wrote below. Below is the kernel config I'm using. machine amd64 cpu HAMMER ident servername-removed # To statically compile in device wiring instead of /boot/device.hints #hints GENERIC.hints # Default places to look for devices. makeoptions DEBUG=-g# Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET# InterNETworking options SCTP# Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL# Enable gjournal-based UFS journaling options MD_ROOT # MD is a potential root device options NFSCLIENT # Network Filesystem Client options NFSSERVER # Network Filesystem Server options NFSLOCKD# Network Lock Manager options NFS_ROOT# NFS usable as /, requires NFSCLIENT options NTFS# NT File System options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS# Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY# BSD 4.3 TTY compat (sgtty) options COMPAT_IA32 # Compatible with i386 binaries options COMPAT_43 # Needed by COMPAT_LINUX32 options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 options COMPAT_FREEBSD7 # Compatible with FreeBSD7 options COMPAT_LINUX32 # Compatible with i386 linux binaries options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options P1003_1B_SEMAPHORES # POSIX-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128# Prevent printf output being interspersed. options KBD_INSTALL_CDEV# install a CDEV entry in /dev options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework options FLOWTABLE # per-cpu routing cache options INCLUDE_CONFIG_FILE # Include this file in kernel options IPSTEALTH options INVARIANTS options INVARIANT_SUPPORT # Make an SMP-capable kernel by default optionsSMP # Symmetric MultiProcessor Kernel # CPU frequency control device cpufreq # For SMBFS - mount_smbfs to work by users options SMBFS # SMB/CIFS filesystem options NETSMB # SMB/CIFS requester options LIBMCHAIN # MBUF management library options LIBICONV# Kernel
Re: New ZFSv28 patchset for 8-STABLE: ARRRGG HELP !!
On 28 December 2010 08:56, Freddie Cash fjwc...@gmail.com wrote: Is that a typo, or the actual command you used? You have an extra s in there. Should be log and not logs. However, I don't think that command is correct either. I believe you want to use the detach command, not remove. # zpool detach pool label/zil well, I tried the detach command: server4# zpool detach pool ada1s1 cannot detach ada1s1: only applicable to mirror and replacing vdevs server4# zpool remove pool ada1s1 server4# so you need to use remove, and adding log (or cache) makes no difference whatsoever.. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: New ZFSv28 patchset for 8-STABLE: Kernel Panic
On 29 December 2010 03:15, Jean-Yves Avenard jyaven...@gmail.com wrote: # zpool import load: 0.00 cmd: zpool 405 [spa_namespace_lock] 15.11r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 15.94r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 16.57r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 16.95r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 32.19r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 32.72r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 40.13r 0.00u 0.03s 0% 2556k ah ah ! it's not the separate log that make zpool crash, it's the cache ! Having the cache in prevent from importing the pool again rebooting: same deal... can't access the pool any longer ! Hopefully this is enough hint for someone to track done the bug ... More details as I was crazy enough to try various things. The problem of zpool being stuck in spa_namespace_lock, only occurs if you are using both the cache and the log at the same time. Use one or the other : then there's no issue But the instant you add both log and cache to the pool, it becomes unusable. Now, I haven't tried using cache and log from a different disk. The motherboard on the server has 8 SATA ports, and I have no free port to add another disk. So my only option to have both a log and cache device in my zfs pool, is to use two slices on the same disk. Hope this helps.. Jean-Yves ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: Kernel/World Upgrade causes Hang
On 12/28/10 5:48 PM, Troy wrote: The generic kernel worked. What's the easiest way to try and figure out which line is causing the hang in my custom kernel? When it hangs it gives me nothing other than what I put in the initial email. I've been using this custom kernel config for years on this server. First, remove the device drivers which you aren't using (ISA NICs, NICs you don't use, SCSI if you use SATA, firewire...) Get this purified kernel working, then start adding your custom options little by little. I'm afraid there's no magic way of doing it that I know of :) By the way I am unsure what your whole bit about smbfs is about. Want users to be able to call mount_smbfs ? I would sooner give them sudo privileges for this very specific command, than bother hacking and patching the kernel in uncertain ways. I would also remove unnecessary SCSI support as well as mass storage USB, USB printer, USB NICs... Just get shot of everything you don't use to be honest ;) On 12/28/2010 4:13 AM, Damien Fleuriot wrote: Well, I would suggest you try this: cd /usr/src make buildkernel KERNCONF=GENERIC make installkernel KERNCONF=GENERIC cd /boot mv kernel test mv kernel.old kernel nextboot -k test Then, you can reboot. This will ensure you can boot a stock kernel just fine. If you can, obviously there is something wrong with your custom kernel and you should start from a fresh GENERIC kernel and remove devices and drivers little by little. On 12/28/10 2:05 AM, Troy wrote: Sorry. I am on the RELENG_8 tree and I believe it was building 8.2pre. I did the build about 4 days ago. I am building a custom kernel. Yes I definitely built the world before the kernel and it worked. I did not use -J anything. There is no boot message, it just hangs with what I wrote below. Below is the kernel config I'm using. machine amd64 cpu HAMMER ident servername-removed # To statically compile in device wiring instead of /boot/device.hints #hints GENERIC.hints # Default places to look for devices. makeoptions DEBUG=-g# Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET# InterNETworking options SCTP# Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL# Enable gjournal-based UFS journaling options MD_ROOT # MD is a potential root device options NFSCLIENT # Network Filesystem Client options NFSSERVER # Network Filesystem Server options NFSLOCKD# Network Lock Manager options NFS_ROOT# NFS usable as /, requires NFSCLIENT options NTFS# NT File System options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS# Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY# BSD 4.3 TTY compat (sgtty) options COMPAT_IA32 # Compatible with i386 binaries options COMPAT_43 # Needed by COMPAT_LINUX32 options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 options COMPAT_FREEBSD7 # Compatible with FreeBSD7 options COMPAT_LINUX32 # Compatible with i386 linux binaries options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options P1003_1B_SEMAPHORES # POSIX-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128# Prevent printf output being interspersed. options KBD_INSTALL_CDEV# install a CDEV entry in /dev options HWPMC_HOOKS #
Re: Accidentally aborted upgrade via freebsd-update - how to recover?
On Mon, Dec 27, 2010 at 10:20:28PM -0800, Jason Helfman wrote: On Mon, Dec 27, 2010 at 04:52:03PM -0800, Doug Barton thus spake: On 12/27/2010 16:40, Damien Fleuriot wrote: On 12/27/10 11:58 PM, Clifton Royston wrote: OK, and oh well... I wish there were some way to automate the diffing out of the $FreeBSD lines. I suppose those might be the artifact of some previous upgrade, so that the file version present is not the one expected for FreeBSD 6.1. Wait, do you mean like, mergemaster -F ? Excerpt from the manual: -F If the files differ only by VCS Id ($FreeBSD) install the new file. I've discovered this rather recently, it's a *lifesaver* This comes from fbsd7's version though, I can not say for the one you're still running on fbsd6 You always want to run mergemaster from the version you are upgrading _to_. It doesn't happen often (by design) but occasionally mergemaster has to grow special knowledge of specific files/directories/etc. in a new FreeBSD version. As far as I can tell, freebsd-update doesn't use mergemaster. /usr/src/usr.sbin/freebsd-update/freebsd-update.sh Source installation does, however I don't believe a binary upgrade does. It might be an interesting project to work on enhancing freebsd-update to use mergemaster - shared code, DRY, and all that. ... A brief update for the curious: this turned into the sharks circling kind of upgrade http://xkcd.com/349/ though not through any fault of freebsd-update. It turned out after I had done the initial install steps at the console that 7.1 doesn't detect the built-in re0 GbE interface on this motherboard, which threw a major monkeywrench in the way of rebuilding all the ports. I should have recalled that there were some ongoing re problems which Pyun was fixing around the time of 7.1. As I didn't want to downgrade - and couldn't safely after having installed userland prematurely - I had a backup plan of booting from the CD drive, which then turned out to have failed mechanically. Fortunately this is my home server and isn't running anything critical. I stole a CD drive from my usual desktop computer and could boot the loader/kernel on a 7.3 CD, which detects everything. Following that, rebooting via the hard drive got the interface running again. (Why, I don't know - I suspect it might be somehow picking up either the 7.3 loader or hints due to having the CD set as the BIOS boot drive.) I got the old ports removed and essential ports rebuilt with portsnap and portmaster (thank you, Doug Barton) and I'm pressing ahead with an upgrade to 7.3 since it appears that kernel will work fine with this motherboard. -- Clifton -- Clifton Royston -- clift...@iandicomputing.com / clift...@lava.net President - I and I Computing * http://www.iandicomputing.com/ Custom programming, network design, systems and network consulting services ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: root mount error
I'm no looking for help neither instructions how to build kernel. I'm just installing 8.1 RELEASE and svn it up to last week 8-stable. And going step-by-step of handbook installing kernel I'm having a trouble - it seems than new kenel doesn't recognize my HDD. I'm not doing something special, in that case I'm for shure mentioned it. I'm just building GENERIC kernel without any configuration of system after installation, to tweaks, no tunes, nothing. It's a new GENERIC kernel and it can't find my HDD but 8.1 i386/amd64 releases works well and as I remember something about month ago stable too. Now, a likely cause of your problem is the installation of a custom kernel with removed support for whatever your hard disk drive or raid controller is recognized as. When it works it's just and ad0 hdd, no raid or special driver I'm jsut trying to say than recent changes in kernel or kernel-modules broke up my HDD support and I'd like to notice developres to check where the problem is. And of couse I've tried to switch SATA native mode and it doesn't change anything. Loader on it's own stage easily detects HDD and root partition so I can just select old kernel and boot up, but I'm not shure how he gain access to HDD to mfke any conclusion, probably through BIOS interrupts but it's out of piont. And for my pity I don't know how to dump demsg without having any serial connection or usable disk drive, maybe to flash drive, but I don't know how. And anyway there's no real kernel painc, it just asks for root mountpoint. And for shure I've got an 2.5 Hitachi HTS542516K9A300 160Gb SATA HDD If you need any aditional info I'll give it all, just ask. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: Kernel/World Upgrade causes Hang
On Mon, Dec 27, 2010 at 17:05, Troy t...@twisted.net wrote: # Workarounds for some known-to-be-broken chipsets (nVidia nForce3-Pro150) device atpic # 8259A compatability What is this? Do you actually need it? nforce 3 is pretty old - maybe it got broken somewhere along the way? It is, IMHO, the strangest thing in your kernel vs. GENERIC, which you said works. -- Rob Farmer ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: root mount error
On Tue, Dec 28, 2010 at 11:08:44PM +0300, Michael BlackHeart wrote: I'm no looking for help neither instructions how to build kernel. I'm just installing 8.1 RELEASE and svn it up to last week 8-stable. And going step-by-step of handbook installing kernel I'm having a trouble - it seems than new kenel doesn't recognize my HDD. I'm not doing something special, in that case I'm for shure mentioned it. I'm just building GENERIC kernel without any configuration of system after installation, to tweaks, no tunes, nothing. It's a new GENERIC kernel and it can't find my HDD but 8.1 i386/amd64 releases works well and as I remember something about month ago stable too. Now, a likely cause of your problem is the installation of a custom kernel with removed support for whatever your hard disk drive or raid controller is recognized as. When it works it's just and ad0 hdd, no raid or special driver I'm jsut trying to say than recent changes in kernel or kernel-modules broke up my HDD support and I'd like to notice developres to check where the problem is. And of couse I've tried to switch SATA native mode and it doesn't change anything. Loader on it's own stage easily detects HDD and root partition so I can just select old kernel and boot up, but I'm not shure how he gain access to HDD to mfke any conclusion, probably through BIOS interrupts but it's out of piont. And for my pity I don't know how to dump demsg without having any serial connection or usable disk drive, maybe to flash drive, but I don't know how. And anyway there's no real kernel painc, it just asks for root mountpoint. And for shure I've got an 2.5 Hitachi HTS542516K9A300 160Gb SATA HDD If you need any aditional info I'll give it all, just ask. If you change to SATA native mode, then your HD may show up at a different device (mine moved to ad8). If you go to native mode and issue a '?' when it fails to find the kernel, does it show any HD devices? -- greg byshenk - gbysh...@byshenk.net - Leiden, NL ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: New ZFSv28 patchset for 8-STABLE: ARRRGG HELP !!
On Tue, Dec 28, 2010 at 8:58 AM, Jean-Yves Avenard jyaven...@gmail.com wrote: On 28 December 2010 08:56, Freddie Cash fjwc...@gmail.com wrote: Is that a typo, or the actual command you used? You have an extra s in there. Should be log and not logs. However, I don't think that command is correct either. I believe you want to use the detach command, not remove. # zpool detach pool label/zil well, I tried the detach command: server4# zpool detach pool ada1s1 cannot detach ada1s1: only applicable to mirror and replacing vdevs server4# zpool remove pool ada1s1 server4# so you need to use remove, and adding log (or cache) makes no difference whatsoever.. Interesting, thanks for the confirmation. I don't have any ZFS systems using log devices, so can only go by what's in the docs. May want to make a note that the man page (at least for ZFSv15 in FreeBSD 8.1) includes several sections that use zpool detach when talking about log devices. If that's still in the man page for ZFSv28, it'll need to be cleaned up. -- Freddie Cash fjwc...@gmail.com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: New ZFSv28 patchset for 8-STABLE: Kernel Panic
On Tue, Dec 28, 2010 at 9:39 AM, Jean-Yves Avenard Now, I haven't tried using cache and log from a different disk. The motherboard on the server has 8 SATA ports, and I have no free port to add another disk. So my only option to have both a log and cache device in my zfs pool, is to use two slices on the same disk. For testing, you can always just connect a USB stick, and use that for the cache. I've done this on large ZFS systems (24-drives) and on my home server (5-drives). Works nicely. That should narrow it down to either can't use cache/log on same device or can't use cache and log at the same time. -- Freddie Cash fjwc...@gmail.com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: Could MSGBUF_SIZE be made a loader tunable?
Andriy Gapon a...@freebsd.org wrote: on 06/12/2010 07:20 per...@pluto.rain.com said the following: Would there be some fundamental problem in changing MSGBUF_SIZE from a compiled-in constant to a tunable that could be set at the loader prompt? I didn't see any obvious downside from examining the 8.1-RELEASE code ... I also don't immediately see why that wouldn't work. Can you try to come up with a patch? I got it working. The first attachment contains the changes to generic and i386-specific files, tested against 8.1-RELEASE. The second attachment contains (untested) corresponding changes to files for other arches. --- boot/common/loader.8-81RSun Jun 13 19:09:06 2010 +++ boot/common/loader.8Mon Dec 13 21:34:49 2010 @@ -615,6 +615,14 @@ the NBUF parameter will override this limit. Modifies .Dv VM_BCACHE_SIZE_MAX . +.It Va kern.msgbufsize +Sets the size of the kernel message buffer. +The default of 64KB is usually sufficient unless +large amounts of trace data need to be collected +between opportunities to examine the buffer or +dump it to a file. +Modifies kernel option +.Dv MSGBUF_SIZE .It Va machdep.disable_mtrrs Disable the use of i686 MTRRs (x86 only). .It Va net.inet.tcp.tcbhashsize --- boot/forth/loader.conf-81R Sun Jun 13 19:09:06 2010 +++ boot/forth/loader.conf Mon Dec 13 21:50:16 2010 @@ -99,6 +99,7 @@ #kern.maxswzone= # Set the max swmeta KVA storage #kern.maxtsiz= # Set the max text size #kern.maxusers=32# Set size of various static tables +#kern.msgbufsize=# Set size of kernel message buffer #kern.nbuf= # Set the number of buffer headers #kern.ncallout= # Set the maximum # of timer events #kern.ngroups=1023 # Set the maximum # of supplemental groups --- kern/subr_param.c-81R Sun Jun 13 19:09:06 2010 +++ kern/subr_param.c Mon Dec 27 00:21:26 2010 @@ -38,6 +38,7 @@ __FBSDID($FreeBSD: src/sys/kern/subr_param.c,v 1.90.2.4.2.1 2010/06/14 02:09:06 kensmith Exp $); #include opt_param.h +#include opt_msgbuf.h #include opt_maxusers.h #include sys/limits.h @@ -45,6 +46,7 @@ #include sys/systm.h #include sys/kernel.h #include sys/sysctl.h +#include sys/msgbuf.h #include vm/vm_param.h @@ -89,6 +91,7 @@ intnswbuf; long maxswzone; /* max swmeta KVA storage */ long maxbcache; /* max buffer cache KVA storage */ +long msgbufsize; /* size of kernel message buffer */ long maxpipekva; /* Limit on pipe KVA */ intvm_guest; /* Running as virtual machine guest? */ u_long maxtsiz;/* max text size */ @@ -110,6 +113,8 @@ Maximum memory for swap metadata); SYSCTL_LONG(_kern, OID_AUTO, maxbcache, CTLFLAG_RDTUN, maxbcache, 0, Maximum value of vfs.maxbufspace); +SYSCTL_LONG(_kern, OID_AUTO, msgbufsize, CTLFLAG_RDTUN, msgbufsize, 0, +Size of the kernel message buffer); SYSCTL_ULONG(_kern, OID_AUTO, maxtsiz, CTLFLAG_RDTUN, maxtsiz, 0, Maximum text size); SYSCTL_ULONG(_kern, OID_AUTO, dfldsiz, CTLFLAG_RDTUN, dfldsiz, 0, @@ -217,6 +222,10 @@ maxbcache = VM_BCACHE_SIZE_MAX; #endif TUNABLE_LONG_FETCH(kern.maxbcache, maxbcache); +#ifdef MSGBUF_SIZE + msgbufsize = MSGBUF_SIZE; +#endif + TUNABLE_LONG_FETCH(kern.msgbufsize, msgbufsize); maxtsiz = MAXTSIZ; TUNABLE_ULONG_FETCH(kern.maxtsiz, maxtsiz); --- i386/i386/machdep.c-81R Sun Jun 13 19:09:06 2010 +++ i386/i386/machdep.c Mon Dec 27 00:25:40 2010 @@ -50,7 +50,6 @@ #include opt_isa.h #include opt_kstack_pages.h #include opt_maxmem.h -#include opt_msgbuf.h #include opt_npx.h #include opt_perfmon.h #include opt_xbox.h @@ -2059,7 +2058,7 @@ physmem = Maxmem; basemem = 0; physmap[0] = init_first PAGE_SHIFT; - physmap[1] = ptoa(Maxmem) - round_page(MSGBUF_SIZE); + physmap[1] = ptoa(Maxmem) - round_page(msgbufsize); physmap_idx = 0; goto physmap_done; #endif @@ -2445,7 +2444,7 @@ * calculation, etc.). */ while (phys_avail[pa_indx - 1] + PAGE_SIZE + - round_page(MSGBUF_SIZE) = phys_avail[pa_indx]) { + round_page(msgbufsize) = phys_avail[pa_indx]) { physmem -= atop(phys_avail[pa_indx] - phys_avail[pa_indx - 1]); phys_avail[pa_indx--] = 0; phys_avail[pa_indx--] = 0; @@ -2454,10 +2453,10 @@ Maxmem = atop(phys_avail[pa_indx]); /* Trim off space for the message buffer. */ - phys_avail[pa_indx] -= round_page(MSGBUF_SIZE); + phys_avail[pa_indx] -= round_page(msgbufsize); /* Map the message buffer. */ - for (off = 0; off round_page(MSGBUF_SIZE); off += PAGE_SIZE) + for (off = 0; off round_page(msgbufsize); off += PAGE_SIZE) pmap_kenter((vm_offset_t)msgbufp + off, phys_avail[pa_indx] +
Re: New ZFSv28 patchset for 8-STABLE: Kernel Panic
Please don't consider these patches as production-ready. What we want to do is find and resolve as many bugs as possible. To help us fix these bugs, a way to reproduce the bug from a clean start (e.g. in virtualbox) would be great and speed up finding the cause for the problem. Your problem looks like some sort of deadlock. In your case, when you experiene the hang, try running procstat -k -k PID in another shell (console). That will give us valuable information. Cheers, mm Dňa 28.12.2010 18:39, Jean-Yves Avenard wrote / napísal(a): On 29 December 2010 03:15, Jean-Yves Avenard jyaven...@gmail.com wrote: # zpool import load: 0.00 cmd: zpool 405 [spa_namespace_lock] 15.11r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 15.94r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 16.57r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 16.95r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 32.19r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 32.72r 0.00u 0.03s 0% 2556k load: 0.00 cmd: zpool 405 [spa_namespace_lock] 40.13r 0.00u 0.03s 0% 2556k ah ah ! it's not the separate log that make zpool crash, it's the cache ! Having the cache in prevent from importing the pool again rebooting: same deal... can't access the pool any longer ! Hopefully this is enough hint for someone to track done the bug ... More details as I was crazy enough to try various things. The problem of zpool being stuck in spa_namespace_lock, only occurs if you are using both the cache and the log at the same time. Use one or the other : then there's no issue But the instant you add both log and cache to the pool, it becomes unusable. Now, I haven't tried using cache and log from a different disk. The motherboard on the server has 8 SATA ports, and I have no free port to add another disk. So my only option to have both a log and cache device in my zfs pool, is to use two slices on the same disk. Hope this helps.. Jean-Yves ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
slow ZFS on FreeBSD 8.1
Hello everyone, This is my first mail on the mailinglist and I very much appreciate this option of getting some help. I have a question regarding zfs on freebsd. (I'm making a home server) This afternoon I did a zpool create data mirror ad4 ad6 Now I'm copying things from my ufs2 disk into the 2TB zpool, it is very slow. I'm on freebsd 8.1 amd64 on an atom n330 with 2 sata disks, gstat tells me I'm going at around 2 mbps at near 100 %busy while the ufs2 drives are near 0. Also, ufs2 to ufs2 was much faster (I estimate about 10 times faster). How do I tune? The wiki is not helpful for amd64 users stating that the defaults should be optimal. I'm using the 8.1-stable version which has just been installed this afternoon from a minimal install iso. I'm copying from a single ufs2 pata drive into a sata zpool mirror. I have 2GB of ram. Top tells me: 761 MB Active, 790 Inactive and there is hardly any cpu usage (96-98% idle). vfs.numvnodes: around 12500 now (after several hours of copying) and stil slowly rising. Hope you can help me. Freek (from the Netherlands) ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: root mount error
Date: Tue, 28 Dec 2010 22:09:15 +0100 From: Greg Byshenk free...@byshenk.net Sender: owner-freebsd-sta...@freebsd.org On Tue, Dec 28, 2010 at 11:08:44PM +0300, Michael BlackHeart wrote: I'm no looking for help neither instructions how to build kernel. I'm just installing 8.1 RELEASE and svn it up to last week 8-stable. And going step-by-step of handbook installing kernel I'm having a trouble - it seems than new kenel doesn't recognize my HDD. I'm not doing something special, in that case I'm for shure mentioned it. I'm just building GENERIC kernel without any configuration of system after installation, to tweaks, no tunes, nothing. It's a new GENERIC kernel and it can't find my HDD but 8.1 i386/amd64 releases works well and as I remember something about month ago stable too. Now, a likely cause of your problem is the installation of a custom kernel with removed support for whatever your hard disk drive or raid controller is recognized as. When it works it's just and ad0 hdd, no raid or special driver I'm jsut trying to say than recent changes in kernel or kernel-modules broke up my HDD support and I'd like to notice developres to check where the problem is. And of couse I've tried to switch SATA native mode and it doesn't change anything. Loader on it's own stage easily detects HDD and root partition so I can just select old kernel and boot up, but I'm not shure how he gain access to HDD to mfke any conclusion, probably through BIOS interrupts but it's out of piont. And for my pity I don't know how to dump demsg without having any serial connection or usable disk drive, maybe to flash drive, but I don't know how. And anyway there's no real kernel painc, it just asks for root mountpoint. And for shure I've got an 2.5 Hitachi HTS542516K9A300 160Gb SATA HDD If you need any aditional info I'll give it all, just ask. If you change to SATA native mode, then your HD may show up at a different device (mine moved to ad8). If you go to native mode and issue a '?' when it fails to find the kernel, does it show any HD devices? I would strongly urge that you start using labels instead of device names for your disks. Labels don't change unless you explicitly change them while drive names do. Labels may be used in the fstab. E.G.: # DeviceMountpoint FStype Options DumpPass# /dev/ufs/root / ufs rw 1 1 /dev/ufs/tmp/tmpufs rw 2 2 /dev/ufs/var/usrufs rw 2 2 /dev/ufs/var/varufs rw 2 2 See 19.6 Labeling Disk Devices in the handbook for more information. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: ober...@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: slow ZFS on FreeBSD 8.1
On Wed, Dec 29, 2010 at 12:56:57AM +0100, Freek van Hemert wrote: Hello everyone, This is my first mail on the mailinglist and I very much appreciate this option of getting some help. I have a question regarding zfs on freebsd. (I'm making a home server) This afternoon I did a zpool create data mirror ad4 ad6 Now I'm copying things from my ufs2 disk into the 2TB zpool, it is very slow. I'm on freebsd 8.1 amd64 on an atom n330 with 2 sata disks, gstat tells me I'm going at around 2 mbps at near 100 %busy while the ufs2 drives are near 0. Also, ufs2 to ufs2 was much faster (I estimate about 10 times faster). How do I tune? The wiki is not helpful for amd64 users stating that the defaults should be optimal. I'm using the 8.1-stable version which has just been installed this afternoon from a minimal install iso. I'm copying from a single ufs2 pata drive into a sata zpool mirror. I have 2GB of ram. Top tells me: 761 MB Active, 790 Inactive and there is hardly any cpu usage (96-98% idle). vfs.numvnodes: around 12500 now (after several hours of copying) and stil slowly rising. For your system. /boot/loader.conf: # Increase vm.kmem_size to allow for ZFS ARC to utilise more memory. vm.kmem_size=2048M vfs.zfs.arc_max=1024M # Disable ZFS prefetching # http://southbrain.com/south/2008/04/the-nightmare-comes-slowly-zfs.html # Increases overall speed of ZFS, but when disk flushing/writes occur, # system is less responsive (due to extreme disk I/O). # NOTE: Systems with 8GB of RAM or more have prefetch enabled by # default. vfs.zfs.prefetch_disable=1 # Decrease ZFS txg timeout value from 30 (default) to 5 seconds. This # should increase throughput and decrease the bursty stalls that # happen during immense I/O with ZFS. # http://lists.freebsd.org/pipermail/freebsd-fs/2009-December/007343.html # http://lists.freebsd.org/pipermail/freebsd-fs/2009-December/007355.html vfs.zfs.txg.timeout=5 /etc/sysctl.conf: # Increase number of vnodes; we've seen vfs.numvnodes reach 115,000 # at times. Default max is a little over 200,000. Playing it safe... kern.maxvnodes=25 # Set TXG write limit to a lower threshold. This helps level out # the throughput rate (see zpool iostat). A value of 256MB works well # for systems with 4GB of RAM, while 1GB works well for us w/ 8GB. # We're using 1GB here because of the ada3 disk which can really handle # a massive amount of write speed. vfs.zfs.txg.write_limit_override=1073741824 Note that the last entry in sysctl.conf may need to be adjusted, or commented out entirely. It's up to you. You can mess with this in real-time using sysctl. Google for vfs.zfs.txg.write_limit_override to get an idea of how to adjust it, if you want to. -- | Jeremy Chadwick j...@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB | ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: slow ZFS on FreeBSD 8.1
On Tue, Dec 28, 2010 at 5:56 PM, Freek van Hemert fvhem...@gmail.comwrote: Top tells me: 761 MB Active, 790 Inactive and there is hardly any cpu usage (96-98% idle). vfs.numvnodes: around 12500 now (after several hours of copying) and stil slowly rising. Hope you can help me. I believe there were some zfs bugs/performance issues in 8.1 that were made more visible by having other file system types mounted simultaneously. Stuff like this: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/146410 This has been MFC'd so not sure why it's still open. -- Adam Vande More ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: New ZFSv28 patchset for 8-STABLE: Kernel Panic
Hi On Wednesday, 29 December 2010, Martin Matuska m...@freebsd.org wrote: Please don't consider these patches as production-ready. What we want to do is find and resolve as many bugs as possible. To help us fix these bugs, a way to reproduce the bug from a clean start (e.g. in virtualbox) would be great and speed up finding the cause for the problem. Your problem looks like some sort of deadlock. In your case, when you experiene the hang, try running procstat -k -k PID in another shell (console). That will give us valuable information. I am away until next week now (hopefully no problem will occur until then) I will try reproduce the issue then. I have to say that v28 massively increased write performance over samba, over 3 times than when v14 or v15. How do you disable ZIL with v28? I wanted to test performance in the case I'm trying to qtroubleshoot. Writing our file over samba, V14-v15: 55s V14-v15 zip disabled: 6s V28: 16s.. (with or without separate log drive: SSD Intel X25-m 40GB). Playing with the only zil parameter showing in sysctl, made no difference whatsoever. UFS boot drive: 14s sequential read shows over 280MB/s from that raidz array, similar with writes I started a thread in the freebsd forum: http://forums.freebsd.org/showthread.php?t=20476 And finally, which patch should I try on your site? Thanks ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
8.2-RC1: installer does not recognize some disks properly
I just tried to install 8.2-RC1 (amd64) on one of my machines. It has two disks: WDC WD1001FALS-4 and SAMSUNG HD103SJ, both 1TB SATA disks. The installer shows them as ad10 and ad8. Both disks are already in use and have been formatted via fdisk, e.g., the Samsung (ad10) has 3 partitions (BF, A9, A8)) and the WDC has 4 (A6, BF, A5, A9). However, the installer only shows the existing partitions for the Samsung, but not for the WDC. The WDC is the boot disk and has a Grub loader installed. What could be the reason that the existing partitioning is not recognized by the installer? Here is some data from the system after I installed it on the second disk: fdisk ad8 *** Working on device /dev/ad8 *** parameters extracted from in-core disklabel are: cylinders=1938021 heads=16 sectors/track=63 (1008 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=1938021 heads=16 sectors/track=63 (1008 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 166 (0xa6),(OpenBSD) start 64, size 530161001 (258867 Meg), flag 0 beg: cyl 0/ head 1/ sector 2; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: sysid 191 (0xbf),(Solaris x86 (new)) start 530161065, size 626535000 (305925 Meg), flag 80 (active) beg: cyl 1023/ head 0/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 3 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 1156696065, size 44982 (219638 Meg), flag 0 beg: cyl 1023/ head 255/ sector 63; end: cyl 1023/ head 255/ sector 63 The data for partition 4 is: sysid 169 (0xa9),(NetBSD) start 1606516065, size 347004000 (169435 Meg), flag 0 beg: cyl 1023/ head 0/ sector 1; end: cyl 1023/ head 254/ sector 63 This shows that FreeBSD recognizes the partitions properly. I ran sysinstall from the command lines (under script) and got this (after removing all the screen layout sequences): -- Disk name: ad8 FDISK Partition Editor DISK Geometry: 1938021 cyls/16 heads/63 sectors = 1953525168 sectors (953869MB) Offset Size(ST)End Name PType Desc SubtypeFlags 0 1953525168 1953525167- 12 unused0 The following commands are supported (in upper or lower case): -- As you see, sysinstall shows something else than fdisk. The outpuf of dmesg is below. 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 8.2-RC1 #0: Wed Dec 22 17:34:20 UTC 2010 r...@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 Timecounter i8254 frequency 1193182 Hz quality 0 CPU: AMD Phenom(tm) II X6 1055T Processor (2812.48-MHz K8-class CPU) Origin = AuthenticAMD Id = 0x100fa0 Family = 10 Model = a Stepping = 0 Features=0x178bfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT Features2=0x802009SSE3,MON,CX16,POPCNT AMD Features=0xee500800SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow! AMD Features2=0x37ffLAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,SKINIT,WDT TSC: P-state invariant real memory = 8589934592 (8192 MB) avail memory = 8243384320 (7861 MB) ACPI APIC Table: 032510 APIC1318 FreeBSD/SMP: Multiprocessor System Detected: 6 CPUs FreeBSD/SMP: 1 package(s) x 6 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 cpu4 (AP): APIC ID: 4 cpu5 (AP): APIC ID: 5 ioapic0 Version 2.1 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: 032510 XSDT1318 on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: reservation of fee0, 1000 (3) failed acpi0: reservation of ffb8, 8 (3) failed acpi0: reservation of fec1, 20 (3) failed acpi0: reservation of fed4, 5000 (3) failed acpi0: reservation of fed8, 1000 (3) failed acpi0: reservation of 0, a (3) failed acpi0: reservation of 10, cfe0 (3) failed Timecounter ACPI-fast frequency 3579545 Hz quality 1000 acpi_timer0: 32-bit timer at 3.579545MHz port 0x808-0x80b on acpi0 cpu0: ACPI CPU on acpi0 cpu1: ACPI CPU on acpi0 cpu2: ACPI CPU on acpi0 cpu3: ACPI CPU on acpi0 cpu4: ACPI CPU on acpi0 cpu5: ACPI CPU on acpi0 acpi_ec0: Embedded Controller: GPE 0xa port 0x62,0x66 on acpi0 acpi_hpet0: High Precision Event Timer iomem 0xfed0-0xfed003ff on acpi0 Timecounter HPET frequency 14318180 Hz quality 900 pcib0: ACPI Host-PCI bridge port 0xcf8-0xcff on acpi0 pci0: ACPI PCI bus on pcib0 pcib1: ACPI PCI-PCI bridge irq 18 at
Re: /libexec/ld-elf.so.1: Cannot execute objects on /
On Tue, Dec 28, 2010 at 8:23 AM, John Baldwin j...@freebsd.org wrote: On Saturday, December 25, 2010 6:43:25 am Miroslav Lachman wrote: John Baldwin wrote: On Saturday, December 11, 2010 11:51:41 am Miroslav Lachman wrote: Miroslav Lachman wrote: Garrett Cooper wrote: 2010/4/20 Miroslav Lachman000.f...@quip.cz: I have large storage partition (/vol0) mounted as noexec and nosuid. Then one directory from this partition is mounted by nullfs as exec and suid so anything on it can be executed. The directory contains full installation of jail. Jail is running fine, but some ports (PHP for example) cannot be compiled inside the jail with message: /libexec/ld-elf.so.1: Cannot execute objects on / The same apply to executing of apxs r...@rainnew ~/# /usr/local/sbin/apxs -q MPM_NAME /libexec/ld-elf.so.1: Cannot execute objects on / apxs:Error: Sorry, no shared object support for Apache. apxs:Error: available under your platform. Make sure. apxs:Error: the Apache module mod_so is compiled into. apxs:Error: your server binary '/usr/local/sbin/httpd'.. (it should return prefork) So I think there is some bug in checking the mountpoint options, where the check is made on parent of the nullfs instead of the nullfs target mountpoint. It is on 6.4-RELEASE i386 GENERIC. I did not test it on another release. This is list of related mount points: /dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates) /vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local) /usr/ports on /vol0/jail/rain_new/usr/ports (nullfs, local) devfs on /vol0/jail/rain_new/dev (devfs, local) If I changed /vol0 options to (ufs, local, soft-updates) the above error is gone and apxs / compilation works fine. Can somebody look at this problem? Can you please provide output from ktrace / truss for the issue? I did # ktrace /usr/local/sbin/apxs -q MPM_NAME The output is here http://freebsd.quip.cz/ld-elf/ktrace.out Let me know if you need something else. Thank you for your interest! The problem is still there in FreeBSD 8.1-RELEASE amd64 GENERIC (and in 7.x). Can somebody say if this is a bug or an expected feature? I think this is the expected behavior as nullfs is simply re-exposing /vol0 and it shouldn't be able to create a more privileged mount than the underlying mount I think (e.g. a read/write nullfs mount of a read-only filesystem would not make the underlying files read/write). It can be used to provide less privilege (e.g. a readonly nullfs mount of a read/write filesystem does not allow writes via the nullfs layer). That said, I'm not sure exactly where the permission check is failing. execve() only checks MNT_NOEXEC on the upper vnode's mountpoint (i.e. the nullfs mountpoint) and the VOP_ACCESS(.., V_EXEC) check does not look at MNT_NOEXEC either. I do think there might be bugs in that a nullfs mount that specifies noexec or nosuid might not enforce the noexec or nosuid bits if the underlying mount point does not have them set (from what I can see). Thank you for your explanation. Then it is strange, that there is bug, that allows execution on originally non executable mountpoint. It should be mentioned in the bugs section of the mount_nullfs man page. It would be useful, if 'mount' output shows inherited options for nullfs. If parent is: /dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates) Then nullfs line will be: /vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local, noexec, nosuid) instead of just /vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local) Then I can understand what is expected behavior, but our current state is half working, if I can execute scripts and binaries, run jail on it, but can't execute apxs -q MPM_NAME and few others. Hmm, so I was a bit mistaken. The kernel is not failing to exec the binary. Instead, rtld is reporting the error here: static Obj_Entry * do_load_object(int fd, const char *name, char *path, struct stat *sbp, int flags) { Obj_Entry *obj; struct statfs fs; /* * but first, make sure that environment variables haven't been * used to circumvent the noexec flag on a filesystem. */ if (dangerous_ld_env) { if (fstatfs(fd, fs) != 0) { _rtld_error(Cannot fstatfs \%s\, path); return NULL; } if (fs.f_flags MNT_NOEXEC) { _rtld_error(Cannot execute objects on %s\n, fs.f_mntonname); return NULL; } } I wonder if the fstatfs is falling down to the original mount rather than being caught by nullfs. Hmm, nullfs' statfs method returns the flags for the underlying mount, not the flags for the nullfs mount. This is possibly broken, but it is the behavior nullfs has always had and the behavior it still has on other BSDs. Not sure if it's
Re: New ZFSv28 patchset for 8-STABLE: Kernel Panic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/28/2010 18:20, Martin Matuska wrote: Please don't consider these patches as production-ready. What we want to do is find and resolve as many bugs as possible. I completely agree with Martin here. If your running it then your willing to loose what you have if you have not taken precaution to save your data somewhere else. Even though with that said ZFS does a pretty fine job of ensuring that nothing happens to it, it is still best practice to have a copy somewhere other than IN THAT BOX ;) Another note too, I think I read that you mentioned using the L2ARC and slog device on the same disk You simply shouldn't do this it could be contributing to the real cause and there is absolutely no gain in either sanity or performance and you will end up bottle-necking your system. To help us fix these bugs, a way to reproduce the bug from a clean start (e.g. in virtualbox) would be great and speed up finding the cause for the problem. Your problem looks like some sort of deadlock. In your case, when you experiene the hang, try running procstat -k -k PID in another shell (console). That will give us valuable information. Martin, I agree with the above that it may be some sort of live or dead lock problem in this case. It would be awesome to know if some of the following sysctl(8)'s values are and how this reacts when set to the opposite of their current values. vfs.zfs.l2arc_noprefetch: vfs.zfs.dedup.prefetch: vfs.zfs.prefetch_disable The reason why I say this is on one of my personal systems that I toy with the box cannot make it very long with prefetch enabled on either v15 or v28 after some 'unknown' commit to world on stable/8. Now this may actually be just a contributing factor that makes it happen sooner than it normally would but probably also directly relates to the exact problem. I would love to see this go away as I had been using the L2ARC with prefetch enabled for a long time and now all of a sudden just plainly does not work correctly. I also have about 19 core.txt.NN files from when this started happening with various stack traces. If you would like these just let me know and Ill privately mail them to you. Regards, - -- jhell,v - JJH48-ARIN -BEGIN PGP SIGNATURE- iQEbBAEBAgAGBQJNGsDLAAoJEJBXh4mJ2FR+TqkH8wVFQKiU/C6L+F4Y3/ClScQD b4s0IkC1B+bHl9eD6Hhxif/1iKj1w9clYvuLt8ageDF98KTB9GCRjuh48VswdtPQ FQtDRTj1pGzWPxmOn2Nrf7qrFnymqZk+qoTBX8A1nDvrSe41Mqp82ue9E7nZ1ipg Dz9k5F8J+WxUAZYLHxtxLvYEa19/hvG1K5LOpRKIU0iycsqaywezFflTGDcR5lT8 A50ic9sZ21jr87CK45TLv1Wmu+kDgpy2j1x77bYTDGoAzQMlPcOENO8st8EobcWB eIwwXIjtRwOKF4rSxoqwwYxOM4ek+tK4p6ZnO1uLipNXMB+zJTjs//GV6Xp3TA== =Io4+ -END PGP SIGNATURE- ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org