From nobody Tue Mar 19 02:43:56 2024 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TzGJH2Xqjz5FY6y for ; Tue, 19 Mar 2024 02:43:59 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TzGJH1y42z53vD; Tue, 19 Mar 2024 02:43:59 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710816239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X/SPag5kIHFUkeEN/Ii6ENxMHDP0QgcZ1SVh+y9vKSE=; b=FoVzuU6Kw/aAWoRAvweXF97+PoVo4JaD0XdtG0J9+H1YKmVbJfLu3uLOPingL5f2wDjhID xpq3WZ0BevnJbD3EDlJAOfiPQy3OUVJq570MDFYbPUv7YB3wH3/e8X1FN+ms4U13qoGzpT K1O3OV71YZHhDTlQgDx8G9DNMXXeyy+L2sA5pw9cVcUPHdhiyIyCMqLE2xf7stvsY8Ootu PTJ+znBMUuUSMNV6Mg3wOvuYD7vDB6uEbPPHnWHp54rmv5c42zz/fDzTAHeFdOEsgpUKD2 3vk8ld3FEp+shXv/pU6syV4wf5sEh6ssGdpmXUl+udTZz8oqHYd0CxW5fNKSAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710816239; a=rsa-sha256; cv=none; b=Ea2bpd8XuQTjPwLIqsVjfxDACBtdsaCDCFZMk3Qd3HBasW9+wVhb+f2ZK+v07qWfsoq0i8 N2NtwD359PBV0ongEYRuK42bAhVSaIvuAtKe0oVhKQ+/fql7sHR532k8Ok+/bUNiOVhQ6s YcsjNrBI2oG6nF++ptuytA3oev+lAO7svw+aj23kKMgMYfzphhtsv9i/JfkTeTwriZEY7C Equxctx82CaSoS5lDt+FgPbPhKa0QZoUKXmCXRPbGPgmy7rN57wT8JGZj1TNjMD4S9eT83 bTq0mnTXxs/Txl81akg7R9RNQNUicpQ+Z5Fe8cd2jfFKs6kuMqttSJ7NCMEl4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710816239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X/SPag5kIHFUkeEN/Ii6ENxMHDP0QgcZ1SVh+y9vKSE=; b=LAQu+w6aS2zEkuofo9inRn/PJVF1U26VPJOt1mO4qNnjfXEaX+KOqADOl83XmaplGKrEHZ W7lITxmiskP8bbE9Sl++fi1Schs1jQkMUXXunfb4BlFcb9CwBb213V7KgQmPkMX3ELBJD8 MGV1GpTzkSDKGWl/kxQLc3CnPAj+leEvgq9RmFaWUOD5MRaE9Ovq2HgFC9MLNnEKYhvW6e VRrRx+iHcIRYQp3PP7kN/rYTF3H2zvXi819D6y06tpK+mMLnbwRRg2pfYVUIaYW1qP1k5T B4aKZI6PDDg19tCYSTDYP3B31si6wFRk8XRvLfMzNf1c46rGZuc1gAzv64ZNGg== Received: from ltc.des.dev (2a02-8428-0993-f001-922e-16ff-fef1-acef.rev.sfr.net [IPv6:2a02:8428:993:f001:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TzGJH0pmzzYNF; Tue, 19 Mar 2024 02:43:59 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 669FB78618; Tue, 19 Mar 2024 03:43:56 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jim Pazarena Cc: freebsd-questions@freebsd.org Subject: Re: reboot forcing a fsck In-Reply-To: (Jim Pazarena's message of "Mon, 18 Mar 2024 14:08:08 -0700") References: User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 19 Mar 2024 03:43:56 +0100 Message-ID: <86il1jgcur.fsf@ltc.des.dev> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jim Pazarena writes: > I have a server which seems to have a fs issue for my exim folder. > an "ls -l" hangs. anything going near the exim folder hangs - for > whatever reason. You say that `ls -l ` hangs. In addition to reading the directory itself, `ls -l` reads the metadata of every directory entry and sorts them by name. This can take a long time if there is a large number of entries. To avoid this, and make sure you're only running ls itself and not an alias or an alternate implementation, use `/bin/ls -a ` to get a plain listing. If that works and no entries appear to be corrupted, try `ktrace -f /tmp/ktrace.out /bin/ls -al `. If that hangs, running `kdump -f /tmp/ktrace.out -tcn | tail` in another terminal will tell you where it's stuck. > If I trigger a 'reboot', I assume the boot process will automatically > enter a fsck as per the documentation. > > What is unclear is if the system will eventually g et to multi-user > mode, or hang at a CLI question from the fsck? Assuming UFS with soft updates (`sysctl -n kern.features.softupdates` should print 1), you can run `fsck_ffs -B ` to perform limited checks on a mounted filesystem without rebooting. You can also add the following to /etc/rc.conf to force a more thorough fsck on reboot: background_fsck_enable=3D"no" fsck_flags=3D"-fy" Beware that this can take a long time. You will want to revert these changes (especially fsck_flags) once the situation is resolved. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org