public:a_perfect_btrfs_server
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| public:a_perfect_btrfs_server [2020/01/08 09:29] – [Install lxd] pcouderc | public:a_perfect_btrfs_server [2021/11/19 08:56] (Version actuelle) – [Initialize LXD] pcouderc | ||
|---|---|---|---|
| Ligne 40: | Ligne 40: | ||
| </ | </ | ||
| - | ===== Update init system | + | ===== Various inits |
| - | ... to allow boot in case of failure of one disk of the RAID1. | + | I suggest |
| - | + | ||
| - | Include ' | + | |
| - | < | + | |
| - | GRUB_CMDLINE_LINUX=" | + | |
| - | </ | + | |
| - | Then : | + | |
| - | < | + | |
| - | update-grub | + | |
| - | grub-install /dev/sda1 | + | |
| - | grub-install /dev/sdb1 | + | |
| - | </ | + | |
| - | And too replace " | + | |
| < | < | ||
| - | UUID=... / btrfs | + | Storage=persistent |
| </ | </ | ||
| + | See : https:// | ||
| ==== Add zram based swap ==== | ==== Add zram based swap ==== | ||
| Ligne 129: | Ligne 118: | ||
| < | < | ||
| lxc launch images: | lxc launch images: | ||
| + | lxc config device | ||
| + | lxc config set debian | ||
| + | |||
| lxc start debian | lxc start debian | ||
| lxc exec debian bash | lxc exec debian bash | ||
| Ligne 135: | Ligne 127: | ||
| It is possible to choose to work as root in the containers as they are isolated from the host. | It is possible to choose to work as root in the containers as they are isolated from the host. | ||
| - | === Backup containers | + | ==== Containers |
| - | + | === Backup === | |
| - | Store image : | + | |
| < | < | ||
| - | lxc stop pgsql | + | lxc export |
| - | lxc publish pgsql --alias pgsqlTC12 | + | |
| - | lxc start pgsql | + | |
| - | lxc export pgsqlTC12 . | + | |
| - | mv xxxxxxx.tar.gz pgsqlYC12.tar.gz | + | |
| </ | </ | ||
| - | Restore non testé | + | After import, the container is on stopped state : |
| < | < | ||
| - | lxc image import | + | lxc import |
| - | lxc init my-export NEW-CONTAINER | + | |
| </ | </ | ||
| + | === Use simple mail in server or containers === | ||
| + | == nullmailler == | ||
| + | Bien | ||
| + | == msmtp == | ||
| - | === Without snap === | + | < |
| + | apt install msmtp msmtp-mta | ||
| + | </ | ||
| + | Et / | ||
| - | Without snap, to keep lxd permanent, I did reboot and create | + | < |
| - | a / | + | account default |
| + | host 192.168.13.36 | ||
| + | auto_from off | ||
| + | from container_name@couderc.eu | ||
| + | syslog LOG_MAIL | ||
| + | </ | ||
| + | == Data access == | ||
| < | < | ||
| - | [Unit] | + | /var/snap/lxd/common/mntns/var/snap/lxd/common/lxd/storage-pools/default/containers/ |
| - | Description=LXD - main daemon | + | |
| - | After=lxcfs.service | + | |
| - | Requires=lxcfs.service | + | |
| - | + | ||
| - | [Service] | + | |
| - | EnvironmentFile=-/etc/environment | + | |
| - | ExecStartPre=/usr/lib/x86_64-linux-gnu/lxc/lxc-apparmor-load | + | |
| - | ExecStart=/ | + | |
| - | ExecStartPost=/usr/local/bin/lxd waitready --timeout=600 | + | |
| - | KillMode=process | + | |
| - | TimeoutStartSec=600s | + | |
| - | TimeoutStopSec=30s | + | |
| - | Restart=on-failure | + | |
| - | LimitNOFILE=1048576 | + | |
| - | LimitNPROC=infinity | + | |
| - | TasksMax=infinity | + | |
| - | + | ||
| - | [Install] | + | |
| - | WantedBy=multi-user.target | + | |
| - | Alias=lxd.service | + | |
| </ | </ | ||
| - | |||
| - | This service must be started. | ||
| - | |||
| ===== Maintenance ===== | ===== Maintenance ===== | ||
public/a_perfect_btrfs_server.1578475762.txt.gz · Dernière modification : de pcouderc
