码迷,mamicode.com
首页 > 系统相关 > 详细

linux磁盘挂载

时间:2018-08-27 11:25:24      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:may   class   mount   extent   容量   version   针对   ges   size   

大部分机器是做的raid5和raid10,分别做了vd1:100G,vd2:其余容量(大于2T)。
针对大于2T的盘的挂载,可以参考下面的操作方法:
1、parted分区
parted /dev/sdb
GNU Parted 3.1
使用 /dev/sdb
Welcome to GNU Parted! Type help to view a list of commands.
(parted) mklabel gpt
警告: 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) mkpart primary 0-1
结束点?
结束点? y
错误: Invalid number.
(parted) mkpart primary 0 -1
警告: The resulting partition is not properly aligned for best performance.
忽略/Ignore/放弃/Cancel? Ignore
(parted) p
Model: DELL PERC H730 Mini (scsi)
Disk /dev/sdb: 4089GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
 
Number Start End Size File system Name 标志
1 17.4kB 4089GB 4089GB primary
 
(parted) quit

 

信息: You may need to update /etc/fstab.
2、格式化挂载:
mkfs.xfs /dev/sdb1
meta-data=/dev/sdb1 isize=256 agcount=4, agsize=249601962 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=998407847, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal log bsize=4096 blocks=487503, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@A06-R12-302F0412-I37-51 ~]# mkdir /export
[root@A06-R12-302F0412-I37-51 ~]# mount /dev/sdb1 /export/
[root@A06-R12-302F0412-I37-51 ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda2 84G 1.6G 83G 2% /
devtmpfs 63G 0 63G 0% /dev
tmpfs 63G 0 63G 0% /dev/shm
tmpfs 63G 9.0M 63G 1% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/sdb1 3.8T 33M 3.8T 1% /export
抓取磁盘的uuid,然后配置到fstab文件内
[root@A06-R12-302F0412-I37-51 ~]# blkid /dev/sdb1
/dev/sdb1: UUID="b1dc2ce3-c73c-404d-96fa-825bf2883a3c" TYPE="xfs" PARTLABEL="primary" PARTUUID="8f19fd33-a236-4f88-b58a-8e6a772d19d5"
[root@A06-R12-302F0412-I37-51 ~]# vim /etc/fstab
[root@A06-R12-302F0412-I37-51 ~]# cat /etc/fstab
 
#
# /etc/fstab
# Created by anaconda on Wed Sep 23 13:13:52 2015
#
# 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=114e0106-7682-49da-85dc-f3f915c60f20 / xfs defaults 0 0
UUID=b2556164-aa91-4753-9236-9690b5b1e40f swap swap defaults 0 0
UUID=b1dc2ce3-c73c-404d-96fa-825bf2883a3c /export xfs defaults 1 2

 

linux磁盘挂载

标签:may   class   mount   extent   容量   version   针对   ges   size   

原文地址:https://www.cnblogs.com/davygeek/p/9540762.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!