linux学习笔记-12存储结构与文件划化

2016-09-20  本文已影响0人  Rancune

从"/"开始

物理设备命名

文件系统与数据资料

挂载

添加硬盘设备

创建分区

  #查看所有硬盘,包括没有挂载
  fdisk -l

  # 输入p查看当前分区详情
  p
  Disk /dev/sdb: 5 GiB, 5368709120 bytes, 10485760 sectors
  Units: sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disklabel type: dos
  Disk identifier: 0x0c114c38

  #输入n新建新的分区
  n
  Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)

  #选择分区类型
  Select (default p):p

  #设置分区号,一般情况下是3主分区,一个逻辑分区
  分区号 (1-4, default 1): 1

  #磁盘的起始扇区,直接回车即可:
  First sector (2048-10485759, default 2048):2048

  #键入+2G,代表该分区的大小为2G
  Last sector, +sectors or +size{K,M,G,T,P} (2048-10485759, default 10485759): +2G

  #敲击字符w,将上述分区信息保存
  w
  The partition table has been altered.
  Calling ioctl() to re-read partition table.
  Syncing disks.

  #让内核同步分区信息(此步骤仅在没有找到分区设备的情况下才需要执行,非必要动作。):
  partprobe

格式化为xfs文件系统

将硬盘挂载在目录中

设置系统启动后自动挂载该硬盘设备

查看硬盘的使用情况

swap分区

磁盘冗余阵列(RAID)

逻辑卷管理

磁盘容量配额

虚拟文件系统

软硬方式链接

上一篇 下一篇

猜你喜欢

热点阅读