虚拟内存20g4g磁盘20g多可以玩5g游戏吗,

升级win10专业版后8G内存只能用3G其他5G显示为硬件保留的内存(64位系统) - Microsoft Community
告知我们你对网站的体验
win8(64位系统)通过镜像升级为win10专业版(64位系统),突然发现内存占用比例很高,开虚拟机很容易卡住。后来查询很久后终于发现原来8G的内存竟只有3G内存可用。其他5G的内存显示为为硬件保留的内存。天啊我都把windows.old删掉不能还原回去了。请问有什么办法解,求救呀。。。。。。
已经试过的方法有:拨内存换到各个插槽。引导高级选项最大内存的勾去掉(这个方法重启会进不了系统导至无限重启)
注:操作系统百份百的64位系统,主板是技嘉的Z77-D3H win8时也是8G全可用的。独立显卡GTX650Ti(1G显存)
感谢您联系微软技术支持。
请问您是否有核心显卡和独立显卡两个显卡呢?如果有,建议您暂时禁用核心显卡。
由于Windows 10刚刚发布,一些硬件驱动与系统可能存在兼容性的问题。&
如您希望获取更快速响应的一对一Answer Desk服务,可以通过以下联系方式获取详情:联系电话&#62059 微软官方商城:http://t.cn/RL7ZPnB
这是否解决了你的问题?
抱歉,这没有帮助。
此回复已帮助 1 个人
问题已解决:运行——msconfig——引导——高级选项——最大内存(把这个勾去掉重启即可)
注:只要去掉勾即好,不要随便改里面的数值。否则有可能会导至重启后无法进入系统只能还原或重装(本人第一次不清楚改了数值结果系统就垮了)
这是否解决了你的问题?
抱歉,这没有帮助。
/12 中对 win10升级者 文章的回复
很高兴了解到您的问题已经得到解决。
感谢您对微软产品的支持。&
如您希望获取更快速响应的一对一Answer Desk服务,可以通过以下联系方式获取详情:联系电话&#62059 微软官方商城:http://t.cn/RL7ZPnB
这是否解决了你的问题?
抱歉,这没有帮助。
本站点的其他语言版本  不多说,直接上干货!
本博文的主要内容有
  .磁盘分区的概述
  .常用的磁盘管理工具
   & &./下分5G,给/home扩容
&  &.系统自带的fdisk和parted这两款工具
  .磁盘空间管理
  系统自带的fdisk和parted这两款工具,可以为我们提供更方便地对磁盘空间进行查看和管理的能力,也可以使用带-l选项的fdisk命令来查看某块磁盘上更新详细的信息。
磁盘分区的概述
  磁盘由两个分区组成,即分为主分区和扩展分区,扩展分区又可由多个逻辑分区组成。
   我们在安装linux系统时,若使用自动分区的方式进行磁盘分区,系统则将自动将分成两个分区,即根分区/和交换分区swap。交换分区的作用是充当虚拟内存,主要是物理内存不足时用于暂时对数据进行保存,并在需要时进行调用。由于交换分区只能用于暂时数据的存储,因此系统还必须有一股分区用于长期存储文件及数据。
  Linux系统下的磁盘类型有IDE和SCSI这两种。当然,这些磁盘设备也被映射到一个系统文件上。对于这两种磁盘的命名方式,IDE的命名方式采用/dec/hdx(x代表磁盘快),而其下的分区则是/dec/hdxy(y代表该磁盘块上的分区号).SCSI则采用/dev/sdx,其下的分区是/dev/sdxy。
  对于Linux的磁盘分区,至少要有/分区、boot分区和swap分区。否则,安装会受阻,考虑到实际的工作环境及后期对磁盘的维护(如后期磁盘空间需要扩容,在Linux系统下安装Oracle数据库)等。Linux磁盘分区的格式建议是LVM格式,而设计Oracle的安装时,swap分区往往与物理内存对应,因此在实际的工作环境下安装系统时应该做好分区工作。
& & & & & & 下载地址:
    磁盘管理工具是系统管理员需要经常使用的软件,是完成磁盘管理的重要手段。常用的磁盘管理工具包括:fdisk、Partition Magic、parted、mkfs和e2fsck。
