LVM扩容
增加swap空间大小

linux/arch /home分区 扩容/扩展

xg posted @ 2012年11月26日 10:00 in linux with tags linux/arch /home分区 扩容/扩展 , 5431 阅读

今天在我的 virtuabox arch虚拟机下,发现挂在在/home上分区,空间有点不够,由于要装oracle11g吧;so想办法给扩容了一下;

第一步:给我.vdi的虚拟硬盘扩容了一下:仅一条命令

VBoxManage modifyhd <path to your vdi> --resize <new size in megabytes>

第二部:扩容分区

由于我没有使用lvm,所以扩起来有点麻烦:

root 用户下:

cp -a /home /opt/tmp/  ##备份/home分区

fdisk -l

mount

##查看 分区信息,以及文件类型

我的/home分区在 /dev/sda4上 so

fdisk /dev/sda

删除 sda4分区,重新分配一个主分区,空间比较大的,这里我给了8G,记住这里分配给分区标志符,我这里的主分区仍然是/dev/sda4

mkfs.ext2 /dev/sda4 ##格式化这个分区,注意正确的文件类型

vim /etc/fstab/ ##修改,重启后会自动挂载

这里可以用UUID来挂载分区

sudo blkid ## 查看 UUID

这里我碰到了一个问题,由于我没有直接修改/etc/fstab 就重启了,so,arch起来后,文件系统是只读,这是/etc/fstab 就无法直接修改了,从网上查了一下,解决办法:

(1)mount -w -o remount /

(2)然后通过 mount /dev/sda1 /mnt

然后就可以 修改 /etc/fstab

重启后,arch系统正常

将backup的 /home 重新复制 到 /home分区

Avatar_small
依云 说:
2012年11月26日 14:54

原来 VBoxManage 能修改磁盘大小啊,以后不用空间不足就加硬盘了 :-)
嗯不错,还有 --compact 命令。

Avatar_small
move in move out cle 说:
2019年9月16日 12:44

Ensuring the most levels associated with cleanliness at the property is actually our number 1 priority. It is because of this that we offer extensive training to the cleaners and make sure that they only use the safest and many environmentally pleasant cleaning brokers. To last the greatest, we go the additional mile to ensure even the littlest corner of your house is spick as well as span. Through grease elimination to vapor cleaning, being a disinfectant the lavatories to cleaning the porch rail, everything and much more are the main package. As a result, our house deep cleansing services consist of:

Avatar_small
cleaning companies i 说:
2022年1月27日 14:29

We notice that many home owners prefer to test a cleaning company as soon as before identifying if they’re the very best, most reliable choice for his or her cleaning requirements. Thankfully, our residential housekeepers undergo a comprehensive vetting process along with a thorough history check prior to training to become listed on our group.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter