Tadeusz
какие молодцы
# host -t NS openvz.org
openvz.org name server ns2.sw-soft.com.
openvz.org name server ns3.sw-soft.com.
openvz.org name server ns1.sw-soft.com.
# host ns1.sw-soft.com.
ns1.sw-soft.com has address 185.231.240.56
# host ns2.sw-soft.com.
ns2.sw-soft.com has address 185.231.240.57
# host ns3.sw-soft.com.
ns3.sw-soft.com has address 185.231.240.63
Засунем все в одну AS-ку
https://bgp.he.net/AS205040#_irr
и подключим через одного провайдера
https://bgp.he.net/AS205040#_graph4
что бы точно все сразу положить
Roman
Anonymous
Коллеги, добрый день.
А подскажите как постгрес поотлаживать? А то странная история. Выполняю скрипт на удалённой машине
/bin/bash /tmp/psqlenv.sh visyond RYETRRP6
Warning: Permanently added '138.197.107.221' (ECDSA) to the list of known hosts.
+ USER=visyond
+ DB=visyond
+ PASS=RYETRRP6
+ sudo -u postgres psql -c 'CREATE USER visyond PASSWORD '\''RYETRRP6'\'';'
+ sudo -u postgres psql -c 'ALTER USER visyond WITH ENCRYPTED PASSWORD '\''RYETRRP6'\'';'
+ sudo -u postgres psql -c 'CREATE SCHEMA visyond;'
+ sudo -u postgres psql -c 'DROP DATABASE visyond;'
ERROR: database "visyond" does not exist
CREATE ROLE
ALTER ROLE
CREATE SCHEMA
То есть мы видим в начале создание юзера, и на всякий случай установка пароля отдельной командой.
Но вот когда я пытаюсь с этими данными ломиться в постгре, получаю отлуп, что пароль не верен для юзера свежесозданного.
Daniel
Daniel
а в конфиге разрешено ли пользователю (этому или всем) с паролем по сеи приходить?
Anonymous
Если руками потом в консоли потсгре задаю паролдь этому юзеру той же командой из скрипта выше, пароль нормально сеттится и меня начинает пускать в потсгре. Потому и возник вопрос, что вроде как должно было отработать с первого раза, но этого не происходит почему-то.
Daniel
local же
Daniel
я вот думаю, что даже 127.0.0.1 - не local
Александр
🏳️ Phil
Daniel
так не бвает
Anonymous
Вот вот
Anonymous
Потому и спрашиваю, как бы это место поотлаживать?
Anonymous
Типа есть ли лог команд у псотгре или что-то в этом роде
🏳️ Phil
cache - это кеширование записи в памяти. я его включал до эпохи ssd для определенных виртуалок
Там их 4 штуки. И "none" это не то чтобы нет. Я не совсем понимаю, что они понимают под host page cache и отдельно writeback cache? И как это совместить с zvol .
In Red Hat Enterprise Linux 6, KVM and QEMU (the hardware emulator used by KVM) support the following caching modes for KVM guests:
writethrough
writethrough mode is the default caching mode. With caching set to writethrough mode, the host page cache is enabled, but the disk write cache is disabled for the guest. Consequently, this caching mode ensures data integrity even if the applications and storage stack in the guest do not transfer data to permanent storage properly (either through fsync operations or file system barriers). Because the host page cache is enabled in this mode, the read performance for applications running in the guest is generally better. However, the write performance might be reduced because the disk write cache is disabled.
writeback
With caching set to writeback mode, both the host page cache and the disk write cache are enabled for the guest. Because of this, the I/O performance for applications running in the guest is good, but the data is not protected in a power failure. As a result, this caching mode is recommended only for temporary data where potential data loss is not a concern.
none
With caching mode set to none, the host page cache is disabled, but the disk write cache is enabled for the guest. In this mode, the write performance in the guest is optimal because write operations bypass the host page cache and go directly to the disk write cache. If the disk write cache is battery-backed, or if the applications or storage stack in the guest transfer data properly (either through fsync operations or file system barriers), then data integrity can be ensured. However, because the host page cache is disabled, the read performance in the guest would not be as good as in the modes where the host page cache is enabled, such as writethrough mode.
unsafe
Caching mode of unsafe ignores cache transfer operations completely. As its name implies, this caching mode should be used only for temporary data where data loss is not a concern. This mode can be useful for speeding up guest installations, but you should switch to another caching mode in production environments.
Александр
host page cache - это hugepages на сколько я помню, а может и ошибаюсь.
🏳️ Phil
Александр
Александр
Under Linux, the Page Cache accelerates many accesses to files on non volatile storage. This happens because, when it first reads from or writes to data media like hard drives, Linux also stores data in unused areas of memory, which acts as a cache. If this data is read again later, it can be quickly read from this cache in memory. This article will supply valuable background information about this page cache.
Anonymous
Был какой-то чатик про базы. Забыл как называется
Александр
Александр
А вижу нашел уже)
Anonymous
@pgsql
Да, пасиб. ТОже нашёл его. Но я про него не знал, а спрашивал про общий чатик про базы. Ну да ладно. Надеюсь там чего подскажут
Александр
https://github.com/goq/telegram-list#Базы-Данных
Александр
Список каналов
Александр
))
Anonymous
Да да, там и нашёл =)
Tadeusz
Anonymous
Никак не могу разобраться откуда ноги растут. Что-то недоэкранировал чтоли?
Anonymous
При этом та же команда выполняется в консоли, но из скрипта не хочет =(
Anonymous
def sshRun(cmd): # NEED try for ssh
res = os.popen('ssh -o "StrictHostKeyChecking no" -o "ConnectTimeout 5" -o UserKnownHostsFile=/dev/null checkbranch@%s "%s"'%(ip, cmd)).read()
return res
...
print(sshRun("sed -i '1s/^/local all visyond md5\n/' /etc/postgresql/9.6/main/pg_hba.conf"))
Ну и результат
sed: -e expression #1, char 37: unterminated `s' command
Roman
https://blogs.akamai.com/2018/03/memcached-fueled-13-tbps-attacks.html
🏳️ Phil
Я тут с zvol еще завис. У меня zpool ashift 13. А что zvol как volblocksize выставлять? То что будет на стороне виртуалки? А там без вариантов - xfs не умеет больше pagesize, т.е. 4k
Tadeusz
кто подскажет как лечится database system was interrupted в pgsql?
Tadeusz
вариант с накаткой дампа не рассматривается 🙂
Tadeusz
* Error: /usr/lib/postgresql/10/bin/pg_ctl /usr/lib/postgresql/10/bin/pg_ctl start -D /var/lib/postgresql/10/main -l /var/log/postgresql/postgresql-10-main.log -s -o -c config_file="/etc/postgresql/10/main/postgresql.conf" exited with status 1:
2018-03-02 10:55:09.904 MSK [15637] LOG: listening on IPv4 address "0.0.0.0", port 5432
2018-03-02 10:55:10.814 MSK [15637] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2018-03-02 10:55:14.825 MSK [15638] LOG: database system was interrupted; last known up at 2018-03-02 07:14:23 MSK
pg_ctl: server did not start in time
simplemice.eth
я конечно не гуру, но что если потереть логи pg_resetxlog
Tadeusz
нет таких 🙂
Tadeusz
pg_resetxlog has been renamed to pg_resetwal.
Tadeusz
но и их нет 🙂
simplemice.eth
;)
simplemice.eth
магия
Tadeusz
мышь, аватара огонь!
Трайбор
пацаны, есть вопросик. Есть файл tar.bz2 на амазоне s3 размером 1 терабайт. Как-то возможно его в один пайп загнать чтобы у себя локально получать сразу исходное содержимое?
hdhog
у s3cmd была возможность сразу в пайп писать прочитанное
Трайбор
Denis 災 nobody
curl | tar -zx ... как-то так не работает?
Vlad
curl https://file.name | tar -xjpv
разве не поможет?
Denis 災 nobody
хотя не.. тар же составной архив, сделает сначала промежуточный по любому
Vlad
тар умеет на лету распаковывать без промежуточных архивов
Denis 災 nobody
какая опция?
Vlad
-xjpv
Denis 災 nobody
v verbose
j bzip2
x extract
p preserve permissions
Трайбор
так, спасибо, попробуем
Denis 災 nobody
Vlad
тар это архив на магнитной ленте, там только последовательное чтение/запись
Трайбор
мне интересно, а что насчет провеки целостности при таком варианте?
Denis 災 nobody
Vlad
поэтому там не может быть промежуточных файлов
Denis 災 nobody
сначала распаковка во временный .tar, потом его распаковка в файлы.
Vlad
и что? он сжимает блоками
Tadeusz
ленточные мастера подтянулись 🙂
Denis 災 nobody
я допускаю что он умеет без пром файла, но я сталкивался с тем что на этом пром кончалось место
Andrew
Добрый день
господа а есть тут те кто работает с redmine?
есть redmine 2.6
плагин spent_time
как добавить поле Spent Time в standard fields для трекера
чтоб потом можно было в workflow выставлять правила для этого поля?
Denis 災 nobody
и сильно помнится что mc распаковывает через отдельный файл
Tadeusz
Tadeusz
tar не сжимает)
Tadeusz
gzip тоже (блоками). xz так же, но там LZMA, LZMA оно другое
Denis 災 nobody
tar не сжимает)
технически можно ловить тар-поток и разбивать на блоки, которые сжимать, обратный процесс такой же. Если блок не равен всему файлу целиком )
Tadeusz
технически можно любой поток ловить 🙂
Tadeusz
|
Vlad
Vlad
зачем нужен mc ума не приложу