HOME > > Formatting Linux File system

Formatting Linux File system

Anup - Friday, May 15, 2009
When we Format linux file system
  • When we want to expand file system
    When we just added new hard disk drive

Here, we take example suppose we just added new hard disk drives

Step 1 Add Hard Disk physically with Machine

Step 2 login as a root and execute # fdisk –l command. You will see newly added disks here. (Example: /dev/sdc)

Step 3 Now we create file system. Log is as a root user and type following command:

# mkfs.ext3 /dev/sdc1

Step 4 Create mount point directory for the file system

# mkdir /Indian

Step 5 Mount the new file system

# mount /dev/sdc1 /Indian

Step 6 we need to add partition to /etc/fstab file

# vi /etc/fstab

Add/append following entry to file:

/dev/sdc1 /indian ext3 defaults 0 2

Sara Reid said...

Formatting linux filesystem required for many reasons. If you want to expand file system or you just added new hard disk drive or create separate partitions for security and performance reasons. Whatever may be your reason(s) all file system creating involves creations of superblock, inode and other filesystem metadata structure. Fortunately, Linux comes with mkfs command to format filesystem. It is used to build a Linux file system on a device, usually a hard disk partition. General syntax of mkfs is as follows:
mkfs -t filetype /dev/DEVICE

8gb micro sd karte

Contact me

Get in Touch

Need to get touch with me? Please fill out the form with your enquiry.

Name
Anup Srivastav
Address
Lucknow - Utter Pradesh
Email
myindiandba@gmail.com
Message me