Parted分區大容量磁盤

創建了新的虛擬磁盤10T , 掛載后分區格式化
一.fdisk無法創建大容量的分區
Fileserver:~ # fdisk /dev/sdb

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
The size of this disk is 9.8 TiB (10737418240000 bytes). DOS partition table format can not be used on drives for volumes larger than 2199023255040 bytes for 512-byte sectors. Use GUID partition table format (GPT).
Created a new DOS disklabel with disk identifier 0x0506ad6d.
Command (m for help): m

Help:
? DOS (MBR)
? ?a ? toggle a bootable flag
? ?b ? edit nested BSD disklabel
? ?c ? toggle the dos compatibility flag
? Generic
? ?d ? delete a partition
? ?F ? list free unpartitioned space
? ?l ? list known partition types
? ?n ? add a new partition
? ?p ? print the partition table
? ?t ? change a partition type
? ?v ? verify the partition table
? ?i ? print information about a partition
? Misc
? ?m ? print this menu
? ?u ? change display/entry units
? ?x ? extra functionality (experts only)
? Script
? ?I ? load disk layout from sfdisk script file
? ?O ? dump disk layout to sfdisk script file
? Save & Exit
? ?w ? write table to disk and exit
? ?q ? quit without saving changes

? Create a new label
? ?g ? create a new empty GPT partition table
? ?G ? create a new empty SGI (IRIX) partition table
? ?o ? create a new empty DOS partition table
? ?s ? create a new empty Sun partition table

Command (m for help): p
Disk /dev/sdb: 9.8 TiB, 10737418240000 bytes, 20971520000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0506ad6d

Command (m for help): n
Partition type
? ?p ? primary (0 primary, 0 extended, 4 free)
? ?e ? extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):?
First sector (2048-4294967295, default 2048):?
Last sector, +sectors or +size{K,M,G,T,P} (2048-4294967294, default 4294967294):?

Created a new partition 1 of type 'Linux' and of size 2 TiB.

Command (m for help): p
Disk /dev/sdb: 9.8 TiB, 10737418240000 bytes, 20971520000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0506ad6d

Device ? ? Boot Start ? ? ? ?End ? ?Sectors Size Id Type
/dev/sdb1 ? ? ? ?2048 4294967294 4294965247 ? 2T 83 Linux

看起來只能創建2T的分區。
Command (m for help): q


二.使用Parted進行分區

Fileserver:~ # parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? align-check TYPE N ? ? ? ? ? ? ? ? ? ? ? ?check partition N for TYPE(min|opt) alignment
? help [COMMAND] ? ? ? ? ? ? ? ? ? ? ? ? ? print general help, or help on COMMAND
? mklabel,mktable LABEL-TYPE ? ? ? ? ? ? ? create a new disklabel (partition table)
? mkpart PART-TYPE [FS-TYPE] START END ? ? make a partition
? name NUMBER NAME ? ? ? ? ? ? ? ? ? ? ? ? name partition NUMBER as NAME
? print [devices|free|list,all|NUMBER] ? ? display the partition table, available devices, free space, all found partitions, or a particular partition
? quit ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? exit program
? rescue START END ? ? ? ? ? ? ? ? ? ? ? ? rescue a lost partition near START and END
? resize NUMBER END ? ? ? ? ? ? ? ? ? ? ? ?change end sector of partition NUMBER
? rm NUMBER ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?delete partition NUMBER
? select DEVICE ? ? ? ? ? ? ? ? ? ? ? ? ? ?choose the device to edit
? disk_set FLAG STATE ? ? ? ? ? ? ? ? ? ? ?change the FLAG on selected device
? disk_toggle [FLAG] ? ? ? ? ? ? ? ? ? ? ? toggle the state of FLAG on selected device
? set NUMBER FLAG STATE ? ? ? ? ? ? ? ? ? ?change the FLAG on partition NUMBER
? toggle [NUMBER [FLAG]] ? ? ? ? ? ? ? ? ? toggle the state of FLAG on partition NUMBER
? unit UNIT ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?set the default unit to UNIT
? version ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?display the version number and copyright information of GNU Parted
(parted) mklabel GPT
(parted) p ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Model: Msft Virtual Disk (scsi)
Disk /dev/sdb: 10.7TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:?