& & & & & &使用partprobe重载分区也只能是对不同的硬盘才能及时生效。对于同一块硬盘,修改过分区信息后,必须重启系统才能使修改过的分区信息生效。(比如,SCSI硬盘和IDE硬盘。)
问题的描述
  可以看出,我的虚拟机里的这个系统,因之前,在安装分区时,未考虑周到,/home的容量太小了,现在,我想,希望从/下分5G容量给/home?
或者,新建一磁盘,来进行对分区的扩容。(实则,是想从/dev/sdb扩容5G到/dev/sda下的/home)。求解!!!
&  流程:添加磁盘 & -& & 使用fdisk创建磁盘分区 & -& &使用parted工具创建分区 & & -& & &挂载磁盘分区到系统&
  1、使用fdisk -l查询当前系统分区情况
[root@weekend110 ~]# df -h
Filesystem
Used Avail Use% Mounted on
1% /dev/shm
0 100% /home
0 100% /media/CentOS_6.5_Final
[root@weekend110 ~]# fdisk -l
Disk /dev/sda: 21.5 GB,
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000491de
Device Boot
Partition 1 does not end on cylinder boundary.
Partition 2 does not end on cylinder boundary.
Linux swap / Solaris
Partition 3 does not end on cylinder boundary.
[root@weekend110 ~]#
  可以看到新增加的sda磁盘还没有分区!!!
  重启机器,后,再次执行
[root@weekend110 ~]# df -h
Filesystem
Used Avail Use% Mounted on
1% /dev/shm
0 100% /home
[root@weekend110 ~]# fdisk -l
Disk /dev/sda: 21.5 GB,
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000491de
  想说的是,一看/dev/sda,就是原来的硬盘。
Device Boot
Partition 1 does not end on cylinder boundary.
Partition 2 does not end on cylinder boundary.
Linux swap / Solaris
Partition 3 does not end on cylinder boundary.
Disk /dev/sdb: 21.5 GB,
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x
想说的是,一看/dev/sda,就是新增的硬盘。
[root@weekend110 ~]# ll /dev/sd*
brw-rw----. 1 root disk 8, 0 Oct 18 20:04 /dev/sda
brw-rw----. 1 root disk 8, 1 Oct 18 20:04 /dev/sda1
brw-rw----. 1 root disk 8, 2 Oct 18 20:04 /dev/sda2
brw-rw----. 1 root disk 8, 3 Oct 18 20:04 /dev/sda3
brw-rw----. 1 root disk 8, 4 Oct 18 20:04 /dev/sda4
brw-rw----. 1 root disk 8, 5 Oct 18 20:04 /dev/sda5
brw-rw----. 1 root disk 8, 16 Oct 18 20:04 /dev/sdb
[root@weekend110 ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 21.5 GB,
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x
[root@weekend110 ~]#
  可见,该新增的磁盘/dec/sdb,上没有创建任何分区。
[root@weekend110 ~]# clear
[root@weekend110 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xace34bc7.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): m
Command action
a toggle a bootable flag
//设置可引导的标记
b edit bsd disklabel
    //修改bsd磁盘的标签
c toggle the dos compatibility flag
  //设置dos的兼容性
d delete a partition    //删除一个分区
l list known partition types    //列出分区类型
m print this menu    //显示帮助菜单
n add a new partition    //添加一个新的分区
o create a new empty DOS partition table    //创建一个新的、空的DOS分区表
p print the partition table    //显示当前的分区表
q quit without saving changes    //退出操作、不保存修改
s create a new empty Sun disklabel    //创建一个新的、空的Sun磁盘标签
t change a partition's system id    //更改系统分区id号
u change display/entry units    //更改显示记录
v verify the partition table    //对分区表进行验证
w write table to disk and exit    //退出并保存所做的修改
x extra functionality (experts only)    //特殊功能
Command (m for help):
2.创建主分区
&&&&&& 因为,新增磁盘,是sdb。
fdisk /dev/sdb
[root@weekend110 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xf5778f69.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
primary partition (1-4)
提示说,输入p
Command (m for help): n
Command action
primary partition (1-4)
Partition number (1-4): 1
First cylinder (1-2610, default 1): 1
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610): +10G
Command (m for help):
在输入结束柱面的这里如果你不知道该输入多大的数字,你可以输入+然后输入你要设的大小。这里我设置10G的主分区。
   &&输入p查看分区信息,可以看到刚创建的sdb1主分区。
Command (m for help): p        //查看当前分区表
Disk /dev/sdb: 21.5 GB,
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc0585a2e
Device Boot
Command (m for help):
Command (m for help): w
    //保存退出
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@weekend110 ~]#
3、创建扩展分区
Command (m for help): n
Command action
primary partition (1-4)
Partition number (1-4): 2
First cylinder (1307-2610, default 1307): 1307
Last cylinder, +cylinders or +size{K,M,G} (1307-2610, default 2610): 2610
Command (m for help): p        //查看当前的分区表
Disk /dev/sdb: 21.5 GB,
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc0585a2e
Device Boot
Command (m for help):
  图片上通过红色标注了操作步骤。可以看到当前已创建了sdb2扩展分区,柱面从,即将剩下的所有空间创建为扩展分区。
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@weekend110 ~]#
4.创建逻辑分区
Command (m for help): n
Command action
logical (5 or over)
primary partition (1-4)
First cylinder (1307-2610, default 1307): 1307
Last cylinder, +cylinders or +size{K,M,G} (1307-2610, default 2610): +2G
Command (m for help): n
Command action
logical (5 or over)
primary partition (1-4)
First cylinder (1569-2610, default 1569): 1560^H
Value out of range.
First cylinder (1569-2610, default 1569): 1569
Last cylinder, +cylinders or +size{K,M,G} (1569-2610, default 2610): 2610
Command (m for help): p
Disk /dev/sdb: 21.5 GB,
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc0585a2e
Device Boot
Command (m for help):
    总共创建了两个逻辑分区,逻辑分区默认从5开始,第一个逻辑分区大小2G,用来做交换分区用,剩下全部给sdb6.
