zoukankan      html  css  js  c++  java
  • 超过2TB硬盘,分区挂载及使用

    测试iscsi服务是否正常

    [root@FocusBackup ~]# service iscsi restart

    停止 iscsi                                               [确定]

    [root@FocusBackup ~]# chkconfig iscsi on

    [root@FocusBackup ~]# iscsiadm -m discovery -t sendtargets -p 10.30.21.131

    正在启动 iscsid                                          [确定]

    10.30.21.131:3260,1 iqn.2016-01.com.openfiler:tsn.vmlocalbackup

    [root@FocusBackup ~]# iscsiadm -m node -T iqn.2016-01.com.openfiler:tsn.vmlocalbackup -p 10.30.21.10 -l

    Logging in to [iface: default, target: iqn.2016-01.com.openfiler:tsn.vmlocalbackup, portal: 10.30.21.131,3260] (multiple)

    Login to [iface: default, target: iqn.2016-01.com.openfiler:tsn.vmlocalbackup, portal: 10.30.21.131,3260] successful.

    查看硬盘设备

    [root@FocusBackup ~]# fdisk -l

     

    Disk /dev/sda: 322.1 GB, 322122547200 bytes

    255 heads, 63 sectors/track, 39162 cylinders

    Units = cylinders of 16065 * 512 = 8225280 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk identifier: 0x000a4673

     

       Device Boot      Start         End      Blocks   Id  System

    /dev/sda1   *           1          26      204800   83  Linux

    Partition 1 does not end on cylinder boundary.

    /dev/sda2              26        1332    10485760   82  Linux swap / Solaris

    /dev/sda3            1332       26109   199023616   83  Linux

    /dev/sda4           26109       39163   104857600    5  Extended

    /dev/sda5           26109       39163   104856576   83  Linux

     

    Disk /dev/sdb: 2199.0 GB, 2199023254528 bytes

    255 heads, 63 sectors/track, 267349 cylinders

    Units = cylinders of 16065 * 512 = 8225280 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk identifier: 0x000bfa7a

     

       Device Boot      Start         End      Blocks   Id  System

    /dev/sdb1               1      267349  2147480811   83  Linux

     

    Disk /dev/sdd: 1099.5 GB, 1099511627776 bytes

    255 heads, 63 sectors/track, 133674 cylinders

    Units = cylinders of 16065 * 512 = 8225280 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk identifier: 0x00000000

     

    Disk /dev/sdd doesn't contain a valid partition table

     

    Disk /dev/sdc: 2199.0 GB, 2199023254528 bytes

    255 heads, 63 sectors/track, 267349 cylinders

    Units = cylinders of 16065 * 512 = 8225280 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk identifier: 0x26e7758c

     

       Device Boot      Start         End      Blocks   Id  System

    /dev/sdc1               1      267349  2147480811   83  Linux

     

    WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.

     

     

    Disk /dev/sde: 6597.0 GB, 6596969103360 bytes

    255 heads, 63 sectors/track, 802035 cylinders

    Units = cylinders of 16065 * 512 = 8225280 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk identifier: 0x00000000

     

       Device Boot      Start         End      Blocks   Id  System

    /dev/sde1               1      267350  2147483647+  ee  GPT

      

    对超过2TB的硬盘进行分区需要使用parted

     

    [root@FocusBackup ~]# parted /dev/sde

    GNU Parted 2.1

    使用 /dev/sde

    Welcome to GNU Parted! Type 'help' to view a list of commands.

    (parted) mklabel gpt

    警告: The existing disk label on /dev/sde will be destroyed and all data on this disk will be lost. Do you want to continue?

    /Yes//No? y                                                          

    (parted) print                                                           

    Model: OPNFILER VIRTUAL-DISK (scsi)

    Disk /dev/sde: 6597GB

    Sector size (logical/physical): 512B/512B

    Partition Table: gpt

     

    Number  Start  End  Size  File system  Name  标志

     

    (parted) mkpart primary 0KB 6597GB                                       

    警告: You requested a partition from 0.00B to 6597GB.                    

    The closest location we can manage is 17.4kB to 6597GB.

    Is this still acceptable to you?

    /Yes//No? y                                                          

    警告: The resulting partition is not properly aligned for best performance.

    忽略/Ignore/放弃/Cancel? i                                               

    (parted) print                                                           

    Model: OPNFILER VIRTUAL-DISK (scsi)

    Disk /dev/sde: 6597GB

    Sector size (logical/physical): 512B/512B

    Partition Table: gpt

     

    Number  Start   End     Size    File system  Name     标志

     1      17.4kB  6597GB  6597GB               primary

     

    (parted) quit                                                            

    信息: You may need to update /etc/fstab.                                 


    对创建好的大分区进行格式化

    [root@FocusBackup ~]# fdisk -l

     

    Disk /dev/sda: 322.1 GB, 322122547200 bytes

    255 heads, 63 sectors/track, 39162 cylinders

    Units = cylinders of 16065 * 512 = 8225280 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk identifier: 0x000a4673

     

       Device Boot      Start         End      Blocks   Id  System

  • 相关阅读:
    团队绩效评估计划
    Beta阶段项目总结
    Alpha阶段项目总结
    Alpha版总结会议
    快上车项目简介(500字)
    第二阶段团队冲刺站立会议10
    第二阶段团队冲刺站立会议09
    第二阶段团队冲刺站立会议08
    第二阶段团队冲刺站立会议07
    第二阶段团队冲刺站立会议06
  • 原文地址:https://www.cnblogs.com/wangyao3568/p/7675740.html
Copyright © 2011-2022 走看看