Number ?Start ?End ?Size ?File system ?Name ?Flags

(parted) mkpart ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
Partition name? ?[]? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
File system type? ?[ext2]? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Start? 0.000 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
End? 9000000? ? ?先劃9000G練手? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? Ignore
(parted) p ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Model: Msft Virtual Disk (scsi)
Disk /dev/sdb: 10.7TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:?

Number ?Start ? End ? ? Size ? ?File system ?Name ?Flags
?1 ? ? ?17.4kB ?9000GB ?9000GB

(parted) quit ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
Information: You may need to update /etc/fstab.

三.查看分區結果
Fileserver:~ # fdisk -l
Disk /dev/sdb: 9.8 TiB, 10737418240000 bytes, 20971520000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7C734145-C793-4C60-BEB6-60BC58EA2BBA

Device ? ? Start ? ? ? ? End ? ? Sectors ?Size Type
/dev/sdb1 ? ? 34 17578125000 17578124967 ?8.2T Microsoft basic data

四.格式化分區
Fileserver:~ # mkfs.ext4 /dev/sdb1
mke2fs 1.42.11 (09-Jul-2014)
/dev/sdb1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Discarding device blocks: done ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Creating filesystem with 2197265620 4k blocks and 274661376 inodes
Filesystem UUID: d9848b2b-09d7-4c4d-95cf-ca5afdf1467a
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, 1934917632

Allocating group tables: done ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Writing inode tables: done ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: ??

五.擴容分區
Fileserver:~ # lsblk
NAME ? MAJ:MIN RM ?SIZE RO TYPE MOUNTPOINT
sdb ? ? ?8:16 ? 0 ?9.8T ?0 disk?
└─sdb1 ? 8:17 ? 0 ?8.2T ?0 part?

Fileserver:~ # parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Model: Msft Virtual Disk (scsi)
Disk /dev/sdb: 10.7TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:?

Number ?Start ? End ? ? Size ? ?File system ?Name ?Flags
?1 ? ? ?17.4kB ?9000GB ?9000GB ?ext4

(parted) rm 1 ? ? ? ? ?#刪除 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
(parted) p ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
Model: Msft Virtual Disk (scsi)
Disk /dev/sdb: 10.7TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:?

Number ?Start ?End ?Size ?File system ?Name ?Flags

(parted) mkpart opt 0.000 10000000 ? ? ? ? ? ? ?#創建 ? ? ? ? ? ? ? ? ? ? ? ? ??
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? Ignore ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
(parted) p ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Model: Msft Virtual Disk (scsi)
Disk /dev/sdb: 10.7TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:?

Number ?Start ? End ? ? Size ? ? File system ?Name ?Flags
?1 ? ? ?17.4kB ?10.0TB ?10000GB ?ext4 ? ? ? ? opt

(parted) q ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Information: You may need to update /etc/fstab.

Fileserver:~ # e2fsck -f /dev/sdb1 ? ? ? ? ? ? ? ? ?#檢查
e2fsck 1.42.11 (09-Jul-2014)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb1: 11/274661376 files (0.0% non-contiguous), 17356797/2197265620 blocks
Fileserver:~ # resize2fs /dev/sdb1 ? ? ? ? ? ? ? #擴展分區大小
resize2fs 1.42.11 (09-Jul-2014)
Resizing the filesystem on /dev/sdb1 to 2441406245 (4k) blocks.
The filesystem on /dev/sdb1 is now 2441406245 blocks long.

Fileserver:~ # lsblk
NAME ? MAJ:MIN RM ?SIZE RO TYPE MOUNTPOINT
sdb ? ? ?8:16 ? 0 ?9.8T ?0 disk?
└─sdb1 ? 8:17 ? 0 ?9.1T ?0 part?

