1、创建一个2G的分区,文件系统为ext2,卷标为DATA,块大小为1024,预留管理空间为磁盘分区的8%;挂载至/backup目录,要求使用卷标进行挂载,且在挂载时启动此文件系统上的acl功能;
进行分区操作: | Disk /dev/sdc : 3221 MB, 3221225472 bytes 255 heads, 63 sectors /track , 391 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table Disk /dev/sdc : 3221 MB, 3221225472 bytes 255 heads, 63 sectors /track , 391 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 1 244 1959898+ 83 Linux |
创建文件系统 | mke2fs 1.39 (29-May-2006) Fragment size=1024 (log=0) 245760 inodes, 1959896 blocks 156791 blocks (8.00%) reserved for the super user Maximum filesystem blocks=69206016 8192 blocks per group, 8192 fragments per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553, Writing inode tables: done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 38 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
验证是否创建正确:
挂载操作
| /dev/sda2 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sda3 on /home type ext3 (rw) /dev/sda1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) /dev/sdc1 on /backup type ext2 (rw,acl) |
2、将此文件系统的超级块中的信息中包含了block和inode的行保存至/tmp/partition.txt中; | Filesystem features: resize_inode dir_index filetype sparse_super Reserved block count: 156791 Inode blocks per group: 128 Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) |
3、复制/etc目录中的所有文件至此文件系统;而后调整此文件系统类型为ext3,要求不能损坏已经复制而来的文件; | tune2fs 1.39 (29-May-2006) Creating journal inode: done This filesystem will be automatically checked every 38 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
4、调整其预留百分比为3%;
5、以重新挂载的方式挂载此文件系统为不更新访问时间戳,并验正其效果;
6、对此文件系统强行做一次检测; [root@localhost ~]# e2fsck -f /dev/sdc1
7、删除复制而来的所有文件,并将此文件系统重新挂载为同步(sync);而后再次复制/etc目录中的所有文件至此挂载点,体验其性能变化; |