In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Storage partition mount
Storage description:
Huawei storage enclosure 36T, after the completion of raid 2.0, the actual use of about 20T, Huawei manufacturers are required to be divided into three disks: one 10T and two 5T.
When the storage disk of the manufacturer is finished, you need to restart the server reboot before you can see the drive letter in the fdisk-l command.
There are two commands for partitioning:
1. Fdisk: it can only be stored below 2T. More than 2T can mount the entire disk, but it cannot be partitioned.
2. Parted: it can be divided into more than 2T storage. It can be used more widely.
1.fdisk command: 1.1 fdisk partition
Fdisk / dev/sdb
1.2 formatted disk
Mkfs.ext3 / dev/sdb
Create the directory mkdir / oradata
1.3 Mount
Method 1: first mount and then add restart self-startup
Mount / dev/sdb / oradata
Vi / etc/fstab
Finally, add / dev/sdb / oradata default 0 0
Method 2: add restart self-boot before mounting
Vi / etc/fstab
Finally, add / dev/sdb / oradata default 0 0
Mount-a
1.4 View after the mount is completed
Df-h
2.parted command: 2.1View all disk status
[root@jetsen ~] # parted-l
2.2 use the parted tool to create partitions greater than 2T
[root@jetsen ~] # parted / dev/sde
GNU Parted 1.8.1-Software version number of Parted
Using / dev/sde-the following operation disk will be executed
Welcome to GNUParted! Type 'help' to view a list of commands. -Welcome message
(parted) mklabel-create create disk label
New disk labeltype? Gpt
(parted) p-View partition status
Model: VMware,VMware Virtual S (scsi)
Disk / dev/sde:2190GB
Sector size (logical/physical): 512B/512B
Partition Table:gpt
Number Start End Size File system Name Flags
(parted) mkpart
Partition name? []? Gpt2t-specify the partition name
File system type? [ext2] ext3-specify partition type
Start? 1-specify start position
End? 2190GB-specify the end position
(parted) P-display partition information
Model: VMware, VMware Virtual S (scsi)
Disk / dev/sde: 2190GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 2190GB 2190GB gpt2t
(parted) Q-quit
Information: Don't forget to update / etc/fstab, if necessary.
-prompt not to forget to update the / etc/fstab file
2.3Using parted tools to achieve multiple partitions on a single disk
[root@jetsen ~] # parted / dev/sdd
GNU Parted 1.8.1
Using / dev/sdd
Welcome to GNUParted! Type 'help' to view a list of commands.
(parted) p-list partition information
Error:Unable to open / dev/sdd-unrecognised disk label. -performance information cannot be listed because it is not labeled on disk.
(parted) mklabel-create disk label
New disk labeltype? Gpt-enter disk emoji name
(parted) p-list disk partitions again
Model: VMware,VMware Virtual S (scsi)-shows that the disk type is SCSI disk
Disk / dev/sdd:1100GB-disk size is 1100GB
Sector size (logical/physical): 512B/512B-sector size is 512B
Partition Table:gpt-shows that the signature is the name of the tag I just entered
Number Start End Size File system Name Flags-now it's a new hard drive and no partition has been created.
(parted) mkpart-create partition
Partitionname? []? Part1-specify the partition name
File systemtype? [ext2]? Ext2-define partition type
Start? 1G-specify starting position
End? 10G-specify the termination position
(parted) mkpart-create partition
Partitionname? []? Part2-specify the partition name
File systemtype? [ext2]? Ext2-define partition type
Start? 11G-specify starting position
End? 100g-specify the termination position
(parted) mkpart Partitionname []? Part3
File systemtype? [ext2]?
Start? 101g-specify the actual location of the partition
End?-1-specify to the end of the partition
(parted) p-display partition information
Model: VMware,VMware Virtual S (scsi)
Disk / dev/sdd:1100GB
Sector size (logical/physical): 512B/512B
Partition Table:gpt
Number Start End Size File system Name Flags-check the following three partitions
1 17.4kB 10.0GB 10000MB part1 2 10.0GB 100GB 90.0GB part2
3 100GB 1100GB 1000GB part3
(parted) rm 3-Delete partition 3
(parted) p-View partition status again
Model: VMware,VMware Virtual S (scsi)
Disk / dev/sdd:1100GB
Sector size (logical/physical): 512B/512B
Partition Table:gpt
Number Start End Size File system Name Flags-indicates that the partition was deleted successfully, leaving only two partitions
1 17.4kB 10.0GB 10000MB part1 2 10.0GB 100GB 90.0GB part2
(parted) quit
Information: Don'tforget to update / etc/fstab, if necessary.
[root@jetsen ~] # ls-l / dev/sdd*
Brw-r- 1 rootdisk 8, 48 May 10 16:48 / dev/sdd
Brw-r- 1 rootdisk 8, 49 May 10 16:48 / dev/sdd1
Brw-r- 1 rootdisk 8, 50 May 10 16:48 / dev/sdd2
2.4 deleting partitions through the parted tool
[root@jetsen ~] # parted / dev/sde
GNU Parted 1.8.1
Using / dev/sde
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: VMware, VMware Virtual S (scsi)
Disk / dev/sde: 2190GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 2190GB 2190GB gpt2t
(parted) rm 1-Delete Division 1
(parted) p-displays partition information. There are no partitions as shown below.
Model: VMware, VMware Virtual S (scsi)
Disk / dev/sde: 2190GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted) Q
Information: Don'tforget to update / etc/fstab, if necessary.
2.5 create a file system through the parted tool
[root@jetsen ~] # parted / dev/sdd-Select the disk to format
GNU Parted 1.8.1
Using / dev/sdd
Welcome to GNUParted! Type 'help' to view a list of commands.
(parted) mkfs 2ext3-formatted type is ext3 partition number is 2-
Warning: Theexisting file system will be destroyed and all data on the partition will
Be lost. Do youwant to continue?
Parted: invalidtoken: 2
Yes/No? Yes-reconfirm whether it is formatted
Partition number?2-enter the disk partition number again
File system? [ext2]?-the type of format
(parted)
2.6 check whether the formatting is successful:
(parted) p-check if the file system is formatted
Model: VMware,VMware Virtual S (scsi)
Disk / dev/sdd:1100GB
Sector size (logical/physical): 512B/512B
Partition Table:gpt
Number Start End Size File system Name Flags
1 17.4kB 10.0GB 10000MB part1
2 10.0GB 100GB 90.0GB ext2 part2-you can see that the file system type is ext2, but you can confirm that the file system has been formatted.
The mount method is the same as the fdisk command.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.