测试iscsi服务是否正常

[root@FocusBackup ~]# service iscsi restart

停止 iscsi:                                               [确定]

[root@FocusBackup ~]# chkconfig iscsi on

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

正在启动 iscsid:                                          [确定]

10.5.83.131:3260,1 iqn.2006-01.com.openfiler:tsn.vmlocalbackup

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

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

Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.vmlocalbackup, portal: 10.5.83.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

/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/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

[root@FocusBackup ~]# mkfs.ext4 /dev/sde1

mke2fs 1.41.12 (17-May-2010)

文件系统标签=

操作系统:Linux

块大小=4096 (log=2)

分块大小=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

402653184 inodes, 1610588151 blocks

80529407 blocks (5.00%) reserved for the super user

第一个数据块=0

Maximum filesystem blocks=4294967296

49152 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,

102400000, 214990848, 512000000, 550731776, 644972544

正在写入inode表: 完成

Creating journal (32768 blocks): 完成

Writing superblocks and filesystem accounting information: 完成

This filesystem will be automatically checked every 37 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

写入开机启动项,完成挂载操作

可以使用vi /etc/fstab

也可以使用vi /etc/rc.local

Linux分区:超过2TB硬盘分区的更多相关文章

  1. Linux下parted分区超过2TB硬盘-分区格式化

    1.parted 设备名进入分区 parted /dev/vdb 2.输入print打印列出当前分区设备的磁盘容量大小 3.设置磁盘分区为gpt模 mklabel gpt 然后点击YES继续(提示磁盘 ...

  2. 安装 Linux 时碰到的硬盘分区的陷阱及应对

    硬盘分区的陷阱及应对 之所以想到写这篇,是因为本人在折腾 Linux 系统的过程中,有多次掉入硬盘分区的陷阱的经历.最近几天,再一次掉入坑中,折腾了两天才从坑中爬出来.经过多方查询资料,终于弄明白了硬 ...

  3. linux学习笔记之硬盘分区

    引用:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/03/2997098.html PS:本文仅对知识点作总结.详情请参考原文. 首先 ...

  4. Linux命令-添加新硬盘,分区及挂载[转]

    http://www.cnblogs.com/qiyebao/p/4484370.html 转自:http://blog.chinaunix.net/uid-25829053-id-3067619.h ...

  5. Linux速通07 硬盘分区、格式化及文件系统管理

    硬件设备与文件名的对应关系 # 在Linux系统中,每个设备都被当作一个文件来对待 # 各种设备在Linux中的文件名 设备 设备在Linux内的文件名 IDE硬盘 /dev/hd[a-d] SCSI ...

  6. Linux下添加新硬盘,分区及挂载(转)

    挂载好新硬盘后输入fdisk -l命令看当前磁盘信息,卸载硬盘分区 umount /dev/sdb 可以看到除了当前的第一块硬盘外还有一块sdb的第二块硬盘,然后用fdisk /dev/sdb 进行分 ...

  7. Linux下添加新硬盘,分区及挂载

    挂载好新硬盘后输入fdisk -l命令看当前磁盘信息 可以看到除了当前的第一块硬盘外还有一块sdb的第二块硬盘,然后用fdisk /dev/sdb 进行分区 进入fdisk命令,输入h可以看到该命令的 ...

  8. linux系统监控与硬盘分区/格式化/文件系统管理

    1.系统监控 1) 系统监视和进程控制的工具----> Top 与  free      类似于windows的资源管理器.     进程运行的三种状态: tips: 进程(Process)是计 ...

  9. 【转】Linux下添加新硬盘,分区及挂载

    原文:http://blog.chinaunix.net/uid-25829053-id-3067619.html ------------------------------------------ ...

随机推荐

  1. js Date学习

    Date.parse()接收一个表示日期的字符串参数(参数错误时返回NaN),返回相应日期的毫秒数.(使用自 UTC(Coordinated Universal Time,国际协调时间)1970 年 ...

  2. spring里的controller之间的跳转

    未测试: this.getServletContext().getRequestDispatcher("/rentHouse.htm?method=display").forwar ...

  3. Python之路【第一篇】python基础

    一.python开发 1.开发: 1)高级语言:python .Java .PHP. C#  Go ruby  c++  ===>字节码 2)低级语言:c .汇编 2.语言之间的对比: 1)py ...

  4. 【转】零基础学习Fiddler抓包改包

    看到一篇讲关于Fiddler抓包工具的讲解,个人感觉写得很仔细,但是作者说禁止转载,那就放个链接Mark一下 http://tmq.qq.com/2016/12/fiddler_packet_capt ...

  5. bzoj4325: NOIP2015 斗地主(爆搜+模拟)

    去年的我还不会打斗地主呵呵 觉得这道题挺难的..抄了一遍题解,感触挺多的= = 首先出牌的方式太多了不能每次都枚举所有的出牌方式, 于是分成两部分:1.顺子 2.带牌等其他 每次dfs都搜顺子,而且顺 ...

  6. 最后一周psp

    团队项目PSP 一:表格     C类型 C内容 S开始时间 E结束时间 I时间间隔 T净时间(mins) 预计花费时间(mins) 讨论 讨论用户界面 10:20 11:45 25 40 80 分析 ...

  7. 生活中的OO智慧——大话面向对象五大原则

    世间万物,以俗眼观纷纷各异,以道眼观种种是常.面向对象思想不仅是编程的智慧,同样也是人生的智慧.通过生活去领悟面向对象的智慧,以面向对象的智慧来指导生活. (部分图片取自How I explained ...

  8. Kruskal 最小生成树算法

    对于一个给定的连通的无向图 G = (V, E),希望找到一个无回路的子集 T,T 是 E 的子集,它连接了所有的顶点,且其权值之和为最小. 因为 T 无回路且连接所有的顶点,所以它必然是一棵树,称为 ...

  9. 比官方教程代码更简短的SignalR Server Broadcast示例

    SignalR是微软ASP.NET技术体系中的新成员. 在www.asp.net网站上的SignalR专区有一篇SignalR的入门级教程<Tutorial: Server Broadcast  ...

  10. Mac 软件篇

    对于美好事务的追求无论何时都不算晚. ** 文章内容来着我整理的fetool,以下内容可能更新不及时 ** Mac 下的软件那么多,又是免费又是付费,应该怎么选呢?我来分享下我的推荐列表,推荐的优先级 ...