文章来源:
小智
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至405936398@qq.com举报,一经查实,本站将立刻删除。
欧易交易所又称欧易OKX,是世界领先的数字资产交易所,主要面向全球用户提供比特币、莱特币、以太币等数字资产的现货和衍生品交易服务,通过使用区块链技术为全球交易者提供高级金融服务。
起因:威联通NAS上划分一块磁盘给Hyper-V主机做数据磁盘,先要在威联通上新建一个iSCSI-Target服务,客户端Server 2012 R2 通过命令行或者是iSCSI发起程序来连接NAS服务器,本次记录的是以powershell来连接配置记录,因为服务器是Servercore所以也只能用powershell来连接。
1,安装iSCSI 服务
PS C:\> Set-Service -Name MSiSCSI -StartupType Automatic
2,启动iSCSI服务:
PS C:\> Start-Service MSiSCSI
3,连接iSCSI服务器:
PS C:\> new-iscsitargetportal -TargetPortalAddress 10.90.0.10InitiatorInstanceName :InitiatorPortalAddress :IsDataDigest : FalseIsHeaderDigest : FalseTargetPortalAddress : 10.90.0.10TargetPortalPortNumber : 3260PSComputerName
4,获取IscsiTarget服务器地址信息:
PS C:\> Get-IscsiTarget IsConnected NodeAddress PSComputerName----------- ----------- -------------- False iqn.2004-04.com.qnap:ts-832x:iscsi.demo.2cf883
5,连接IscsiTarget服务器
PS C:\> Connect-IscsiTarget -NodeAddress iqn.2004-04.com.qnap:ts-832x:iscsi.demo.2cf883AuthenticationType : NONEInitiatorInstanceName : ROOT\ISCSIPRT\0000_0InitiatorNodeAddress : iqn.1991-05.com.microsoft:pg05e0007029.getacad.comInitiatorPortalAddress : 0.0.0.0InitiatorSideIdentifier : 400001370000IsConnected : TrueIsDataDigest : FalseIsDiscovered : TrueIsHeaderDigest : FalseIsPersistent : FalseNumberOfConnections : 1SessionIdentifier : ffffd18aea4ce010-4000013700000007TargetNodeAddress : iqn.2004-04.com.qnap:ts-832x:iscsi.demo.2cf883TargetSideIdentifier : 0400PSComputerName
6,查看硬盘容量,因为是实验我就划了20G实验一下。
PS C:\> Get-Disk Number Friendly Name Serial Number HealthStatus OperationalStatus Total Size Partition Style------ ------------- ------------- ------------ ----------------- ---------- ----------0 Samsung SS... S3YLNA0M509413T Healthy Online 232.89 GB GPT2 ST500DM002... S2AY73PZ Healthy Online 465.76 GB MBR1 WDC WD10EA... WD-WMATR0785337 Healthy Online 931.51 GB MBR3 QNAP iSCSI... 0e279d22-f528-497e-b30e-7e3a7... Healthy Online 20 GB GPT
7,初始化硬盘:
PS C:\> Initialize-Diskcmdlet Initialize-Disk at command pipeline position 1Supply values for the following parameters:Number[0]: 3Number[1]: 3Number[2]:
8,分配分区并格式化分区
PS C:\> New-Partition -DiskNumber 3 -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel "本地磁盘" DriveLetter FriendlyName FileSystemType DriveType HealthStatus OperationalStatus SizeRemaining Size----------- ------------ -------------- --------- ------------ ----------------- ------------- ---- 本地磁盘 NTFS Fixed Healthy OK 19.92 GB 19.98 GB
9,给磁盘分配盘符
PS C:\> diskpart Microsoft DiskPart version 10.0.17763.1 Copyright (C) Microsoft Corporation.On computer: PG05E0007029 DISKPART> list volume Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 C NTFS Partition 232 GB Healthy Boot Volume 1 FAT Partition 300 MB Healthy System Volume 2 D NTFS Partition 931 GB Healthy Pagefile Volume 3 E 本機磁碟 NTFS Partition 465 GB Healthy Volume 4 本地磁盘 NTFS Partition 19 GB Healthy
10,根据显示的具体卷号来选择:
DISKPART> select volume 4 Volume 4 is the selected volume.
11,给磁盘分配盘符号:
DISKPART> assign letter=FDiskPart successfully assigned the drive letter or mount point.
12,再次查看卷列表,发现已经有盘符号F盘了。
DISKPART> list volume Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 C NTFS Partition 232 GB Healthy Boot Volume 1 FAT Partition 300 MB Healthy System Volume 2 D NTFS Partition 931 GB Healthy Pagefile Volume 3 E 本機磁碟 NTFS Partition 465 GB Healthy* Volume 4 F 本地磁盘 NTFS Partition 19 GB Healthy
13,退出,完成
DISKPART> exit
14,最后打开我的电脑查看,已经出现了本地磁盘F盘了。