Proxmox VE 4.3
10830 단어 proxmox
LVM-thin 중지
lvremove pve/data \
&& lvextend -l +100%FREE pve/root \
&& resize2fs /dev/pve/root
디스크 사용량# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/dm-0 131G 1.2G 124G 1% /
sources.list
/etc/apt/sources.list.d/pve-enterprise.list
- deb https://enterprise.proxmox.com/debian jessie pve-enterprise
+ deb http://download.proxmox.com/debian jessie pve-no-subscription
업데이트apt update && apt dist-upgrade -y && apt-get clean
자신의 필기
/etc/ssh/sshd_config
Port 22
#PasswordAuthentication yes
UseDNS no
memo# packages
apt install -y \
screen sshfs sudo logwatch mdadm
# 一般ユーザ作成しsudoできるように
ACCOUNT=user1
adduser ${ACCOUNT}
gpasswd -a ${ACCOUNT} sudo
# sshできるように
cd /home/${ACCOUNT}/
mkdir .ssh
vi /etc/pve/priv/authorized_keys
cp /etc/pve/priv/authorized_keys .ssh/authorized_keys
chown -R ${ACCOUNT}:${ACCOUNT} .ssh
# docker
wget -qO- get.docker.com | sudo sh
gpasswd -a ${ACCOUNT} docker
sh -c "wget -O /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/1.9.0-rc2/docker-compose-`uname -s`-`uname -m`"
chmod +x /usr/local/bin/docker-compose
# /etc/aliases
echo "root: ${ACCOUNT}+${HOSTNAME}@メールアドレス" >> /etc/aliases
newaliases
# logwatch
cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/
mkdir /var/cache/logwatch
sed -i -e 's/^Detail = Low/Detail = Med/' /etc/logwatch/conf/logwatch.conf
/etc/cron.daily/00logwatch
기타
기존 서버에서 구현
# sshfsで新サーバーの/var/lib/vz/dump/をマウントしbackup転送
sshfs -p 22 1.2.3.4:/var/lib/vz/dump /var/lib/vz/dump
소리 낼 때.apt install -y alsa-utils mpg321
gpasswd -a ユーザ audio
alsamixer
# mキーでミュート解除、上キーで音量を上げる
nfs# server
apt install -y nfs-kernel-server
echo "/mnt/nfs/ 192.168.0.64(rw,insecure,no_subtree_check,no_root_squash)" >> /etc/exports
exportfs -rav
# client
apt install -y nfs-common
mount -t nfs 192.168.0.61:/mnt/nfs /mnt
umount -f /mnt
## どうしてもumount出来ない場合
umount -f -l /mnt
rsync로 덤프 얻기
ssh-keygen
cat ~/.ssh/id_rsa.pub
연결 서버에서 다음 내용 준비from="192.168.11.11" ssh-rsa AAAAB3...(略)... user1@nas
소스 서버에 접속합니다.ssh/config 만들기Host server1
Port 22
User user1
IdentityFile ~/.ssh/id_rsa
mkdir ~/cron/
touch ~/cron/rsync_dump.sh
chmod +x ~/cron/rsync_dump.sh
~/cron/rsync_dump.sh#!/bin/sh
set -eu
FROM="server1"
rsync -a --delete \
--include="*.log" --include="*.lzo" --exclude="*" \
-e ssh ${FROM}:/var/lib/vz/dump/ ~/dump-${FROM}/
crontab30 2 * * 1 (cd ~/cron && ./rsync_dump.sh)
클러스터 정보
설치하다.
# fdisk -l /dev/cciss/c0d0
(略)
Device Start End Sectors Size Type
/dev/cciss/c0d0p1 34 2047 2014 1007K BIOS boot
/dev/cciss/c0d0p2 2048 262143 260096 127M EFI System
/dev/cciss/c0d0p3 262144 286611806 286349663 136.6G Linux LVM
디스크 사용량# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/dm-0 34G 1.2G 31G 4% /
메모리# free -m
total used free shared buffers cached
Mem: 7981 785 7195 41 15 123
-/+ buffers/cache: 646 7334
Swap: 4095 0 4095
lvm# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-a-tz-- 82.54g 0.00 0.43
root pve -wi-ao---- 34.00g
swap pve -wi-ao---- 4.00g
S.M.A.R.T. 대응 예
복구 실패 시 로그
(略)
extracting archive '/var/lib/vz/dump/vzdump-lxc-372-2016_10_02-08_53_15.tar.lzo'
lzop: <stdin>: Checksum error
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
TASK ERROR: command 'tar xpf /var/lib/vz/dump/vzdump-lxc-372-2016_10_02-08_53_15.tar.lzo --totals --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-xattr-write' -C /var/lib/lxc/372/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 2
LXC보다 KVM이 더 좋은 이유
LXC: SnapShot의 백업 검사
Reference
이 문제에 관하여(Proxmox VE 4.3), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/tukiyo3/items/b5e0e00f3a8ffd14f391텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)