Making and Managing File Systems

by Nirmala 2009-04-07 10:18:07

Programs used to manage filesystems
* badblocks(Cool
- Search a device for badblocks. The command "badblocks /dev/hda" will search the first partition of the first IDE hard drive for badblocks.
* cfdisk(Cool
- A partition table manipulator used to create or delete disk partitions.
* dosfsck(Cool
- Used to check a msdos filesystem.
* dumpe2fs(Cool
- Lists the superblock and blocks group information on the device listed. Use with a command like "dumpe2fs /dev/hda2". The filesystem on the device must be a Linux filesystem for this to work.
* fdformat(Cool
- Performs s lowlevel format on a floppy disk. Ex: "fdformat /dev/fd0H1440".
* fdisk(Cool
- Used to add or remove partitions on a disk device. It modifies the partition table entries.
* fsck(Cool
- Used to check and/or repair a Linux filesystem. This should only be used on systems that are not mounted.
* hdparm(Cool
- Used to get or set the hard disk parameters.
* mkdosfs(Cool
- Used to create a msdos filesystem.
* mke2fs(Cool
- Create a Linux native filesystem which is called a second extended filesystem. This creates the current version of the Linux filesystem.
* mkfs(Cool
- Used to make a Linux filesystem on a device. The command "mkfs /dev/hdb1" will create a Linux filesystem on the first partition of the second IDE drive.
* mkswap(Cool
- Creates a Linux swap area on a device.
* mount(Cool
- Used to mount a filesystem. It supports many types of filesystems.
* stat(1u) - Used to print out inode information on a file. Usage: stat filename
* swapoff(Cool
- Used to de-activate a swap partition.
* swapon(Cool
- Used to activate a swap partition.
* tune2fs(Cool
- Used to adjust filesystem parameters that are tunable on a Linux second extended filesystem. The filesystem must not be mounted write when this operation is performed. Can adjust maximum mount counts between filesystem checks, the time between filesystem checks, the amount of reserved blocks, and other parameters.
* umount(Cool
- Unmount a filesystem.

Making a Filesystem
Making a swap partition
type "mkswap -c /dev/hda3 10336"

The -c has swap check for bad blocks. The 10336 is the size of the partition in blocks, about 10M. The system enables swap partitions at boot time, but if installing a new system you can type "swapon /dev/hda3" to enable it immediately.

Making an ext2 file system on a floppy

1. fdformat /dev/fd0H1440
2. mkfs -t ext2 -c /dev/fd0H1440

Other file systems:
A normal hard drive can have many types of filesystems on it. To create an ext2 file system, type "mke2fs -c /dev/hda2 82080" to create an 82 meg filesystem. Note: mkfs is a front end to many file system types including ext2, minux, and msdos.

Checking a Filesystem
fsck - Used to check and repair a filesystem.
fsck is a front end to a filesystem type specific fsck.ext2, fsck.minix, and fsck.msdos.

Syntax: fsck -t type device

Ex: fsck -t ext2 /dev/hda3

Tagged in:

1541
like
1
dislike
0
mail
flag

You must LOGIN to add comments