TShopping

 找回密碼
 註冊
搜索
查看: 1234|回復: 0

[CentOS] Linux如何使用超過2TB以上的裝置(HDD,iSCSI)空間(將partition切成...

[複製鏈接]
發表於 2022-4-12 17:31:01 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
情境:大於2TB以上的硬碟,若要使用fdisk做分割partition的動作,可能會出現一些警語或是無法查看相關訊息,因此要使用parted指令來做切割partition(並使用GPT格式)。

step 1) 安裝parted套件

  1. # yum install -y parted
複製代碼




step 2) 切partition,並使用GPT

  1. # parted /dev/sdb
複製代碼
----------------------------------------------------------
GNU Parted 1.8.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want
to continue?
parted: invalid token: gpt
Yes/No? yes
New disk label type? [gpt]? gpt
(parted) mkpart
Partition name? []? primary
File system type? [ext2]? ext4
Start? 0
End? -1
(parted) print

Model: OPNFILER VIRTUAL-DISK (scsi)
Disk /dev/sdb: 5508GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 17.4kB 5508GB 5508GB primay

(parted) quit
Information: Don't forget to update /etc/fstab, if necessary.
----------------------------------------------------------








step 3) 查看是否已使用GPT格式

  1. # fdisk -l
複製代碼

----------------------------------------------------------
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device         Boot     Start          End       Blocks      Id      System
/dev/sda1    *               1          123     987966      83      Linux
/dev/sda2                 124        6203   48837600    82      Linux swap / Solaris
/dev/sda3                6204     12283   48837600    83      Linux
/dev/sda4              12284     60801  389720835   8e      Linux LVM

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


WARNING: The size of this disk is 5.5 TB (5508429774848 bytes).
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).


Disk /dev/sdb: 5508.4 GB, 5508429774848 bytes
255 heads, 63 sectors/track, 669695 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device      Boot   Start          End            Blocks          Id      System
/dev/sdb1             1         267350    2147483647+   ee     EFI GPT
----------------------------------------------------------



step 4) 格式化(Format)

  1. # mkfs -t ext3 /dev/sdb1
複製代碼






以上資料參考自:http://blog.yam.com/wesley1981/article/16596463

 

臉書網友討論
*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-4-18 21:51 , Processed in 0.076712 second(s), 23 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表