From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 To: sisyphus@lists.altlinux.org References: <4845368.31r3eYUQgx@hypatia.athena.gtsk> <4257083.LvFx2qVVIh@hypatia.athena.gtsk> <20200806121558.b8dd6a25ba1065440c5dcc95@altlinux.org> <4811418.jobW8qPuyK@yarilin> From: "Michael A. Kangin" Message-ID: <795082be-5024-536d-3f26-f0ff6325282a@complife.ru> Date: Wed, 23 Sep 2020 16:21:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <4811418.jobW8qPuyK@yarilin> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Language: ru-RU Content-Transfer-Encoding: 8bit Subject: Re: [sisyphus] =?utf-8?b?0L3RgyDQv9C+0LbQsNC70YPQudGB0YLQsC3Qv9C+0LY=?= =?utf-8?b?0LDQu9GD0LnRgdGC0LAt0L/QvtC20LDQu9GD0LnRgdGC0LAhIDop?= X-BeenThere: sisyphus@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Sisyphus discussions List-Id: ALT Linux Sisyphus discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 15:21:50 -0000 Archived-At: List-Archive: List-Post: On 8/27/20 8:09 PM, Gleb Kulikov wrote: >>>> Попробуйте свою схему на свежих ядрах с overlayfs. Там было много >>>> улучшений за прошедшее время, возможно, для ваших задач подойдёт. > > Нет, "прозрачная" работа с overlayfs невозможна: Что-то вы странное утверждаете. Вот, есть корень смонтированный по overlayfs, из кучи слоёв: overlay on / type overlay (rw,noatime,sync,lowerdir=/run/clb/clb-ramdisk/mount-points/.layer7:/run/clb/clb-ramdisk/mount-points/.layer6:/run/clb/clb-ramdisk/mount-points/.layer5:/run/clb/clb-ramdisk/mount-points/.layer4:/run/clb/clb-ramdisk/mount-points/.layer3:/run/clb/clb-ramdisk/mount-points/.layer2:/run/clb/clb-ramdisk/mount-points/.layer1,upperdir=/run/clb/clb-ramdisk/mount-points/.rw,workdir=/run/clb/clb-ramdisk/mount-points/.work) Ядро: Linux rescue-extra 4.18.0-147.5.1.el8_1.centos.plus.x86_64 #1 SMP Thu Feb 6 10:31:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux > 1. пробуем удалить файл, размещённый в r/o части: ошибка [root@rescue-extra ~]# ls -l /etc/nsswitch.conf -rw-r--r-- 1 root root 1516 Sep 27 2019 /etc/nsswitch.conf [root@rescue-extra ~]# rm -f /etc/nsswitch.conf [root@rescue-extra ~]# ls -l /etc/nsswitch.conf ls: cannot access '/etc/nsswitch.conf': No such file or directory Кроме того, "удалить" файл можно и вручную, создав в RW-слое нечто вроде mknod -m 000 myfile.txt c 0 0 > 2. пробуем создать файл, размещённый в глубине иерархии: ошибка [root@rescue-extra usr]# echo "test-test-test" > /usr/lib/python3.6/site-packages/pip/_vendor/chardet/__pycache__/myfile [root@rescue-extra usr]# sync [root@rescue-extra usr]# cat /usr/lib/python3.6/site-packages/pip/_vendor/chardet/__pycache__/myfile test-test-test > > самое главное, 3. пробуем отредактировать файл, размещённый в r/o части: > ошибка [root@rescue-extra etc]# tail -5 /etc/bashrc unset -f pathmunge fi fi # vim:ts=4:sw=4 [root@rescue-extra etc]# echo "alias do_test='echo test'" >> /etc/bashrc [root@rescue-extra etc]# tail -5 /etc/bashrc fi fi # vim:ts=4:sw=4 alias do_test='echo test'