Command (m for help): p
Disk /dev/sdb: 21.5 GB,
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xace34bc7
Device Boot Start End Blocks Id System
/dev/sdb1 1 1306 + 83 Linux
/dev/sdb2 1307 2610
5 Extended
/dev/sdb5 1307 1568 2104483+ 83 Linux
/dev/sdb6 1569 2610 8369833+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@weekend110 ~]#
5、修改文件类型ID
  因为默认分区id都是83即linux文件类型,现在将sdb5的文件类型ID改成82即交换分区。
Command (m for help): t
Partition number (1-6): 5
Hex code (type L to list codes): 82
Changed system type of partition 5 to 82 (Linux swap / Solaris)
Command (m for help): p
Disk /dev/sdb: 21.5 GB,
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc0585a2e
Device Boot
Linux swap / Solaris
Command (m for help):
6、保存退出
Command (m for help): m
Command action
toggle a bootable flag
edit bsd disklabel
toggle the dos compatibility flag
delete a partition
list known partition types
print this menu
add a new partition
create a new empty DOS partition table
print the partition table
quit without saving changes
create a new empty Sun disklabel
change a partition's system id
change display/entry units
verify the partition table
write table to disk and exit
extra functionality (experts only)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@weekend110 ~]#
7.格式化分区  接下来要对sdb的每一个分区进行格式化,  注意:扩展分区不需要进行格式
[root@weekend110 ~]# mkfs.ext4 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655776 inodes, 2622603 blocks
131130 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=
81 block groups
32768 blocks per group, 32768 fragments per group
8096 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first.
Use tune2fs -c or -i to override.
[root@weekend110 ~]#
[root@weekend110 ~]# mkfs.ext4 /dev/sdb1
[root@weekend110 ~]# mkfs -t ext4 /dev/sdb1
是等价的。
[root@weekend110 ~]# mkfs -t ext4 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655776 inodes, 2622603 blocks
131130 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=
81 block groups
32768 blocks per group, 32768 fragments per group
8096 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@weekend110 ~]#
[root@weekend110 ~]# mkfs.ext4 /dev/sdb6
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
523264 inodes, 2092458 blocks
104622 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=
64 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first.
Use tune2fs -c or -i to override.
[root@weekend110 ~]#
swap分区格式化要使用
mkswap /dev/sdb5
mkswap,是mkdir swap。
[root@weekend110 ~]# mkswap /dev/sdb5
Setting up swapspace version 1, size = 2104476 KiB
no label, UUID=d28dfa28-7303-463a-ae0c-b
[root@weekend110 ~]#
swapon /dev/sdb5
查看是否生效
[root@weekend110 ~]# swapon /dev/sdb5
[root@weekend110 ~]# swapon -s
[root@weekend110 ~]#
  可以看到sda3,和sdb5这两个swap分区。
