现在家家几乎都拥有电脑,我们知道电脑是怎样工作的么?电脑中必不可少的就是操作系统。Linux的发展也非常迅速。这里介绍Linux的知识,让你学好应用Linux系统。今天一讲Linux创建文件系统的知识,希望你记住Linux创建文件系统方法。
创建LV
[root@jusdoi oracle]# lvcreate -n u01 -L 15G VolGroup01
建文件系统
- [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.
建目录
- [root@jusdoi ~]# mkdir /u01
- mount
- [root@jusdoi ~]# mount /dev/VolGroup01/u01 /u01
查看已经mount上了
- [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
为使重启后生效,修改/etc/fstab
/dev/mapper/VolGroup01-u01 /u01 ext3 defaults 0 0
希望本文讲解的Linux创建文件系统知识对你有所帮助。
【编辑推荐】