六.加入/etc/fstab自動掛載
Fileserver:~ # blkid? ? ? ? ? ? ? #查看UUID
/dev/sda1: UUID="b73fc08c-5be7-4e57-8f96-95910dc78724" TYPE="swap" PARTUUID="000b0496-01"
/dev/sda2: UUID="2d34979e-fcfb-4966-b11b-7a76506c4850" TYPE="xfs" PARTUUID="000b0496-02"
/dev/sdb1: UUID="d9848b2b-09d7-4c4d-95cf-ca5afdf1467a" TYPE="ext4" PARTLABEL="opt" PARTUUID="9905a1e8-428b-45f8-9677-612b78fbe416"
Fileserver:~ ?# echo "UUID=d9848b2b-09d7-4c4d-95cf-ca5afdf1467a /app/files ext4 defaults 0 0" >> /etc/fstab

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/10597.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/10597.shtml
英文地址,請注明出處:http://en.pswp.cn/web/10597.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

使用html和css實現個人簡歷表單的制作

根據下列要求,做出下圖所示的個人簡歷(表單) 表單要求 Ⅰ、表格整體的邊框為1像素,單元格間距為0,表格中前六列列寬均為100像素,第七列 為200像素,表格整體在頁面上居中顯示; Ⅱ、前…

git提交代碼異常報錯error:bad signature 0x00000000

報錯信息 error:bad signature 0x00000000 異常原因 git 提交過程中異常關機或重啟,造成當前項目工程中的.git/index 文件損壞,無法提交 解決步驟 刪除.git/index文件 rm -f .git/index 重啟git git reset

Java 【數據結構】 哈希(Hash超詳解)HashSetHashMap【神裝】

登神長階 第十神裝 HashSet 第十一神裝 HashMap 目錄 👔一.哈希 🧥1.概念 🩳2.Object類的hashCode()方法: 👚3.String類的哈希碼: 👠4.注意事項: 🎷二.哈希桶 🪗1.哈希桶原理 &#x…

Bert基礎(二十二)--Bert實戰:對話機器人

一 、概念簡介 1.1 生成式對話機器人 1.1.1什么是生成式對話機器人? 生成式對話機器人是一種能夠通過自然語言交互來理解和生成響應的人工智能系統。它們能夠進行開放域的對話,即在對話過程中,機器人可以根據用戶的需求和上下文信息,自主地生成新的、連貫的回復,而不僅…

如何使用CertCrunchy從SSL證書中發現和識別潛在的主機名稱

關于CertCrunchy CertCrunchy是一款功能強大的網絡偵查工具,該工具基于純Python開發,廣大研究人員可以利用該工具輕松從SSL證書中發現和識別潛在的主機信息。 支持的在線源 該工具支持從在線源或給定IP地址范圍獲取SSL證書的相關數據,并檢索…

大數據測試

1、前言 大數據測試是對大數據應用程序的測試過程,以確保大數據應用程序的所有功能按預期工作。大數據測試的目標是確保大數據系統在保持性能和安全性的同時,平穩無差錯地運行。 大數據是無法使用傳統計算技術處理的大型數據集的集合。這些數據集的測試涉…

Foxmail使用經驗總結

本篇博客將詳盡講解如何利用Foxmail進行高效的郵件管理,以及一些實用的使用技巧,讓郵件管理變得更為高效和有序。 1. 賬戶設置與管理 多賬戶整合:Foxmail支持多個郵件賬戶同時管理,用戶可以將個人和工作郵箱整合在同一個界面&am…

實戰中使用 QEMU 進行內網穿透

前言 閱讀 https://xz.aliyun.com/t/14052 《使用 QEMU 進行內網穿透?》 https://securelist.com/network-tunneling-with-qemu/111803/ 《Network tunneling with… QEMU?》 我將此項技術應用到實戰中,取得不錯的效果,但是也遇到很多坑&am…

機器學習算法應用——樸素貝葉斯分類器

