linux下如何挂载格式化内存卡,Linux下磁盘挂载格式化

Linux下磁盘挂载格式化

[日期:2007-07-11]

来源:Linux公社

作者:Linuxidc

[字体:大 中 小]

虚拟机上的 系统磁盘空间不足了的事情很容易发生, 这时可以通过增加虚拟磁盘的方法来扩充空间。

扩充空间后,需要到linux下去 mount一下, 通过一下步骤,就可以用了, 但我感觉奇怪的是, 为什么一挂载上去, 可用空间就变成0了?

[root@LINUX-AS3 root]# df

文件系统 1K-块 已用 可用 已用% 挂载点

/dev/hda2 5573968 5503612 0 100% /

/dev/hda1 101089 9361 86509 10% /boot

none 72540 0 72540 0% /dev/shm

[root@LINUX-AS3 root]# mount -f ext3 /hd1_dir

[root@LINUX-AS3 root]# df

文件系统 1K-块 已用 可用 已用% 挂载点

/dev/hda2 5573968 5503612 0 100% /

/dev/hda1 101089 9361 86509 10% /boot

none 72540 0 72540 0% /dev/shm

ext3 5573968 5503612 0 100% /hd1_dir

[root@LINUX-AS3 root]# umount ext3

umount: ext3: not found

umount: /hd1_dir: not mounted

[root@LINUX-AS3 root]# df

文件系统 1K-块 已用 可用 已用% 挂载点

/dev/hda2 5573968 5503612 0 100% /

/dev/hda1 101089 9361 86509 10% /boot

none 72540 0 72540 0% /dev/shm

[root@LINUX-AS3 root]# mount -f /dev/hda3 /hd1_dir

[root@LINUX-AS3 root]# df

文件系统 1K-块 已用 可用 已用% 挂载点

/dev/hda2 5573968 5503612 0 100% /

/dev/hda1 101089 9361 86509 10% /boot

none 72540 0 72540 0% /dev/shm

/dev/hda3 5573968 5503612 0 100% /hd1_dir

[root@LINUX-AS3 root]# cd /hd1_dir/

[root@LINUX-AS3 hd1_dir]# ls

[root@LINUX-AS3 hd1_dir]#

[root@LINUX-AS3 hd1_dir]# fdformat

usage: fdformat [ -n ] device

[root@LINUX-AS3 hd1_dir]# fdformat /hd1_dir/

/hd1_dir/: not a block device

[root@LINUX-AS3 hd1_dir]# fdformat /dev/hda3

Could not determine current format type: 无效的参数

[root@LINUX-AS3 hd1_dir]# man fdformat

[root@LINUX-AS3 hd1_dir]#

[root@LINUX-AS3 hd1_dir]# cd /hd1_dir/

[root@LINUX-AS3 hd1_dir]# ls

[root@LINUX-AS3 hd1_dir]# rm -rf *

[root@LINUX-AS3 hd1_dir]# df

文件系统 1K-块 已用 可用 已用% 挂载点

/dev/hda2 5573968 5503612 0 100% /

/dev/hda1 101089 9361 86509 10% /boot

none 72540 0 72540 0% /dev/shm

/dev/hda3 5573968 5503612 0 100% /hd1_dir

[root@LINUX-AS3 hd1_dir]# umount /hd1_dir/

umount: /dev/hda3: not mounted

[root@LINUX-AS3 hd1_dir]# df

文件系统 1K-块 已用 可用 已用% 挂载点

/dev/hda2 5573968 5503612 0 100% /

/dev/hda1 101089 9361 86509 10% /boot

none 72540 0 72540 0% /dev/shm

[root@LINUX-AS3 hd1_dir]# mount -f /dev/hdb1 /hd1_dir/

[root@LINUX-AS3 hd1_dir]# df

文件系统 1K-块 已用 可用 已用% 挂载点

/dev/hda2 5573968 5503612 0 100% /

/dev/hda1 101089 9361 86509 10% /boot

none 72540 0 72540 0% /dev/shm

/dev/hdb1 5573968 5503612 0 100% /hd1_dir

[root@LINUX-AS3 hd1_dir]# umount /hd1_dir/

umount: /dev/hdb1: not mounted

[root@LINUX-AS3 hd1_dir]# df

文件系统 1K-块 已用 可用 已用% 挂载点

/dev/hda2 5573968 5503612 0 100% /

/dev/hda1 101089 9361 86509 10% /boot

none 72540 0 72540 0% /dev/shm

[root@LINUX-AS3 hd1_dir]# mount -f /dev/sda1 /hd1_dir/

[root@LINUX-AS3 hd1_dir]# df

文件系统 1K-块 已用 可用 已用% 挂载点

/dev/hda2 5573968 5503616 0 100% /

/dev/hda1 101089 9361 86509 10% /boot

none 72540 0 72540 0% /dev/shm

/dev/sda1 5573968 5503616 0 100% /hd1_dir

[root@LINUX-AS3 hd1_dir]# mkfs.ext3 /dev/sda1

mke2fs 1.32 (09-Nov-2002)

mkfs.ext3: No such device or address while trying to determine filesystem size

[root@LINUX-AS3 hd1_dir]# df

文件系统 1K-块 已用 可用 已用% 挂载点

/dev/hda2 5573968 5503616 0 100% /

/dev/hda1 101089 9361 86509 10% /boot

none 72540 0 72540 0% /dev/shm

/dev/sda1 5573968 5503616 0 100% /hd1_dir

[root@LINUX-AS3 hd1_dir]# vi /etc/fstab

[root@LINUX-AS3 hd1_dir]#

[root@LINUX-AS3 hd1_dir]#

[root@LINUX-AS3 hd1_dir]# reboot

输了密码后进去了,但提示是 修复文件系统。0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值