磁盘坏道检测工具1:
badblocks /dev/sdc1
磁盘坏到检测工具2:
sudo apt-get install smartmontools
DiskGenius 也行,一般有时间都会检测几次
HD Tune
------------------------------------------------------------------
libvirt:
service libvirtd stutas
service libvirtd start
/etc/init.d/libvirtd restart
-----------------------------------------------------------
检查kvm是否安装成功 ,成功则如下显示
lsmod | grep kvm
-----------------------------------------------------------
安装:
2T以上磁盘不能使用fdisk分区
参考:
http://blog.chinaunix.net/space.php?uid=21855486&do=blog&id=364699
操作方法:
testcloud@compute3:~$ sudo parted /dev/sdb
(parted) mklabel gpt
(parted) print
(parted) mkpart primary 0 2998961
(parted) print
(parted) gpt
(parted) quit
sudo parted -s /dev/sdb print
分区
sudo mkfs.ext4 /dev/sdb1
sudo fdisk -l
mount /dev/sdb1 /var/lib/libvirt/
sudo vi /etc/fstab
增加/dev/sdb1 /var/lib/libvirt ext4 defaults 0 2
删除pv:
vgreduce vg_compute3rhel6 unknown device
删除vg,
lvremove 删除lv
vgremove 删除 vg
-----parted分区之后的操作
创建pvs
sudo pvcreate /dev/sdb1
创建vgs
sudo vgcreate VolGroup00 /dev/sdb1
查看vgs大小
sudo vgdisplay VolGroup00 | grep "Total PE"
创建lvs
sudo lvcreate -l 715007 VolGroup00 -n LogVol00
安装格式化工具
sudo apt-get install reiserfsprogs
格式化磁盘
sudo mkfs.reiserfs /dev/VolGroup00/LogVol00
sudo mkdir /mnt/new
sudo mount /dev/VolGroup00/LogVol00 /mnt/new
sudo cp -rf /var/* /mnt/new/
sudo umount /dev/VolGroup00/LogVol00
sudo rm -rf /var/*
sudo mount /dev/new_vg/new_lv /var
增加磁盘空间:sudo kvm-img resize Win-2003-R2-x86_64-Test.img +250G
----------------------------------
设置桥接的网络配置:
auto eth0
iface eth0 inet static
auto br0
iface br0 inet static
address 192.168.77.103
netmask 255.255.255.0
broadcast 192.168.77.255
gateway 192.168.77.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
auto eth1
iface eth1 inet static
address 10.10.10.103
netmask 255.255.255.0
1.安装kvm
sudo apt-get -y install qemu-kvm --fix-missing
2.安装libvirt
sudo apt-get -y install libvirt-bin --fix-missing