摘要: 现象:由于缓存会把内存资源用掉,但实际上文件操作已经完成,缓存已经用不到了。解决方法:(1)先使用sync指令,将所有未写的系统缓冲区写到磁盘中,否则可能丢失未保存的文件。 (2)echo 3 > /proc/sys/vm/drop_caches, 指令输入立即生效,可利用free -m 查看。 (系统默认值为0,表示不释放;1表示释放页缓存; 2表示释放dentries和inodes;3表示释放所有缓存) 阅读全文
posted @ 2012-12-14 21:55 poiqwe 阅读(273) 评论(0) 推荐(0) 编辑
摘要: (1)用ssh-keygen -t rsa 命令,在本地主机上创建公钥和密钥。(2)用ssh-copy-id -i /root/.ssh/id_rsa.pubroot@IP把公钥复制到远程主机上。可以加-i参数覆盖原来的authorized_key文件。 阅读全文
posted @ 2012-12-14 21:55 poiqwe 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 原因:无法将网卡eth1改为eth0解决方法: 方法1:删除文件/etc/udev/rules.d/***net.rules,重新加载网卡。 方法2:直接将文件/etc/udev/rules.d/***net.rules最后行中的eth1->eth0,重启系统即可。 阅读全文
posted @ 2012-12-14 21:54 poiqwe 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1、原因:guest的/etc/fstab文件编辑错误解决方法: 假设Guest的image文件位置为/root/xxx.img (1)RHEL5系列: $fdisk -lu /root/xx.img #查看image的各分区的起始位置 B=A*512 $mount -o loop,offset=B /root/xx.image /mnt #挂载Guest的根目录 $vi /mnt/etc/fstab #修改并保存/mnt/etc/fstab文件 $umount /mnt #umount挂载的Guest根目录 $reboot #重新启动Guest (2) RHEL6系列: $virt-edit 阅读全文
posted @ 2012-12-14 21:53 poiqwe 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 1:将multipath.conf文件拷贝到/etc目录下。#cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc2: 查看内置磁盘的id。#ll /dev/disk/by-id/(记录下内置磁盘的wwn后面显示的id,例如内置磁盘一块,为sda,sda的id为wwn-0x6003005700cc6930163daed3478a1c59 -> http://www.cnblogs.com/sda)3:修改/etc/multipath.conf文件,修改blacklist,将内置磁盘的id加入blacklis 阅读全文
posted @ 2012-12-14 21:52 poiqwe 阅读(963) 评论(0) 推荐(0) 编辑