8.挂载分区  &这里直接使用修改文件的方式永久挂载
创建挂载文件路径
mkdir sdb1 sdb6
[root@weekend110 ~]# mkdir sdb1 sdb6
[root@weekend110 ~]# df -h
Filesystem
Used Avail Use% Mounted on
1% /dev/shm
0 100% /home
[root@weekend110 ~]#
# /etc/fstab
# Created by anaconda on Mon Jul 18 18:45:01 2016
# 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=f664c4a8-f9ea-4999-b914-4071e8efdff2 /
UUID=2da787fb-94f8-4f6a-8d75-15d /boot
UUID=77fd7f45-c1e6-4014-a21e-75fe308e7edd /home
UUID=ea-450e-b2e7-ca329d379e05 swap
gid=5,mode=620
9.立即生效
[root@weekend110 ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).
As a result, it may not reflect all of your changes until after reboot.
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy).
As a result, it may not reflect all of your changes until after reboot.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).
/dev/sr0 has been opened read-only.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).
/dev/sr0 has been opened read-only.
Error: Invalid partition table - recursive partition on /dev/sr0.
[root@weekend110 ~]#
  在我的虚拟机上面无法立即生效,重启机器。
shutdown -r now
[root@weekend110 ~]# shutdown -r now
Broadcast message from root@weekend110
(/dev/pts/0) at 23:58 ...
The system is going down for reboot NOW!
[root@weekend110 ~]#
  没生效,那是因为,遇到了
  Error: Invalid partition table - recursive partition on /dev/sr0.
参考博客:
  决方法:执行partprobe&命令
  partprobe包含在parted的rpm软件包中。
  partprobe可以修改kernel中分区表,使kernel重新读取分区表。&
  因此,使用该命令就可以创建分区并且在不重新启动机器的情况下系统能够识别这些分区。
[root@weekend110 ~]# df -h
Filesystem
Used Avail Use% Mounted on
1% /dev/shm
0 100% /home
[root@weekend110 ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).
As a result, it may not reflect all of your changes until after reboot.
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy).
As a result, it may not reflect all of your changes until after reboot.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).
/dev/sr0 has been opened read-only.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).
/dev/sr0 has been opened read-only.
Error: Invalid partition table - recursive partition on /dev/sr0.
[root@weekend110 ~]# rpm -q parted
parted-2.1-21.el6.x86_64
[root@weekend110 ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).
As a result, it may not reflect all of your changes until after reboot.
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy).
As a result, it may not reflect all of your changes until after reboot.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).
/dev/sr0 has been opened read-only.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).
/dev/sr0 has been opened read-only.
Error: Invalid partition table - recursive partition on /dev/sr0.
[root@weekend110 ~]# mkfs -t ext4 /dev/sr0
mke2fs 1.41.12 (17-May-2010)
/dev/sr0 is entire device, not just one partition!
Proceed anyway? (y,n) y
/dev/sr0: Read-only file system while setting up superblock
[root@weekend110 ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).
As a result, it may not reflect all of your changes until after reboot.
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy).
As a result, it may not reflect all of your changes until after reboot.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).
/dev/sr0 has been opened read-only.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).
/dev/sr0 has been opened read-only.
Error: Invalid partition table - recursive partition on /dev/sr0.
[root@weekend110 ~]#
  出现这个问题,我查阅了一些资料,如
  主要是因为是使用的虚拟机,如果是直接在Linux系统上,不会出现这个问题。
  在虚拟机中把光驱移除后,重新进入虚拟机新建分区,并通过partprobe重载分区,就没有/dev/sr0 出现递归分区的错误信息了。
