fsck and e2fsck
i have 2 partitions - ext3 fs
rc.S - "fsck" to check on mount "man mount" says to use "e2fsck"... how are they different.. is it safe to switch "fsck" in rc.S to "e2fsck"? |
tune2fs 1.35 (28-Feb-2004)
Filesystem volume name: <none> Last mounted on: <not available> Filesystem UUID: fc82c874-90fe-11da-98f8-fa00051c2071 Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal filetype needs_recovery sparse_super Default mount options: (none) Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 1612512 Block count: 3223954 Reserved block count: 161197 Free blocks: 2978623 Free inodes: 1610411 First block: 0 Block size: 4096 Fragment size: 4096 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 16288 Inode blocks per group: 509 Last mount time: Thu Aug 31 18:02:05 2006 Last write time: Thu Aug 31 18:02:05 2006 Mount count: 23 Maximum mount count: 39 Last checked: Wed Aug 23 16:44:42 2006 Check interval: 15552000 (6 months) Next check after: Mon Feb 19 15:44:42 2007 Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 128 Journal inode: 8 Journal backup: inode blocks are mount count and check interval connected? |
df -
Filesystem Type Size Used Avail Use% Mounted on /dev/hda1 ext3 5.8G 1.4G 4.1G 26% / /dev/hda6 ext3 13G 760M 11G 7% /home none tmpfs 189M 0 189M 0% /dev/shm # mount - /dev/hda1 on / type ext3 (rw,noatime) /dev/hda6 on /home type ext3 (rw,nosuid,nodev,noatime) none on /dev/pts type devpts (rw,gid=5,mode=666) none on /dev/shm type tmpfs (rw) usbfs on /proc/bus/usb type usbfs (rw) fdisk - hda1 -ext2 !? |
Quote:
fsck is just a frontend that calls a filesystem-specific version. So if you run fsck on an EXT2 filesystem, it will actually call fsck.ext2 (or e2fsck - same thing). Note that there is really no specific fsck for EXT3. It just uses the EXT2 version (because EXT3 is nothing more than EXT2 with an added journal - journals don't matter when fsck-ing). You can see the filesystem-specific versions of fsck like this: Code:
$ ls -l /sbin/*fsck* |
10x, great
i don't get it why fdisk shows hda1 -ext2?? i think i formatted it as ext2 before intall OS... |
Quote:
fdisk output does not distinguish between EXT2 and EXT3 anyway. fdisk shows a "partition id", which is "83" for both EXT2 and EXT3 filesystems (and maybe some others as well). An ID of "82" indicates a swap partition. NTFS is "7" and FAT is "B". Note: partition id number's do not have to accurately match what's really out there. You can scramble these up if you want to, although there's usually no good reason to do that, and many bad reasons. Here's a list of various partition id numbers: http://www.win.tue.nl/~aeb/partition...n_types-1.html See my example fdisk output below: Code:
$ sudo fdisk -l |
[HTML]
fdisk -l Disk /dev/hda: 20.0 GB, 20020396032 bytes 16 heads, 63 sectors/track, 38792 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 12190 6143728+ 83 Linux /dev/hda2 12191 38792 13407408 5 Extended /dev/hda5 12191 13205 511528+ 82 Linux swap /dev/hda6 13206 38792 12895816+ 83 Linux[/HTML] |
Your fdisk output shows hda1 as type "83". Which includes EXT2, EXT3, Reister, etc. Here's a quote from that link I provided above regarding partition id's:
Quote:
|
[HTML]cfdisk -
Disk Drive: /dev/hda Size: 20020396032 bytes, 20.0 GB Heads: 16 Sectors per Track: 63 Cylinders: 38792 Name Flags Part Type FS Type [Label] Size (MB) ---------------------------------------------------------------------------------------------------------------------------------- hda1 Boot Primary Linux ext2 6291.22 hda5 Logical Linux swap 523.84 hda6 Logical Linux ext3 13205.35 [Bootable] [ Delete ] [ Help ] [Maximize] [ Print ] [ Quit ] [ Type ] [ Units ] [ Write ] Toggle bootable flag of the current partition[/HTML] |
All times are GMT -5. The time now is 08:25 AM. |