CentOS Mount Disk

查看disk

# lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda       8:0    0 447.1G  0 disk 
├─sda1    8:1    0     2G  0 part /boot
└─sda2    8:2    0 445.1G  0 part /
nvme0n1 259:0    0 931.5G  0 disk /disk/0
nvme1n1 259:1    0 931.5G  0 disk /disk/1

其中 sda 下 有两个分区,用作系统

sda       8:0    0 447.1G  0 disk 
├─sda1    8:1    0     2G  0 part /boot
└─sda2    8:2    0 445.1G  0 part /
# df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sda2      xfs       445G  9.1G  436G   3% /M
devtmpfs       devtmpfs  189G     0  189G   0% /dev
tmpfs          tmpfs     189G     0  189G   0% /dev/shm
tmpfs          tmpfs     189G   35M  189G   1% /run
tmpfs          tmpfs     189G     0  189G   0% /sys/fs/cgroup
/dev/sda1      xfs       2.0G  143M  1.9G   8% /boot
/dev/nvme0n1   ext4      917G  202G  669G  24% /disk/0
/dev/nvme1n1   ext4      917G  201G  670G  24% /disk/1
tmpfs          tmpfs      38G     0   38G   0% /run/user/0	

mount

# mkfs.ext4 /dev/nvme0n1
mke2fs 1.42.9 (28-Dec-2013)
Discarding device blocks: done                            
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
61054976 inodes, 244190646 blocks
12209532 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2392850432
7453 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

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


# mkdir -p /disk/0
# mount /dev/nvme0n1  /disk/0

你可能感兴趣的:(Linux)