挂载xfs磁盘
# 磁盘初始化
[root@localhost ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them.
Be careful before using the write command. Command (m for help): p Disk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xfdf10f13 Device Boot Start End Blocks Id System Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-41943039, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039): 10G
Value out of range.
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039): +10G
Partition 1 of type Linux and of size 10 GiB is set Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (2-4, default 2): 2
First sector (20973568-41943039, default 20973568):
Using default value 20973568
Last sector, +sectors or +size{K,M,G} (20973568-41943039, default 41943039):
Using default value 41943039
Partition 2 of type Linux and of size 10 GiB is set Command (m for help): w
The partition table has been altered! Calling ioctl() to re-read partition table.
Syncing disks. # 磁盘格式化XFS
[root@localhost ~]# mkfs.xfs /dev/sdb2
meta-data=/dev/sdb2 isize=512 agcount=4, agsize=655296 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=2621184, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@localhost ~]# mkfs.xfs /dev/sdb1
meta-data=/dev/sdb1 isize=512 agcount=4, agsize=655360 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=2621440, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0 f[root@localhost ~]# blkid /dev/sdb1
/dev/sdb1: UUID="bb907eb7-27a4-4851-801e-77e6e22c84b9" TYPE="xfs"
[root@localhost ~]# blkid /dev/sdb2
/dev/sdb2: UUID="2595392c-1380-4e71-8c8a-dbd56b9f242e" TYPE="xfs"
[root@localhost ~]# # 使用UUID,是为了防止服务器重启磁盘设备名会变化
[root@localhost ~]# vim /etc/fstab #
# /etc/fstab
# Created by anaconda on Thu Mar 9 09:52:36 2017
#
# 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
#
/dev/mapper/cl-root / xfs defaults 0 0
UUID=9f06433e-f33c-457a-912e-fcbb8d3daef3 /boot xfs defaults 0 0
/dev/mapper/cl-swap swap swap defaults 0 0
UUID="bb907eb7-27a4-4851-801e-77e6e22c84b9" /data xfs defaults 0 0
UUID="2595392c-1380-4e71-8c8a-dbd56b9f242e" /backup xfs defaults 0 0 # 挂载
[root@localhost ~]# mount -a
# 检查
[root@localhost ~]# df -HT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/cl-root xfs 19G 1.5G 17G 9% /
devtmpfs devtmpfs 501M 0 501M 0% /dev
tmpfs tmpfs 512M 0 512M 0% /dev/shm
tmpfs tmpfs 512M 7.0M 506M 2% /run
tmpfs tmpfs 512M 0 512M 0% /sys/fs/cgroup
/dev/sda1 xfs 1.1G 146M 919M 14% /boot
tmpfs tmpfs 103M 0 103M 0% /run/user/0
/dev/sdb1 xfs 11G 34M 11G 1% /data
/dev/sdb2 xfs 11G 34M 11G 1% /backup
挂载xfs磁盘的更多相关文章
- Linux创建和挂载XFS文件系统测试实践
XFS文件系统简介 维基百科关于XFS的简介如下: XFS is a high-performance 64-bit 年,由Silicon Graphics为他们的IRIX操作系统而开发,是IRIX ...
- ECS Linux服务器xfs磁盘扩容
ECS Linux服务器xfs磁盘扩 ECS Linux服务器xfs磁盘使用阿里云官方提供的磁盘扩容方法扩容会有报错: [root@iZ28u04wmy2Z ~]# e2fsck /dev/xvdb1 ...
- KVM之XFS磁盘扩容
1.前言 根据目前我们使用的需求,以前规划的100G磁盘空间不够,这里将演示XFS文件系统的扩容,因为我使用的是KVM所以也会演示KVM的扩容方式. 2.KVM磁盘扩容 扩容前一定要先备份,或者做快照 ...
- Linux系统挂载新磁盘
执行df -h 查看已挂载磁盘 未能找到挂载磁盘 1)使用fdisk -l命令查看主机上的硬盘 红圈标志为后挂载的磁盘未能挂载 2)使用mkfs.ext4命令把硬盘格式化: mkfs.ext4 /de ...
- VirtualBox中挂载物理磁盘
注1. 详细内容请参考VirtualBox帮助文件. 注2. 需对dos命令有一定了解. 注3. 以下命令均需以管理员身份执行,VirtualBox也需以管理员身份运行. 主要应用host上的vbox ...
- 虚拟机中如何挂载物理磁盘(VMware操作)
测试的时候难免会遇到,从真是机器拷贝东西到虚拟机中,虽说安装了VMware tools(Vm→Install VMware tools...),就可以将文件直接拖到虚拟机里面去,但是这样拷贝总是需要花 ...
- Linux 在不重启的情况下识别新挂载的磁盘
在使用 Linux 时,有时候会因为初始时磁盘空间分配估计不足,使用中需要将挂载点扩容的情况,这就需要我们挂载新的磁盘.但是如果我们在 Linux 运行过程中挂载磁盘, Linux 又不能在不重启的情 ...
- HDFS免重启挂载新磁盘
背景 在生产环境中,集群节点磁盘大小不同,其使用率也会不同,HDFS虽有均衡策略,但也会有数据不平衡的情况,有些节点磁盘就会被打满,然后这个节点就不健康了(Unhealthy Nodes),Yarn的 ...
- Azure上如何在Linux下挂载数据磁盘
[原文首次发表于51cto http://cloudapps.blog.51cto.com/3136598/1653672] 在Azure上创建了虚拟机之后,我们在一些情况下会需要添加更多的数据磁盘来 ...
随机推荐
- Python 列表的操作
list基本操作 #coding=utf-8 #列表 string = 'list' #字符串->列表 list1 = list(string) # ['l', 'i', 's', 't'] # ...
- hdu1428(记忆化搜索)
题意:“他考虑从A区域到B区域仅当存在一条从B到机房的路线比任何一条从A到机房的路线更近(否则可能永远都到不了机房了…”这句话一定要理解清楚.就是说,对于当前位置,如果下一个状态与终点的最短距离大于或 ...
- 一款基于jquery超炫的弹出层提示消息
今天给大家带来一款基于jquery超炫的弹出层提示消息.这款实例页面初始时,一个go按钮.当单击go按钮时,提示强出层以动画形式出现.效果图如下: 在线预览 源码下载 实现的代码. html代码: ...
- php扩展安装
[root@129-2-10-2 src]# cat kuozhan.sh #!/bin/bash###install redis extend #########cd /usr/local/srct ...
- Java 07 example
留下两个例子作为参考, 1. 追逐小方块的例子 2. HashMap 和 Iterator 的例子 Example one: import acm.graphics.*; import acm.pro ...
- ASP.NET MVC4 异常拦截
ASP.NET MVC4 程序发生异常时,通过拦截Action的异常,重写ActionFilterAttribute 的方法OnActionExecuted实现. 具体实现代码如下: /// < ...
- 用javascript技术读取注册表中软件安装位置并启动本地软件
1.首先读取注册表中本地软件安装的位置,如果未安装则无就跳转到下载页面. 2.启动软件,关闭页面. 3.如报错提示. <SCRIPT language=javascript> <! ...
- C++ 运算符重载三(链式编程)
//运算符重载之链式编程 #include<iostream> using namespace std; //对于友元函数重载运算符只适用于左操作数是系统变量的场景 //因为成员无法在系统 ...
- MapReduce总体架构分析
转自:http://blog.csdn.net/Androidlushangderen/article/details/41051027 继前段时间分析Redis源码一段时间之后,我即将开始接下来的一 ...
- Hadoop周边生态软件和简要工作原理(一)
转自:http://www.it165.net/admin/html/201307/1531.html 基本都是在群里讨论的时候,别人问的入门问题,以后想到新的问题再补充进来.但是其实入门问题也很重要 ...