linux硬盘格式化和创建swap分区
2013-01-20 21:11
417 查看
# 格式化分区 [root@localhost /]# mkfs.ext3 /dev/sda5 mke2fs 1.39 (29-May-2006) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 26104 inodes, 104388 blocks 5219 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 13 block groups 8192 blocks per group, 8192 fragments per group 2008 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 33 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@localhost /]# # 将分区转换成交换分区 #1、格式化交换分区[mkswap] [root@localhost /]# mkswap /dev/sda5 Setting up swapspace version 1, size = 106889 kB [root@localhost /]# free total used free shared buffers cached Mem: 1026816 577392 449424 0 29772 343960 -/+ buffers/cache: 203660 823156 Swap: 2064344 0 2064344 #2、激活交换分区[swapon] [root@localhost /]# swapon /dev/sda5 [root@localhost /]# free total used free shared buffers cached Mem: 1026816 577448 449368 0 29792 343960 -/+ buffers/cache: 203696 823120 Swap: 2168724 0 2168724 [root@localhost /]# # 将交换分区转换成EXT3格式 #1、关闭交换分区[swapoff] [root@localhost ~]# swapoff /dev/sda5 #2、重新格式化分区[mkfs.ext3] [root@localhost ~]# mkfs.ext3 /dev/sda5 mke2fs 1.39 (29-May-2006) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 26104 inodes, 104388 blocks 5219 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 13 block groups 8192 blocks per group, 8192 fragments per group 2008 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 39 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@localhost ~]# # 设置磁盘巻标 [root@localhost auto]# e2label /dev/sda5 sky # 查看巻标 [root@localhost auto]# e2label /dev/sda5 sky # 根据巻标查看硬盘 [root@localhost auto]# findfs LABEL=sky findfs: Unable to resolve 'LABEL=sky' # 添加开机以后挂载 [root@www auto]# vim /etc/rc.local [root@www auto]#
相关文章推荐
- linux下查看硬盘信息、硬盘分区、格式化、挂载、及swap分区
- Linux挂载新硬盘和创建Swap分区的方法
- linux硬盘创建分区并格式化
- Linux 创建SWAP分区
- linux创建swap分区
- Linux中新增硬盘的分区,格式化与挂载
- Linux下添加硬盘、分区、格式化任务详解(IHH.ccidnet)
- linux添加新硬盘并格式化
- Linux下添加新硬盘及分区格式化要点
- Linux添加新硬盘、分区、格式化
- linux 下添加新硬盘设备和硬盘分区格式化挂载使用磁盘配额限制
- Linux下添加新硬盘及分区格式化要点
- linux下D盘(适用于U盘、硬盘等一切移动存储设备)策略(比格式化猛,因为是不可恢复!)
- linux下大于2TB硬盘格式化及挂载
- linux硬盘分区之swap分区
- Linux添加新硬盘、分区、格式化、自动挂载
- 给linux虚拟机添加硬盘,分区,格式化,挂载
- linux之创建swap分区(随时盖楼)
- Linux系统安装时格式化硬盘很慢的原因及解决方法
- Linux添加新硬盘、分区、格式化、自动挂载