日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux大硬盘格式化,linux 格式化大于2T的硬盘

發(fā)布時間:2025/3/20 linux 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux大硬盘格式化,linux 格式化大于2T的硬盘 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

2T以下的硬盤,分區(qū)類型多為MBR,但MBR的最大容量大約是2.15T,超過3T的硬盤必須用GPT格式。

1??選擇要格式化的硬盤

[root@quanzidian /]# parted /dev/sdb

GNU Parted 2.1

Using /dev/sdb

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

(parted)

2 ?選擇GPT類型

(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?

Yes/No?

3 ?然后輸入yes

(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?

Yes/No? yes

(parted)

4 ?將硬盤分成一個分區(qū)

(parted) mkpart prinmary 1 -1

(parted)

5 ?查看分區(qū)

(parted) print

Model: ATA HGST HUS724040AL (scsi)

Disk /dev/sdb: 4001GB

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

Partition Table: gpt

Number Start End Size File system Name Flags

1 1049kB 4001GB 4001GB ext2 prinmary

(parted)

6 ?退出分區(qū)

(parted) quit

Information: You may need to update /etc/fstab.

7 ?格式化文件系統(tǒng)為ext4

[root@quanzidian /]# mkfs.ext4 /dev/sdb1

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

244195328 inodes, 976754176 blocks

48837708 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

29809 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

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 26 mounts or

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

[root@quanzidian /]#

8 ?查看分區(qū)

[root@quanzidian /]# parted /dev/sdb print

Model: ATA HGST HUS724040AL (scsi)

Disk /dev/sdb: 4001GB

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

Partition Table: gpt

Number Start End Size File system Name Flags

1 1049kB 4001GB 4001GB ext4 prinmary

[root@quanzidian /]#

9 ?創(chuàng)建目錄

[root@quanzidian /]# mkdir /video

10 ?給目錄賦權(quán)限

[root@quanzidian /]# chmod 755 /video/

11 ?掛載硬盤

[root@quanzidian /]# mount /dev/sdb1 /video/

12 ?查看分區(qū)

[root@quanzidian /]# df -Hl

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/vg_quanzidian-lv_root

53G 3.8G 47G 8% /

tmpfs 2.0G 78k 2.0G 1% /dev/shm

/dev/sda2 500M 44M 430M 10% /boot

/dev/sda1 210M 271k 210M 1% /boot/efi

/dev/mapper/vg_quanzidian-lv_home

927G 76M 880G 1% /home

/dev/sdb1 4.0T 72M 3.8T 1% /video

[root@quanzidian /]#

13 ?設(shè)置開機啟動

[root@quanzidian /]# vi /etc/fstab

加入

/dev/sdb1 ? ? ? ? ? ? ? /video ? ? ? ? ? ? ? ? ?ext4 ? ?defaults ? ? ? ?0 0

wq ?保存退出

來源:oschina

鏈接:https://my.oschina.net/u/1012149/blog/737359

總結(jié)

以上是生活随笔為你收集整理的linux大硬盘格式化,linux 格式化大于2T的硬盘的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。