Easily create a file system in Linux

Source: Internet
Author: User

Nowadays, almost all families have computers. Do we know how computers work? An operating system is essential to a computer. Linux has also developed rapidly. Here we will introduce the knowledge of Linux, so that you can learn how to use Linux. Today I will talk about how to create a file system in Linux. I hope you will remember how to create a file system in Linux.

Create LV

[Root @ jusdoi oracle] # lvcreate-n u01-L 15G VolGroup01

Create a File System

 
 
  1. [root@jusdoi ~]# mkfs -t ext3 /dev/VolGroup01/u01 15g  
  2. mke2fs 1.39 (29-May-2006)  
  3. Filesystem label=  
  4. OS type: Linux  
  5. Block size=4096 (log=2)  
  6. Fragment size=4096 (log=2)  
  7. 1966080 inodes, 3932160 blocks  
  8. 196608 blocks (5.00%) reserved for the super user  
  9. First data block=0 
  10. Maximum filesystem blocks=4026531840 
  11. 120 block groups  
  12. 32768 blocks per group, 32768 fragments per group  
  13. 16384 inodes per group  
  14. Superblock backups stored on blocks:   
  15.         32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208  
  16. Writing inode tables: done                              
  17. Creating journal (32768 blocks): done  
  18. Writing superblocks and filesystem accounting information: done  
  19. This filesystem will be automatically checked every 37 mounts or  
  20. 180 days, whichever comes first.  Use tune2fs -c or -i to override. 

Create directory

 
 
  1. [root@jusdoi ~]# mkdir /u01  
  2. mount  
  3. [root@jusdoi ~]# mount /dev/VolGroup01/u01 /u01 

Check that it has been mounted.

 
 
  1. [root@jusdoi ~]# df -h  
  2. Filesystem            Size  Used Avail Use% Mounted on  
  3. /dev/mapper/VolGroup01-LogVol00  
  4.                        20G  2.3G   17G  13% /  
  5. /dev/sda1              99M   14M   81M  15% /boot  
  6. tmpfs                 1.8G     0  1.8G   0% /dev/shm  
  7. none                  1.8G  104K  1.8G   1% /var/lib/xenstored  
  8. /dev/hde              3.4G  3.4G     0 100% /mnt  
  9. /dev/mapper/VolGroup01-u01  
  10.                        15G  166M   14G   2% /u01 

Modify/etc/fstab

/Dev/mapper/VolGroup01-u01/u01 ext3 defaults 0 0

I hope the Linux File System creation knowledge described in this article will be helpful to you.

  1. Basic Linux operating system knowledge
  2. Introduction to the installation of Fedora Linux
  3. Learning Manual: poll and select in Linux
  4. Advantages of the Linux operating system that attracts us
  5. Linux operating system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.