[root@weekend110 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 16G 3.7G 12G 25% /
tmpfs 931M 72K 931M 1% /dev/shm
/dev/sda1 194M 30M 155M 16% /boot
/dev/sda2 2.9G 2.3G 524M 82% /home
[root@weekend110 ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
  但是仍然提示重载分区不成功,提示设备或资源忙,需要重启生效。  直接格式化新建的分区,提示找不到新建的/dev/sdb分区。  重启系统后,在格式化新建的分区/dev/sdb,成功。
[root@weekend110 ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
[root@weekend110 ~]# mkfs -t ext4 /dev/sdb
//分区格式化
mke2fs 1.41.12 (17-May-2010)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
/dev/sdb is apparently in will not make a filesystem here!
再次尝试,
[root@weekend110 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 16G 3.7G 12G 25% /
tmpfs 931M 72K 931M 1% /dev/shm
/dev/sda1 194M 30M 155M 16% /boot
/dev/sda2 2.9G 2.3G 524M 82% /home
[root@weekend110 ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
[root@weekend110 ~]# mkfs -t ext4 /dev/sdb1
//格式化主分区
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655776 inodes, 2622603 blocks
131130 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=
81 block groups
32768 blocks per group, 32768 fragments per group
8096 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@weekend110 ~]# mkfs -t ext4 /dev/sdb5
mke2fs 1.41.12 (17-May-2010)
/dev/sdb5 is will not make a filesystem here!
[root@weekend110 ~]# mkfs -t ext4 /dev/sdb6
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
523264 inodes, 2092458 blocks
104622 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=
64 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@weekend110 ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
[root@weekend110 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 16G 3.7G 12G 25% /
tmpfs 931M 72K 931M 1% /dev/shm
/dev/sda1 194M 30M 155M 16% /boot
/dev/sda2 2.9G 2.3G 524M 82% /home
[root@weekend110 ~]#
  依然,还是解决不了。
[root@weekend110 ~]# mount /dev/sdb1 /home      //挂载分区/dev/sdb1到挂载点/home
[root@weekend110 ~]# mount
/dev/sda5 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
/dev/sda2 on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sdb1 on /home type ext4 (rw)
[root@weekend110 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 16G 3.7G 12G 25% /
tmpfs 931M 72K 931M 1% /dev/shm
/dev/sda1 194M 30M 155M 16% /boot
/dev/sda2 9.9G 151M 9.3G 2% /home
/dev/sdb1 9.9G 151M 9.3G 2% /home
[root@weekend110 ~]#
&  至于,删除磁盘分区,为什么呢?
  答:在实际工作中,我们需要创建的分区来存放不同的数据和文件。当这些数据不再需要时,这个专门存储这些数据和文件的分区几乎没有存在的意义。而对于这些没有存在意义的分区,则需要将其删除,方便管理分区。
  删除磁盘分区,很简单,这里不多赘述。
      后面我在自己实验室里,尝试成功。如下
磁盘空间管理
  不论是操作系统的磁盘空间有多大,在使用过程中可用空间总会不断减小,虽然在磁盘空间已满的情况下可把数据另存到其他的磁盘,但在实际的生产环境下,数据是连续的,因此对于某个位置下的数据,是不能将其中的某些部分移到其他的磁盘中存放的。
  要保证数据的连续性,而磁盘的可用空间又不断减少,虽然可用加磁盘,但并不能保证数据的连续性。而且对于海量的数据,仅靠单个磁盘的空间是不能存储的,即使使用多块磁盘拼接在一起形成RIAD即廉价磁盘冗余阵列,固定的磁盘空间也并不能无限地存储不断增长的数据。
  对于这个问题,在Linux系统中可以使用逻辑卷的方式来解决。Linux系统支持对逻辑卷空间不断地扩展,并且实现在线的方式扩展。
1、磁盘分区扩容
2、扩展交换分区空间
&参考博客:&&
欢迎大家,加入我的微信公众号:大数据躺过的坑& & & & 人工智能躺过的坑
同时,大家可以关注我的个人博客:
&&&http://www.cnblogs.com/zlslch/&&&和& &&&http://www.cnblogs.com/lchzls/& &&&&http://www.cnblogs.com/sunnyDream/& &
&&&详情请见:http://www.cnblogs.com/zlslch/p/7473861.html
  人生苦短,我愿分享。本公众号将秉持活到老学到老学习无休止的交流分享开源精神,汇聚于互联网和个人学习工作的精华干货知识,一切来于互联网,反馈回互联网。  目前研究领域:大数据、机器学习、深度学习、人工智能、数据挖掘、数据分析。 语言涉及:Java、Scala、Python、Shell、Linux等 。同时还涉及平常所使用的手机、电脑和互联网上的使用技巧、问题和实用软件。 只要你一直关注和呆在群里,每天必须有收获
& & & 对应本平台的讨论和答疑QQ群:大数据和人工智能躺过的坑(总群)()&
阅读(...) 评论()

我要回帖

更多关于 电脑20g内存 的文章

 

随机推荐