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
- [root@jusdoi ~]# mkfs -t ext3 /dev/VolGroup01/u01 15g
- mke2fs 1.39 (29-May-2006)
- Filesystem label=
- OS type: Linux
- Block size=4096 (log=2)
- Fragment size=4096 (log=2)
- 1966080 inodes, 3932160 blocks
- 196608 blocks (5.00%) reserved for the super user
- First data block=0
- Maximum filesystem blocks=4026531840
- 120 block groups
- 32768 blocks per group, 32768 fragments per group
- 16384 inodes per group
- Superblock backups stored on blocks:
- 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
- Writing inode tables: done
- Creating journal (32768 blocks): done
- Writing superblocks and filesystem accounting information: done
- This filesystem will be automatically checked every 37 mounts or
- 180 days, whichever comes first. Use tune2fs -c or -i to override.
Create directory
- [root@jusdoi ~]# mkdir /u01
- mount
- [root@jusdoi ~]# mount /dev/VolGroup01/u01 /u01
Check that it has been mounted.
- [root@jusdoi ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/VolGroup01-LogVol00
- 20G 2.3G 17G 13% /
- /dev/sda1 99M 14M 81M 15% /boot
- tmpfs 1.8G 0 1.8G 0% /dev/shm
- none 1.8G 104K 1.8G 1% /var/lib/xenstored
- /dev/hde 3.4G 3.4G 0 100% /mnt
- /dev/mapper/VolGroup01-u01
- 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.
- Basic Linux operating system knowledge
- Introduction to the installation of Fedora Linux
- Learning Manual: poll and select in Linux
- Advantages of the Linux operating system that attracts us
- Linux operating system