 |
 |
fsck when logged in
|
 |
|
 |
|
Registered User
Join Date: Mar 2002
Location: Europe
Status:
Offline
|
|
is it possible to run fsck when you are logged in (in other words: not in single user mode) ?
|
|
|
| |
|
|
|
 |
|
 |
|
Moderator 
Join Date: May 2001
Location: Hilbert space
Status:
Offline
|
|
As long as it is not the root partition, it is possible. So you won't be able to check your MacOS X partition unless booting in single user mode or booting from a CD.
Background fsck that also works for mounted partitions is implemented in FreeBSD 5.0 (which is available in its final version now).
|
|
I don't suffer from insanity, I enjoy every minute of it.
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Mar 2002
Location: Europe
Status:
Offline
|
|
So I guess I'll have to wait for OSX 10.2.x or 10.3, when apple implements freeBSD5 ?
|
|
|
| |
|
|
|
 |
|
 |
|
Moderator 
Join Date: May 2001
Location: Hilbert space
Status:
Offline
|
|
Well, the FreeBSD team hasn't released a 5.x stable which means that it isn't thoroughly tested yet. I would imagine that Apple will implement and release it as soon as a stable release is posted.
This background fsck works with BSD's FFS (Fast File System), so I don't know whether or not this is possible with HFS+.
|
|
I don't suffer from insanity, I enjoy every minute of it.
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Mar 2001
Location: not far from my GSM phone
Status:
Offline
|
|
Originally posted by OreoCookie:
Well, the FreeBSD team hasn't released a 5.x stable which means that it isn't thoroughly tested yet. I would imagine that Apple will implement and release it as soon as a stable release is posted.
This background fsck works with BSD's FFS (Fast File System), so I don't know whether or not this is possible with HFS+.
So how do I fsck a volume such as /Volumes/MyHardDisk ?
Can I CRON it?
|
|
Lao_Tseu
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Status:
Offline
|
|
Originally posted by lapinos:
So how do I fsck a volume such as /Volumes/MyHardDisk ?
Can I CRON it?
You would use:
sudo fsck_hfs -f <device id>
where <device id> is the volume's device id as listed in df, e.g. /dev/disk0s9. So let's say you have a disk mounted at /Volumes/blah, whose device id is /dev/disk0s10. The proper command would be:
sudo fsck_hfs -f /dev/disk0s10
Note: this can also be used in single user mode to check disks other than the boot disk. It can also be used on journaled filesystems.
Note: this may also be used on a boot disk, but is not recommended, and if the filesystem is modified, you must reboot immediately.
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally posted by piracy:
You would use:
sudo fsck_hfs -f <device id>
where <device id> is the volume's device id as listed in df, e.g. /dev/disk0s9. So let's say you have a disk mounted at /Volumes/blah, whose device id is /dev/disk0s10. The proper command would be:
sudo fsck_hfs -f /dev/disk0s10
Note: this can also be used in single user mode to check disks other than the boot disk. It can also be used on journaled filesystems.
Note: this may also be used on a boot disk, but is not recommended, and if the filesystem is modified, you must reboot immediately.
This sounds very good. Thanks for the info!
It may be a stupid question, but is this what DiskUtility does when you tell it to repair a disk? Is it the same command or should I apply both (i.e. fsck and DiskUtility) to a disk when I need to repair it?
|
|
•
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2000
Location: Tempe, AZ
Status:
Offline
|
|
Originally posted by piracy:
You would use:
sudo fsck_hfs -f <device id>
where <device id> is the volume's device id as listed in df, e.g. /dev/disk0s9. So let's say you have a disk mounted at /Volumes/blah, whose device id is /dev/disk0s10. The proper command would be:
sudo fsck_hfs -f /dev/disk0s10
Note: this can also be used in single user mode to check disks other than the boot disk. It can also be used on journaled filesystems.
Note: this may also be used on a boot disk, but is not recommended, and if the filesystem is modified, you must reboot immediately.
I made three partitions of my built in drive. As far as the system goes, I understadn that it sees them as three separate disks. The first partition has OSX on it. The second has all my Applications, and the third one has my files. Can I run fsck on my second partition, even though some applications might be running in the background?
t
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Status:
Offline
|
|
Originally posted by Simon:
It may be a stupid question, but is this what DiskUtility does when you tell it to repair a disk? Is it the same command or should I apply both (i.e. fsck and DiskUtility) to a disk when I need to repair it?
Disk Utility invokes fsck, so no, you don't need to use both. And 'fsck', when invoked, uses the proper tool (i.e., 'fsck_hfs') to perform its repair. It's no coincidence that Disk Utility's log looks similar to fsck's output.
Originally posted by t_hah:
I made three partitions of my built in drive. As far as the system goes, I understadn that it sees them as three separate disks. The first partition has OSX on it. The second has all my Applications, and the third one has my files. Can I run fsck on my second partition, even though some applications might be running in the background?
Yes, the system sees them all as separate disks. You can indeed run it on volumes with open files (like open applications), but it's not recommended. If problems are found and filesystem changes are made, you will receive a message to the effect of:
FILE SYSTEM WAS MODIFIED.
YOU ***MUST*** REBOOT IMMEDIATELY.
The bottom line is that it's always safer to run fsck from single user, or while booted from other media (such as a CD). If you're really concerned about filesystem integrity, just enable journaling - even on client, this is the best insurance you can give yourself...and running fsck and disk utilities become a thing of the past.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2000
Location: Tempe, AZ
Status:
Offline
|
|
One more question. I ran fsck on my volumes, then I enabled Journaling. If I run fsck_hfs -f on the volume again, what will happen? WOuld that cause any problems? I tried it just to see, and it said that it was reparing something, but from some post in other threads it seemed like it was not supposed to repair anything if Journaling is enabled. Can someone enlighten me please.
Thank you,
t
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2000
Location: Tempe, AZ
Status:
Offline
|
|
Does nayone know why sometimes if you reply to a thread it will not get bumped, and the posters name will not change next to the main topic title? This happens here sometimes at Macnn...anyhow...I am still interested as my post is above, if there can be any problems running fsck_hfs on a Journaled volume. Thank you,
t
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|