将阵列上的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. poj 3468 A Simple Problem with Integers 线段树加延迟标记

    A Simple Problem with Integers   Description You have N integers, A1, A2, ... , AN. You need to deal ...

  2. linux下带有空格的文件怎么删除

    如:hello world文件 第一种方式 先用 ls -i 得到 hello world 的inod(就是最前面的数字)假设这个数字是123,然后find . -inum -exec rm {} \ ...

  3. Goroutines和Channels(五)

    Channels也可以用于将多个goroutine连接在一起,一个Channel的输出作为下一个Channel的输入.这种串联的Channels就是所谓的管道(pipeline).下面的程序用两个ch ...

  4. css 键盘

    <html lang="en"> <head> <meta charset="UTF-8"> <title>Do ...

  5. js 几个重要的特性

    背景: 语法借鉴    java 函数借鉴    scheme 原型继承借鉴    self 正则表达式借鉴    Perl 1.动态语言 函数的定义和调用  形参与实参不需要一致 形参可由 argu ...

  6. Codeforces 388A - Fox and Box Accumulation

    388A - Fox and Box Accumulation 思路: 从小到大贪心模拟. 代码: #include<bits/stdc++.h> using namespace std; ...

  7. Windows7安装JDK的环境变量设置javac不是内部命令或外部命令

    转自:http://bbs.gfan.com/android-5941970-1-1.html Windows7安装JDK的环境变量设置 Windows7 X64安装“jdk-6u26-windows ...

  8. [Java学习] 强调一下编程风格

    讲完了Java的基础语法,大家就可以编写简单的程序代码了,这里有必要强调一下编程风格. 代码风格虽然不影响程序的运行,但对程序的可读性却非常重要.自己编写的程序要让别人看懂,首先在排版方面要非常注意. ...

  9. 敏感性、特异性、假阳性、假阴性(sensitivity and specificity)

    医学.机器学习等等,在统计结果时时长会用到这两个指标来说明数据的特性. 定义 敏感性:在金标准判断有病(阳性)人群中,检测出阳性的几率.真阳性.(检测出确实有病的能力) 特异性:在金标准判断无病(阴性 ...

  10. English trip -- VC(情景课) 6 A Time

    Words eleven  十一 twelve  十二 thirteen  十三 fourteen fifteen sixteen seventeen eighteen nineteen twenty ...