CentOS7使用parted挂载大于2T本地硬盘卷组

挂载sdb
Last login: Thu Mar 14 15:29:45 2019 from 192.168….

[`root@ ~]# lsblk`

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 893.8G 0 disk
├─sda1 8:1 0 500M 0 part /boot
├─sda2 8:2 0 200G 0 part /
├─sda3 8:3 0 100G 0 part
├─sda4 8:4 0 1K 0 part
└─sda5 8:5 0 32G 0 part [SWAP]
sdb 8:16 0 25.5T 0 disk

[root@ ~]# fdisk -l

Disk /dev/sda: 959.7 GB, 959656755200 bytes, 1874329600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disk label type: dos
Disk identifier: 0x00032f40

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 420456447 209715200 83 Linux
/dev/sda3 420456448 630171647 104857600 83 Linux
/dev/sda4 630171648 1874329599 622078976 5 Extended
/dev/sda5 630175744 697284607 33554432 82 Linux swap / Solaris

Disk /dev/sdb: 28001.6 GB, 28001576157184 bytes, 54690578432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes

[root@ ~]# parted /dev/sdb

GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.

(parted) mklabel gpt  
                                              
(parted) p     

Model: AVAGO MR-SAS3316 (scsi)
Disk /dev/sdb: 28.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags

(parted) mkpart
Partition name?  []? data                                                 
File system type?  [ext2]? ext4                                           
Start? 0                                                                  
End? 100%            

Warning: The resulting partition is not properly aligned for best performance.

Ignore/Cancel? i                                                          
(parted) p     

Model: AVAGO MR-SAS3316 (scsi)
Disk /dev/sdb: 28.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 17.4kB 28.0TB 28.0TB data

扫描二维码关注公众号,回复: 6055714 查看本文章
(parted) q     

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

Start End Size Type Name
1 34 54690578398 25.5T Microsoft basic data
Partition 1 does not start on physical sector boundary.

[root@~]# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/sda2 197G 8.3G 179G 5% /
devtmpfs 63G 0 63G 0% /dev
tmpfs 63G 0 63G 0% /dev/shm
tmpfs 63G 59M 63G 1% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/sda1 477M 195M 253M 44% /boot
tmpfs 13G 12K 13G 1% /run/user/42
tmpfs 13G 0 13G 0% /run/user/0

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

mke2fs 1.42.9 (28-Dec-2013)
/dev/sdb1 alignment is offset by 244736 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=64 blocks, Stripe width=64 blocks
427270144 inodes, 6836322295 blocks
341816114 blocks (5.00%) reserved for the super user
First data block=0
208628 block groups
32768 blocks per group, 32768 fragments per group
2048 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, 1934917632,
2560000000, 3855122432, 5804752896

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

[root@ ~]# fdisk -l

Disk /dev/sda: 959.7 GB, 959656755200 bytes, 1874329600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disk label type: dos
Disk identifier: 0x00032f40

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 420456447 209715200 83 Linux
/dev/sda3 420456448 630171647 104857600 83 Linux
/dev/sda4 630171648 1874329599 622078976 5 Extended
/dev/sda5 630175744 697284607 33554432 82 Linux swap / Solaris
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sdb: 28001.6 GB, 28001576157184 bytes, 54690578432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disk label type: gpt
Disk identifier: AEAC8EF4-CF79-4A3B-BBD8-3214E6A096B6

Start End Size Type Name
1 34 54690578398 25.5T Microsoft basic data
Partition 1 does not start on physical sector boundary.
[root@bigdwebs36 ~]# mkdir /data
[root@bigdwebs36 ~]# mount /dev/sdb1 /data
[root@bigdwebs36 ~]# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/sda2 197G 8.3G 179G 5% /
devtmpfs 63G 0 63G 0% /dev
tmpfs 63G 0 63G 0% /dev/shm
tmpfs 63G 59M 63G 1% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/sda1 477M 195M 253M 44% /boot
tmpfs 13G 12K 13G 1% /run/user/42
tmpfs 13G 0 13G 0% /run/user/0
/dev/sdb1 26T 20K 25T 1% /data

[root@ ~]# blkid /dev/sdb1

/dev/sdb1: UUID=“a5c437f3-d3b2-4121-9e5f-b473fa7ab28a” TYPE=“ext4” PARTLABEL=“data” PARTUUID=“a862ee9c-5762-4a34-89cc-f192e3d8e231”

[root@ ~]# vi /etc/fstab

/etc/fstab

– INSERT –

/etc/fstab

Created by anaconda on Fri Nov 2 07:03:11 2018

Accessible filesystems, by reference, are maintained under ‘/dev/disk’

See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

UUID=0a498787-41ce-4a84-8090-7b4f22e2bf82 / ext4 defaults 1 1
UUID=19f92942-4801-4694-8df9-e6a829eb173e /boot ext4 defaults 1 2
UUID=789ae85f-aef8-4a12-99d9-2991ab86a009 swap swap defaults 0 0
UUID=a5c437f3-d3b2-4121-9e5f-b473fa7ab28a /data ext4 defaults 0 0

“/etc/fstab” 12L, 595C written

猜你喜欢

转载自blog.csdn.net/timonium/article/details/88556257