将阵列上的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. tyvj 2075 [NOIP2012T5]借教室 区间更新+二分

    描述 在大学期间,经常需要租借教室.大到院系举办活动,小到学习小组自习讨论,都需要向学校申请借教室.教室的大小功能不同,借教室人的身份不同,借教室的手续也不一样.面对海量租借教室的信息,我们自然希望编 ...

  2. 解决MVC 时间序列化的方法

    1.全局处理 处理代码 publict static void SetSerializationJsonFormat(HttpConfiguration config) { // Web API co ...

  3. Linux - 命令重定向

    命令重定向, 就是将目前得到的数据转移到指定的地方.分为以下几种: >>>1>2>1>>2>>< 1. > 与 >>先看一 ...

  4. Longest Repeating Character Replacement

    2018-06-29 22:56:24 问题描述: 问题求解: 本题是一条字符串问题,且是求Optimal,自然最初想到的是使用DP来进行求解,但是问题就是如果采用DP的话,前一个状态也太多了,和替换 ...

  5. 部署ovf模板,突然出现用户取消任务。

    查看了网上的文章,自己做了一下实验. 发觉导出ovf模板时,虚拟CDROM的选项要选[客户端设备],导入时才不会出事. 参考连接 http://lukebarklimore.wordpress.com ...

  6. English trip -- VC(情景课)9 B Outside chores 室外家务

    Vocabulary focus 核心词汇 cutting the grass 修剪草坪 getting the mail  收到邮件 taking out the trash  把垃圾带出去 wal ...

  7. RabbitMq windows 安装

    参考官方网址: http://www.rabbitmq.com/install-windows-manual.html http://www.rabbitmq.com/install-windows. ...

  8. vue新手入门指导,一篇让你学会vue技术栈,本人初学时候的文档

    今天整理文档突然发现了一份md文档,打开一看 瞬间想起当年学习vue的艰难路,没人指导全靠自己蒙,下面就是md文档内容,需要的小伙伴可以打开个在线的md编译器看一看,我相信不管是新人还是老人  入门总 ...

  9. http1.0 1.1 2.0区别

    http1.0 1.1 2.0区别 转载:https://blog.csdn.net/linsongbin1/article/details/54980801/ 1.HTTP1.0 1.1区别 (1) ...

  10. spring cloud学习(三)使用Ribbon实现客户端负载均衡

    使用Ribbon实现客户端的负载均衡 * 个人博客空间 : https://zggdczfr.cn/ * Ribbon Spring Cloud Netflix Ribbon 是一个客户端负载均衡的组 ...