LUN挂载到Linux主机后,如何对磁盘进行分区

时间:2022-07-02 00:02:47

将阵列上的LUN挂载到Linux主机后,如何对磁盘进行分区,方法参考https://www.ibm.com/developerworks/cn/linux/l-lpic1-v3-104-1/

fdisk 命令创建、修改或删除块设备上的分区

1、列出磁盘分区 fdisk -l dev/sda

2、启动fdisk

knoppix@Microknoppix:~$ su -
root@Microknoppix:~# fdisk /dev/sda
 
The number of cylinders for this disk is set to 121601.
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):
 
3、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):
 
4、显示现有分区列表
Command (m for help): p
 
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000de20f
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9111    73184076    7  HPFS/NTFS
/dev/sda2            9634        9730      779152+  83  Linux
/dev/sda3            9731      116679   859067842+   5  Extended
/dev/sda5            9731       20917    89859546   83  Linux
/dev/sda6           20918       39644   150424596   83  Linux
/dev/sda7           39645       53905   114551451   83  Linux
 
Command (m for help):
 
5、创建一个分区
Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
p
Selected partition 4
First cylinder (9112-121601, default 9112):
Using default value 9112
Last cylinder, +cylinders or +size{K,M,G} (9112-9633, default 9633): +521
 
Command (m for help): p
 
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000de20f
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9111    73184076    7  HPFS/NTFS
/dev/sda2            9634        9730      779152+  83  Linux
/dev/sda3            9731      116679   859067842+   5  Extended
/dev/sda4            9112        9633     4192965   83  Linux
/dev/sda5            9731       20917    89859546   83  Linux
/dev/sda6           20918       39644   150424596   83  Linux
/dev/sda7           39645       53905   114551451   83  Linux
 
Partition table entries are not in disk order
 
Command (m for help):

LUN挂载到Linux主机后,如何对磁盘进行分区的更多相关文章

  1. linux(centOS7)的基本操作(五) 磁盘、分区、挂载、卸载

    linux的磁盘类型和分区简介 linux的磁盘分为IDE和SCSI,目前以后者居多. 1. IDE磁盘的分区:hd+盘号+分区数字 盘号 |-a:基本盘 |-b:基本从属盘 |-c:辅助主盘 |-d ...

  2. paramiko 登录linux主机后执行tail后返回数据不完整解决方法。

    def get_sql_log(host,port,user,password,key_words,out_put_filename): commond='cd crm-app/;./tailall. ...

  3. Linux 学习手记(6): 磁盘、分区、MBR与GPT

    1. 磁盘在LINUX中的表示 Linux所有设备都被抽象为一个文件,保存在/dev目录下 设备名称一般为hd[a-z]或者sd[a-z]([a-z]为分区号),如:hda.hdb.sda.sdb I ...

  4. 【Linux】大于2T的磁盘怎么分区?

    环境CentOS7.1 2.9t磁盘 fdisk 只能分区小于2t的磁盘,大于2t的话,就要用到parted 1,将磁盘上原有的分区删除掉: 进入:#parted   /dev/sdb 查看:(par ...

  5. Linux系统下常用的磁盘管理命令——du / df / fdisk / mount / xxd

    之前使用虚拟机体验Linux操作系统的使用,一般使用默认的磁盘分区设置,也很少涉及磁盘管理操作,且总有删除重装作为后盾.在安装Ubuntu双系统后,在使用过程中遇到了磁盘分区不合理导致的/boot分区 ...

  6. Linux 主机被入侵后的处理案例

    Linux主机被入侵后的处理案例 提交 我的留言 加载中 已留言 一次Linux被入侵后的分析 下面通过一个案例介绍下当一个服务器被rootkit入侵后的处理思路和处理过程,rootkit攻击是Lin ...

  7. Linux配置虚拟主机后,只能访问到主页怎么办?

    Linux配置虚拟主机后,只能访问到主页怎么办? 今天配置了lamp后,添加了一个虚拟主机,配置http.conf后,增加虚拟主机,测试访问发现只有域名下能访问,ljt.com但是域名下所有的都访问不 ...

  8. Linux主机被SSH精神病(Psychos)暴力攻破后成为肉鸡的攻防过程

    近日公司局域网突然变得非常慢,上网受到很大影响,不仅仅是访问互联网慢,就连访问公司内部服务器都感到异常缓慢.于是对本局域网网关进行测试:   $ ping 10.10.26.254   发现延时很大, ...

  9. Linux主机上使用交叉编译移植u-boot到树莓派

    0环境 Linux主机OS:Ubuntu14.04 64位,运行在wmware workstation 10虚拟机 树莓派版本:raspberry pi 2 B型. 树莓派OS: Debian Jes ...

随机推荐

  1. 通过PowerShell获取域名whois信息

    Whois 简单来说,就是一个用来查询域名是否已经被注册,以及注册域名的详细信息的数据库(如域名所有人.域名注册商.域名注册日期和过期日期等).通过域名Whois服务器查询,可以查询域名归属者联系方式 ...

  2. 偶遇makeblock

    上周出去吃饭在公交站牌上看到一家叫“创客工场”的公司在打招聘广告,当时在想这公司有钱啊,广告都打到这儿了,也没细想让韩总扫了一下他们的二维码,回来搜了一下这个公司,我靠,是做开源硬件的:再一看各种机器 ...

  3. 可以把一堆dll文件放到程序目录下的一个自建目录里面

    窦宁波大哥哥的那篇文章的这种写法还是很有参考价值的. QString strLibPath(QDir::toNativeSeparators(QApplication::applicationDirP ...

  4. php 时间问题

    获得简单的日期 date() 函数的格式参数是必需的,它们规定如何格式化日期或时间. 下面列出了一些常用于日期的字符: d - 表示月里的某天(01-31) m - 表示月(01-12) Y - 表示 ...

  5. 还在为CSS布局发愁?你该看看这7条原则

    一.网页结构分析七条原则 这以下7个原则是经过多年网站实战经验之后的总结,只要掌握这7个原则,可以解决大部分在编写网站布局中的问题. 1.先结构后样式. 2.能用CSS表现出来的效果,就尽量少用图像. ...

  6. VMware的安装和使用

    注:内容系兄弟连Linux教程(百度传课:史上最牛的Linux视频教程)的学习笔记. VMware的安装和使用 1. 虚拟机的安装 这里安装虚拟机VMware10,下载安装程序,双击安装-->为 ...

  7. 在Windows 10中截取截图的6种方式 简介

    在Windows 10中截取截图的6种方式 简介 截图对于不同的目的很重要.它可以用于捕获笔记本电脑上的任何内容的截图.所以,如果你使用Windows 10,你可能不知道如何截图,因为它是比较新的.因 ...

  8. Linux salt

    引用自:https://blog.csdn.net/langsim/article/details/43939295 Saltstack介绍 Saltstack是一个新的基础设施管理工具.目前处于快速 ...

  9. typescript-koa-postgresql 实现一个简单的rest风格服务器 —— 集成 koa

    接上文 1.安装 koa yarn add koa koa-router koa-static yarn add @types/koa @types/koa-router @types/koa-sta ...

  10. java基础基础总结----- Date

    前言:其实在学习这个的时候,自我感觉学到什么直接查询API就可以了,没有必要再去研究某个方法怎么使用, 重点学习一下经常用到的方法.感觉自己的写的博客,就跟自己的笔记一样,用的是时候,就能快速的查找 ...