centos7扩展磁盘空间
2015-10-19 15:52
627 查看
[root@hn ~]# fdisk /dev/sdb
The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
欢迎使用 fdisk (util-linux 2.23.2)。
更改将停留在内存中,直到您决定将更改写入磁盘。
使用写入命令前请三思。
命令(输入 m 获取帮助):n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
分区号 (2-4,默认 2):
起始 扇区 (476773168-976773167,默认为 476774400):
将使用默认值 476774400
Last 扇区, +扇区 or +size{K,M,G} (476774400-976773167,默认为 976773167):
将使用默认值 976773167
分区 2 已设置为 Linux 类型,大小设为 238.4 GiB
命令(输入 m 获取帮助):w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
正在同步磁盘。
[root@hn ~]# ll /dev/sd
sda sda1 sda2 sda3 sdb sdb1
[root@hn ~]# ll /dev/sdb
sdb sdb1
[root@hn ~]# ll /dev/sdb
sdb sdb1
[root@hn ~]# partprobe
[root@hn ~]# mkfs.xfs /dev/sdb1
mkfs.xfs: /dev/sdb1 appears to contain an existing filesystem (LVM2_member).
mkfs.xfs: Use the -f option to force overwrite.
[root@hn ~]# mkfs.xfs -f /dev/sdb1
meta-data=/dev/sdb1 isize=256 agcount=4, agsize=14899098 blks
= sectsz=4096 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=59596390, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal log bsize=4096 blocks=29099, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
欢迎使用 fdisk (util-linux 2.23.2)。
更改将停留在内存中,直到您决定将更改写入磁盘。
使用写入命令前请三思。
命令(输入 m 获取帮助):n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
分区号 (2-4,默认 2):
起始 扇区 (476773168-976773167,默认为 476774400):
将使用默认值 476774400
Last 扇区, +扇区 or +size{K,M,G} (476774400-976773167,默认为 976773167):
将使用默认值 976773167
分区 2 已设置为 Linux 类型,大小设为 238.4 GiB
命令(输入 m 获取帮助):w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
正在同步磁盘。
[root@hn ~]# ll /dev/sd
sda sda1 sda2 sda3 sdb sdb1
[root@hn ~]# ll /dev/sdb
sdb sdb1
[root@hn ~]# ll /dev/sdb
sdb sdb1
[root@hn ~]# partprobe
[root@hn ~]# mkfs.xfs /dev/sdb1
mkfs.xfs: /dev/sdb1 appears to contain an existing filesystem (LVM2_member).
mkfs.xfs: Use the -f option to force overwrite.
[root@hn ~]# mkfs.xfs -f /dev/sdb1
meta-data=/dev/sdb1 isize=256 agcount=4, agsize=14899098 blks
= sectsz=4096 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=59596390, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal log bsize=4096 blocks=29099, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
相关文章推荐
- CentOS下tar解压 gz解压 bz2等各种解压文件使用方法
- Linux下jboss6.1.0日志输出设置
- 查看linux中某个端口(port)是否被占用(netstat,lsof)
- linux lsof详解
- Linux epoll模型
- zabbix agent 监控Linux
- JDK安装与环境变量配置(linux)
- 每天一个linux命令(19):find 命令概览
- CentOS下用yum检查及安装VIM命令
- 查看linux中某个端口(port)是否被占用(netstat,lsof)
- CentOS7下yum安装SAMBA全命令过程
- Linux上安装JDK环境变量配置
- Linux Grub Rescue修复方法
- 在CentOS 7/6.5/6.4 中安装Java JDK
- CentOS6/7下安装PHP5.6
- Windows/Linux/Mac下myeclipse所有版本下载地址
- linux sed常用
- Linux进程同步之记录锁(fcntl)
- Linux下打包压缩成war包和解压war包
- Linux中如何去掉LCD上闪烁的光标