Linux添加新的分区
来源:互联网 发布:手机淘宝开店 编辑:程序博客网 时间:2024/06/05 23:00
一、分区与格式化的原理
二、使用linux中的fdisk分区
三、使用mkfs创建文件系统
四、硬盘分区的挂载;
一、分区原理
1、主分区表(64byte):记录分区的起始与结束柱面、主分区个数。主分区大小有限,不能超过四个主分区
2、扩展分区:将一个主分区更改成扩展分区,扩展分区支持无限个分区(逻辑分区),逻辑分区的信息写在扩展分区表中。
二、格式化原理
也就是创建不同的文件系统,供数据的存储与读取。
常用的linux分区工具:fdisk,sfdisk,diskdruid
fdisk一般使用过程
1、运行命令:#fdisk /dev/sda
2、添加/删除/修改分区
3、重新启动计算机(生效,由内核读取分区表信息的)
[root@server root]# fdisk /dev/sda
The number of cylinders for this disk is set to 9729.
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): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id #改变系统编号
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help):
三、Linux的格式化工具
mkfs - 支持ext2、ext3(日志)、vfat、msdos、jfs、reiserfs等
用法1:mkfs -t
例:#mkfs -t ext3 /dev/hda1
用法2:mkfs.
例:#mkfs.vfat /dev/hda2
mke2fs - 支持ext2/ext3文件系统
用法:mke2fs [-j]
例:#mke2fs -j /dev/hdb2
四、硬盘分区的挂载
1、挂载命令:#mount (临时挂载,重启系统无效)
例:#mount /dev/hda11 /mnt/d2
2、卸载命令:#umount
例:umount /dev/hda11
3、写入/etc/fstab(自动挂载,系统启动时)
/dev/hda11 /mnt/d2 /ext3 defaults 0 0
五、使用卷标挂载
1、添加卷标 —— e2label
例:#e2label /dev/hda10 test
2、根据卷标挂载
例:#mount LABEL=test /mnt/d1
3、写入/etc/fstab
LABEL=test /mnt/d1 /ext3 defaults 0 0
六、ext2/ext3挂载选项
1、ro/rw ——只读/读写
2、exec/noexec——允许/不允许可执行
3、dev/nodev——允许/不允许设备文件
4、suid,sgid/nosuid/nosgid——允许/不允许suid,sgid文件
5、atime/noatime——更新/不更新节点的访问时间
6、async/sync——异步/同步磁盘I/O
7、user/nouser——允许/不允许普通用户挂载磁盘,用于/etc/fstable文件中的选项
- Linux添加新的分区
- Linux添加新硬盘并分区格式化
- 给linux虚拟机添加新分区
- Linux 使用fdisk添加新分区
- linux添加新磁盘和创建分区
- linux添加新磁盘和创建分区
- 如何给MT8127添加新的分区
- Ubuntu添加新分区
- 在VMWare Workstation 虚拟机上给linux添加新的分区
- Linux下添加新硬盘,分区及挂载的详细步骤指导
- Linux下添加新硬盘及分区格式化要点
- Linux添加新分区并实现开机挂载
- Linux添加新硬盘、分区、格式化、自动挂载
- Linux添加新硬盘、分区、格式化、自动挂载
- Linux下添加新硬盘,分区及挂载
- Linux下添加新硬盘,然后分区及挂载
- Linux添加新硬盘、分区、格式化、自动挂载
- Linux添加新硬盘、分区、格式化、自动挂载
- 自媒体运营和推广的这些小技巧你都知道吗?
- 编译时字符串连接
- switch接受的参数类型
- 布局优化技巧
- java学习日记_96:字符缓冲流
- Linux添加新的分区
- unity3D-游戏/AR/VR在线就业班 蓝鸥C#入门事件学习笔记
- UINavigationController 上方导航下横线阴影 去留问题 以及 特殊格式处理
- 1064. 朋友数(20)
- ANS1编码详解(二)--编码规则
- android样式和主题
- 用JAX-WS在Tomcat中发布WebService
- Becoming An Xperf Xpert: Part 5 Gaps of Time For Explorer.exe
- 1063. 计算谱半径(20)