linux 创建新分区,重启后挂载有效.
2010-05-24 17:28
183 查看
第一步:创建分区
root# fdisk /dev/had à进入到新添加的硬盘中
第二步:使新创建的分区在系统中立即生效
第三步:格式化新创建的分区
第四步:使新创建的分区挂载/mnt/rhce01 目录下
第五步:让挂载在系统重启后仍然有效
本文出自 “Jerome” 博客,请务必保留此出处http://dongjia.blog.51cto.com/920377/320340
root# fdisk /dev/had à进入到新添加的硬盘中
The number of cylinders for this disk is set to 10402. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): n à创建新分区 Command action e extended p primary partition (1-4) p à创建主分区 Partition number (1-4): 1 à新建的主分区序号 First cylinder (1-10402, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-10402, default 10402): +500M à创建主分区大小 Command (m for help): w à保存创建的主分区 |
root#partprobe |
[root@server ~]# mkfs.ext3 /dev/hda1 mke2fs 1.39 (29-May-2006) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 122400 inodes, 488848 blocks 24442 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67633152 60 block groups 8192 blocks per group, 8192 fragments per group 2040 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 27 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@server ~]# |
Root#mount /dev/hda1 /mnt/rhce01 |
root# vim /etc/fstab à编辑这个文件,添加上下面的一行,使挂载在重启后有效; LABEL=/1 / ext3 defaults 1 1 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 LABEL=SWAP-sda3 swap swap defaults 0 0 /dev/hda1 /mnt/rhce01 ext3 defaults 0 0 |
本文出自 “Jerome” 博客,请务必保留此出处http://dongjia.blog.51cto.com/920377/320340
相关文章推荐
- linux 创建新分区,重启后挂载有效
- Virtualbox中Linux添加一个新磁盘->创建分区->格式化->挂载分区
- linux下磁盘进行分区、文件系统创建、挂载和卸载
- Virtualbox中Linux添加一个新磁盘->创建分区->格式化->挂载分区
- linux中磁盘的分区,文件系统的创建,挂载
- Linux创建虚拟分区并挂载
- linux下磁盘进行分区、文件系统创建、挂载和卸载(转)
- Linux创建分区开机自动挂载
- linux 挂载硬盘,创建新分区,删除分区
- 2、自动挂载分区--创建小型linux
- 如何在 Linux 下挂载大于 2T 的 LUN? 使用 parted 创建 GPT 分区
- linux下磁盘进行分区、文件系统创建、挂载和卸载
- linux 挂载硬盘,创建新分区,删除分区
- 掌握管理Linux磁盘和分区的方法 创建并挂载文件系统以及 创建并管理LVM
- linux磁盘挂载分区以及创建用户指…
- linux创建分区、文件系统、挂载操作
- Linux 创建文件系统及挂载文件系统流程详解
- redhat新挂载分区创建NFS
- linux系统挂载分区
- linux添加新磁盘和创建分区