樸素貝葉斯分類器 樸素貝葉斯分類器(Naive Bayes Classifier)是一種基于貝葉斯定理和特征條件獨立假設的分類方法。它適用于分類任務,特別是文本分類、垃圾郵件識別等領域。 原理 樸素貝葉斯分類器基于以下兩個主要假設: 特征條…

JS_ES6(1)

作用域鏈: 作用域鏈是底層變量查找的機制:當函數執行時,優先查找當前函數作用域中有無需要用到的變量,如果找不到,逐級查找父級,直到全局 > 嵌套關系形成作用域鏈,同一作用域鏈從小到大查找…

taro3兼容支付寶/微信小程序的自定義拖拽排序組件

描述:列表可以完成拖拽排序 此組件是根據支付寶原生文檔改編成taro-vue3的形式,只保留了拖拽的部分,其他功能都去除了,測試下來可以兼容支付寶和微信小程序。 支付寶原生文檔: https://opendocs.alipay.com/support/…

BGP(border gateway protocol)邊界網關協議初識篇

BGP它是一種路徑矢量協議,用于決定數據包在互聯網中的最佳路徑。 1、工作原理: 自治系統(AS)間路由: BGP主要用于連接不同自治系統之間的路由器,其中每個自治系統(AS)代表一組具有共同路由的網…

編譯 fdk-aac

文章目錄 關于 fdk-aac編譯 fdk-aac在 FFMpeg 編譯中啟用 關于 fdk-aac A standalone library of the Fraunhofer FDK AAC code from Android. github : https://github.com/mstorsjo/fdk-aac代碼托管 : https://sourceforge.net/projects/opencore-am…

最新巨量X-Bogus、_signature參數逆向分析與算法還原

文章目錄 1. 寫在前面2. 接口分析3. 斷點分析4. 扣代碼補環境5. 數據解密 【🏠作者主頁】:吳秋霖 【💼作者介紹】:擅長爬蟲與JS加密逆向分析!Python領域優質創作者、CSDN博客專家、阿里云博客專家、華為云享專家。一路…

# 從淺入深 學習 SpringCloud 微服務架構(十六)

從淺入深 學習 SpringCloud 微服務架構(十六) 一、SpringCloudStream:自定義消息通道 1、在子工程 stream_product (子模塊)中,創建 自定義的消息通道類 MyProcessor.java /*** spring_cloud_demo\stream_product…

JavaEE概述 + Maven

文章目錄 一、JavaEE 概述二、工具 --- Maven2.1 Maven功能 倉庫 坐標2.2 Maven之項目構建2.3 Maven之依賴管理 三、插件 --- Maven Helper 一、JavaEE 概述 Java SE、JavaEE: Java SE:指Java標準版,適用于各行各業,主要是Java…

【負載均衡式在線OJ項目day5】OJ服務模塊概要

前言 經過四天的努力已經完成了編譯運行這個大模塊,今天將要進入OJ服務模塊設計,該模塊的本質就是建立一個小型網站 一.功能 為用戶提供題目列表頁面為用戶提供網站首頁(用題目列表充當首頁)為用戶提供指定題目的編輯頁面為用戶提供提交代碼判題功能&a…

FFmpeg常用API與示例(二)—— 解封裝與轉封裝

封裝層 封裝格式(container format)可以看作是編碼流(音頻流、視頻流等)數據的一層外殼,將編碼后的數據存儲于此封裝格式的文件之內。 封裝又稱容器,容器的稱法更為形象,所謂容器,就是存放內容的器具,飲料是內容&…

【QT學習】補充:qt使用已經存在的類

1.右鍵項目--》添加現有文件 注意:不是添加新文件!!! 2.添加配置

掌握Android Fragment開發之魂:Fragment的深度解析(上)

Fragment是Android開發中用于構建動態和靈活界面的基石。它不僅提升了應用的模塊化程度,還增強了用戶界面的動態性和交互性,允許開發者將應用界面劃分為多個獨立、可重用的部分,每個部分都可以獨立于其他部分進行操作。本文將從以下幾個方面深…