zoukankan      html  css  js  c++  java
  • LUN挂载到Linux主机后,如何对磁盘进行分区

    将阵列上的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):
  • 相关阅读:
    iOS开发多线程篇—GCD介绍
    IOS UI篇—UILabel的文字顶部对齐
    TableView编辑中实现多行删除的2中方法以及注意
    UITableView的新手——层次注意
    UITabBarItem编写的时候出现得图片显示异常,和有一些比较忽略的方法总结
    在ios开发中nil和NUll和Nilde区别————和如何判断连个对象的关系和UISlider不能拖动的问题
    iphone 手机屏幕和UIView和UIWindowde 的主要的区别
    iOS平常注意1
    ios优化复制大文件时,如何使内存运用最少且效率最高
    property在括号中应该怎样写
  • 原文地址:https://www.cnblogs.com/wanglin2016/p/7718716.html
Copyright © 2011-2022 走看看