CentOS7 mount 4TB disk

CentOS7 mount 4TB disk

I was helping a friend online to mount a disk on CentOS7.9, only to find that I had never mounted a single 4TB disk before. After all, I mostly use VPS and don't need such a large disk. The machine has 1TB+4TB by default, and the 1TB disk was used to install the system. Now I need to mount the 4TB disk on /home as a data disk. Out of inertia, I ran fdisk and found that there was only 2TB... Because the fdisk tool can only create a maximum of 2TB partitions, if it exceeds 2TB, you need to use the parted tool. Record it for convenience when you do it next time. ctrl+c.

The following figure shows that the partition was previously mounted using fdisk and only has 2TB. We first cancel the mount and then use the parted tool to recreate the partition.

Follow these steps:

 [root@localhost/]#parted /dev/sdb #Select hard disk (parted) mklabel gpt #Convert gpt partition (parted) mkpart prinmary 1 -1 #Divide into a zone (parted) print #Check partition status (parted) q #Exit***The following steps are the same as fdisk partition****
[root@localhost/]#lsblk #View partitions [root@localhost/]#mkfs.ext4 /dev/sdb1 #Format the disk as ext4
[root@localhost/]#mount /dev/sdb1 /home #Mount to /home
[root@localhost/]#vi /etc/fstab #Automatically mount at startup, add the following content /dev/sdb1 /home ext4 defaults 0 0
Or directly: echo "/dev/sdb1 /home ext4 defaults 0 0">> /etc/fstab

<<:  edgeNAT VPS 20% off for monthly payment and 30% off for annual payment, Hong Kong/Korea/US data centers available, top up 500 yuan and get 100 yuan free

>>:  RAKsmart: Popular cloud servers as low as 10% off $12.15/year or $2.49/month, bare metal servers $119/month, Japan/Hong Kong/US data centers

Recommend

With HTTP protocol, why do we need Websocket?

[[428410]] WebSocket is a full-duplex communicati...

Why Private LTE is a Smarter Choice than 5G

As connected technology continues to advance, bus...

Eight facts about data center design and construction

This article points out eight facts in data cente...

Active-active data centers are key to high-availability application resiliency

Enterprises that rely on high-availability applic...

Common WiFi Attacks and Detection

Common WiFi attacks under the 802.11 standard Tra...

Even monkeys can penetrate the intranet!

Hello, everyone, I am amazing. I recently turned ...

Enterprise router purchasing: Start by reviewing border routers

In the past, routers had only one purpose - to ro...

What do edge computing and 5G mean for the Internet of Things?

Most IoT architectures in the business world are ...

Japanese media: China may be the first to master 5G international standards

China, which has no say in almost all modern scie...