[上課筆記] 切LVM

建立好一個LVM的Voluume Group之後,完成整個安裝來到了命令字元底下。圖然後其添加一個硬碟並想要加入到這個Group進行擴充,我們可以使用下列指令:


su /* 進入super root */
PVcreate /dev/hdb /* 初始化這顆硬碟也就是format他 */
vgextend LVM /dev/hdc /* 把這顆名叫hdc的硬碟加入到名為LVM的Volume Group */
lvextend -L+G /dev/LVM/LVM2 /* 增加/home空間1G,而這個在LVM內的VM空間,名字叫做LVM */
df /* 去查看你的檔案系統空間,發現沒有調整到,下一步 */
resize2fs /dev/LVM/LVM2 /* 通知檔案系統調整大小,通知位置在LVM內的LVM2位置
df /* 查看檔案系統空間,便可發現加大了 */




--------------Fedora---------------帳號root-----------------
adduser use1
passwd user1

/etc/init.d/network start|stop|restart /* Fedora */
/etc/init.d/networking start/stop/restart /* Debian */

工作終端機切換
{
文字模式----->ALT+F7------>圖形介面
Alt+F1~F6         Ctrl+Alt+F1~F6
}

收尋網路上的軟體並安裝&移除&更新
{
yum search vsftpd | more
yum install vsftpd
yum remove vsftpd
yum update
}


/////////////////////////////////////////
Repositpries軟體套件庫的位置
  Debian→/etc/apt/sources.list
  Fedora→/etc/yum.repos.d/fedora.repo
/////////////////////////////////////////
不知道這幹麻用的
  Debian→dpkg -l |more
  Fedora→rpm -ga |more
/////////////////////////////////////////
查安裝哪些檔案
  Debian→dpkg -L wget
  Fedora→rpm -gl psutils-1.17-30.fc11.i586
/////////////////////////////////////////
查來自哪裡
  Debian→dpkg -S /bin/ls
  Fedora→rpm -gf /bin/ls
/////////////////////////////////////////

留言