*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Right sadly I'm totally new to this (Windows admin, tiny knowledge of Unix or Linux) but I'm ok with a command line
I'll explain the problem and then maybe get some suggestions (Hopefully)
I've got a mail server (It runs CGP) it's a great mail server, it's on FreeBSD version 5.5 and it's been rock solid worked a dream for three years. Anyway it was my partner in crime who set it up, but however he's not available.NOw we started getting a couple of problems a while back (Probably after a p[powe routage) and I've been advised to do a Forced FSCK, now my understanding of fsck is that it will check the file system, and to do a forced fsck I need to be in single user mode. However I can't see how I can do a forced fsck. Running man fsck gives me some info but nothing about forced.
I did see a -f switch which is Force checking of file systems, even when they are marked clean (for file systems that support this). Is this the same as forced?
Plus I think when you are in single user mode you have to mount your drive before you do anything is that right?
If so then is the order of events and commands.
Boot to single user mode, run mount then run a fsck -f -y
I've already run a fsck -y but that took only about 45 -55 seconds and given I've got about 15gb of data on the drive I'm surprised, would that be normal. Seems really quick to me, but there again my only reference here is file system checking in windows.
See the manpages for fsck(8). I believe you should be able to use just: # fsck -f
Run that from single-user mode. You do not want any filesystems mounted rw while doing so. (IIRC, that's a quick way to potentially destroy filesystems.)
Quote:
Originally Posted by Greenwich-kid
NOw we started getting a couple of problems a while back..
Describe the problems if your forced fsck does not solve them.
I don't think that forced is relevant to your problem.
You want to run fsck against an unmounted file system. You can do that from a liveCD. Running fsck from single user mode is also acceptable. If you are using single user mode then you don't need to mount anything.
fsck runs against a partition, not against a hard drive.
So boot a liveCD or single user mode and issue a command similar to:
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Quote:
Originally Posted by Greenwich-kid
Many thanks for your help guys,
As I under stand it I need to run
fsck -y /dev/idad0s1f
I ran df wheer I got idad0s1f from. All very helpful many thanks....
Errr, it should be fsck -fy /dev/<special device> (I can't remember how they're named on FreeBSD exactly, but what you have "looks" right).
What do you mean by "ran df where[sic] I got idad0sf1 from"??? That's incomprehensible. Do you mean you ran the df command? If so, you do realize all that does is report the free space, right? It's not a defragment command...
I ran the df command so I would know the device name [idad0s1f] I assume you call this a device or partition or something?
Hmmm as to the command I ran fsck -f -y /dev/idad0s1f
Could that explain why the test appeared to be very fast about 14Gb of data there and it took about 90 secs. The command ( as in when I typed it and pressed enter) didn't give me any errors and went through a distinct process (If you see what I mean) stage 1 through to 5. Not much reporting after though. 90 secs did appear to be very fast for that amount of data. Although I have nothing to base this on as this file system is very different from ntfs, which is more my area.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.