Merci a toi,
Bonne soirée
Dino
Le Jeudi 13 décembre 2018, Guillaume 'heraclide' Dondero a écrit :
Désolé pour troll3, fatigue, je m'arreterai en cours et finirai un autre soir ..
Voici le compte rendu :
# Le check :
root@troll3:~# df -h | grep lxc | awk '{ print "nice -n19 du -hs " $6 }' root@troll3:~# nice -n19 du -hs /var/lib/lxc/lists 1,3G /var/lib/lxc/lists root@troll3:~# nice -n19 du -hs /var/lib/lxc/people 2,7G /var/lib/lxc/people root@troll3:~# nice -n19 du -hs /var/lib/lxc/liberte0 1,8G /var/lib/lxc/liberte0 root@troll3:~# nice -n19 du -hs /var/lib/lxc/spip 790M /var/lib/lxc/spip root@troll3:~# nice -n19 du -hs /var/lib/lxc/spip2 632M /var/lib/lxc/spip2 root@troll3:~# nice -n19 du -hs /var/lib/lxc/bind 6,1G /var/lib/lxc/bind root@troll3:~# nice -n19 du -hs /var/lib/lxc/etherpad 1,4G /var/lib/lxc/etherpad root@troll3:~# nice -n19 du -hs /var/lib/lxc/bugzilla 1,4G /var/lib/lxc/bugzilla root@troll3:~# nice -n19 du -hs /var/lib/lxc/mastodon1 888M /var/lib/lxc/mastodon1 root@troll3:~# nice -n19 du -hs /var/lib/lxc/mail2 511M /var/lib/lxc/mail2 root@troll3:~# nice -n19 du -hs /var/lib/lxc/proxy2 1,6G /var/lib/lxc/proxy2 root@troll3:~# nice -n19 du -hs /var/lib/lxc/ethercalc2 1,2G /var/lib/lxc/ethercalc2 root@troll3:~# nice -n19 du -hs /var/lib/lxc/nextcloud 16G /var/lib/lxc/nextcloud
# actions sur le lvm
lvcreate -L20G -n lxc_bind troll3-vg lvcreate -L5G -n lxc_bugzilla troll3-vg lvcreate -L5G -n lxc_ethercalc2 troll3-vg lvcreate -L5G -n lxc_etherpad troll3-vg lvcreate -L5G -n lxc_liberte0 troll3-vg lvcreate -L5G -n lxc_lists troll3-vg lvcreate -L5G -n lxc_lstu troll3-vg lvcreate -L5G -n lxc_mail2 troll3-vg lvcreate -L5G -n lxc_mastodon1 troll3-vg lvcreate -L30G -n lxc_nextcloud troll3-vg lvcreate -L5G -n lxc_office troll3-vg lvcreate -L5G -n lxc_people troll3-vg lvcreate -L10G -n lxc_postgres troll3-vg lvcreate -L10G -n lxc_proxy2 troll3-vg lvcreate -L5G -n lxc_scrumblr troll3-vg lvcreate -L5G -n lxc_sondage troll3-vg lvcreate -L5G -n lxc_spip troll3-vg lvcreate -L5G -n lxc_spip2 troll3-vg lvcreate -L5G -n lxc_taiga troll3-vg lvcreate -L5G -n lxc_www-nginx troll3-vg lvcreate -L5G -n lxc_xmpp-1 troll3-vg
# init des filesystems
root@troll3:~# for c in $(ls /dev/troll3-vg/lxc_*); do mkfs.ext4 $c ; done
# montage
root@troll3:~# for c in $( lxc-ls ); do echo "mkdir -p /mnt/test/${c} && mount /dev/troll3-vg/lxc_${c} /mnt/test/${c}" ; done
# backup /etc/fstab cp /etc/fstab /etc/fstab.back
# migration
for c in $( lxc-ls ); do echo "lxc-stop --name $c && rsync -arpogvlH --progress --delete --numeric-ids /var/lib/lxc/${c}/ /mnt/test/${c}/ && umount /mnt/test/${c} && umount /var/lib/lxc/${c}/ && sed 's/^(.*lxc/${c}.*)$/#\1/' -i /etc/fstab && echo "/dev/troll3-vg/lxc_${c} /var/lib/lxc/${c} ext4 defaults 0 2"
/etc/fstab && mount /var/lib/lxc/${c} && lxc-start -n ${c} -d" ; done
J'ai fait :
- bind
- bugzilla
- ethercalc2
- etherpad
- liberte0
- mail2
- proxy2
Attention, dans le lot :
- certaines sont deja eteintes et pas filtrés par ma commande
- certaines ne sont pas sur du glusterfs mais directement dans le /var de troll3 et pour celle la, va falloir la jouer autrement ( ie, -umount +rm dir/* ) ;)
-- G. Dondero _______________________________________________ chatons mailing list chatons@lists.parinux.org https://lists.parinux.org/listinfo/chatons