[arch-releng] [RFC] Switch from dm-snapshot to overlay
Hello Guys, what do you think about switching to overlay filesystem by default? This is already implemented around Jan 2015 of this year. Why?: * It seems the most "natural" way. * Low RAM usage if user wants do to some changes inside live-enviroment. * No crazy crashes if zero-free-space is reached (some bbs/wiki talks posts ask about this) There is at least two issues at boot time: (1) /var/log/journal: Cannot set file attribute for '/var/log/journal', value=0x00800000, mask=0x00800000: Inappropriate ioctl for device (2) /etc/machine-id: Failed to unmount transient /etc/machine-id file in our private namespace: Invalid argument (1) Does not care. (2) Unsure about it. The file has an "id" after bootup, maybe the most safe thing to do, is to generate machine-id at build time (or at initramfs), instead of just placing an empty file and generate an "id" at runtime (on switched-root). # hostnamectl Static hostname: archiso Icon name: computer-vm Chassis: vm Machine ID: b0e5ffa9728f421dacf4564936dce6e1 Boot ID: 92e4f6a2202f49798cb0e4782e791daf Virtualization: kvm Operating System: Arch Linux Kernel: Linux 4.1.2-2-ARCH Architecture: x86-64
Gerardo Exequiel Pozzi <vmlinuz386@gmail.com> on Sat, 2015/07/18 18:18:
Hello
Guys, what do you think about switching to overlay filesystem by default? This is already implemented around Jan 2015 of this year.
I do not care and I am fine with either of both. For my own project I do use one of both, depending on what matches my use case. So please keep support for dm-snapshot in archiso.
Why?: * It seems the most "natural" way. * Low RAM usage if user wants do to some changes inside live-enviroment. * No crazy crashes if zero-free-space is reached (some bbs/wiki talks posts ask about this)
There is at least two issues at boot time: (1) /var/log/journal: Cannot set file attribute for '/var/log/journal', value=0x00800000, mask=0x00800000: Inappropriate ioctl for device
Looks like overlayfs is missing some features compared to ext4 and friends. We had some changes in systemd about filesystem features lately, so is this still true? For live systems I tend to set some more journal configuration... What about adding something like this in /etc/systemd/journald.conf: [Journal] Storage=volatile SystemMaxUse=8M RuntimeMaxUse=8M
(2) /etc/machine-id: Failed to unmount transient /etc/machine-id file in our private namespace: Invalid argument
This happens even if you set the machine-id in initramfs. On an ext4-based machine I have: # systemctl status systemd-machine-id-commit.service ● systemd-machine-id-commit.service - Commit a transient machine-id on disk Loaded: loaded (/usr/lib/systemd/system/systemd-machine-id-commit.service; static; vendor preset: disabled) Active: inactive (dead) Condition: start condition failed at Thu 2015-07-30 08:29:45 CEST; 3h 19min ago ConditionPathIsMountPoint=/etc/machine-id was not met Docs: man:systemd-machine-id-commit.service(8) -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
Christian Hesse <list@eworm.de> on Thu, 2015/07/30 11:53:
Looks like overlayfs is missing some features compared to ext4 and friends.
https://bugs.launchpad.net/bugs/1411140 http://lists.freedesktop.org/archives/systemd-devel/2015-March/029163.html -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
On 07/30/2015 06:53 AM, Christian Hesse wrote:
Gerardo Exequiel Pozzi <vmlinuz386@gmail.com> on Sat, 2015/07/18 18:18:
Hello
Guys, what do you think about switching to overlay filesystem by default? This is already implemented around Jan 2015 of this year.
I do not care and I am fine with either of both.
For my own project I do use one of both, depending on what matches my use case. So please keep support for dm-snapshot in archiso.
Yes there are no plans in removing it.
Why?: * It seems the most "natural" way. * Low RAM usage if user wants do to some changes inside live-enviroment. * No crazy crashes if zero-free-space is reached (some bbs/wiki talks posts ask about this)
There is at least two issues at boot time: (1) /var/log/journal: Cannot set file attribute for '/var/log/journal', value=0x00800000, mask=0x00800000: Inappropriate ioctl for device
Looks like overlayfs is missing some features compared to ext4 and friends. We had some changes in systemd about filesystem features lately, so is this still true?
Should be fixed (read hidden), by latest 223 version.
For live systems I tend to set some more journal configuration... What about adding something like this in /etc/systemd/journald.conf:
[Journal] Storage=volatile SystemMaxUse=8M RuntimeMaxUse=8M
No problem, go ahead ;)
(2) /etc/machine-id: Failed to unmount transient /etc/machine-id file in our private namespace: Invalid argument
About this, I opened an issue here [#1] with some interesting comments from devs.
This happens even if you set the machine-id in initramfs. On an ext4-based machine I have:
# systemctl status systemd-machine-id-commit.service ● systemd-machine-id-commit.service - Commit a transient machine-id on disk Loaded: loaded (/usr/lib/systemd/system/systemd-machine-id-commit.service; static; vendor preset: disabled) Active: inactive (dead) Condition: start condition failed at Thu 2015-07-30 08:29:45 CEST; 3h 19min ago ConditionPathIsMountPoint=/etc/machine-id was not met Docs: man:systemd-machine-id-commit.service(8)
I do not see the relation here, no errors. In you case looks like not started. Thanks for your feedback Chris :) [#1] https://github.com/systemd/systemd/issues/729
Gerardo Exequiel Pozzi <vmlinuz386@gmail.com> on Thu, 2015/07/30 10:48:
On 07/30/2015 06:53 AM, Christian Hesse wrote:
Gerardo Exequiel Pozzi <vmlinuz386@gmail.com> on Sat, 2015/07/18 18:18:
(2) /etc/machine-id: Failed to unmount transient /etc/machine-id file in our private namespace: Invalid argument
About this, I opened an issue here [#1] with some interesting comments from devs.
Subscribed.
This happens even if you set the machine-id in initramfs. On an ext4-based machine I have:
# systemctl status systemd-machine-id-commit.service ● systemd-machine-id-commit.service - Commit a transient machine-id on disk Loaded: loaded (/usr/lib/systemd/system/systemd-machine-id-commit.service; static; vendor preset: disabled) Active: inactive (dead) Condition: start condition failed at Thu 2015-07-30 08:29:45 CEST; 3h 19min ago ConditionPathIsMountPoint=/etc/machine-id was not met Docs: man:systemd-machine-id-commit.service(8)
I do not see the relation here, no errors. In you case looks like not started.
True. Because it is from an ext4-based machine. ;) The unit is not startet because condition fails. With overlayfs the condition is always true, thus starts the unit and fails to unmount. -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
On 07/30/2015 11:46 AM, Christian Hesse wrote:
Gerardo Exequiel Pozzi <vmlinuz386@gmail.com> on Thu, 2015/07/30 10:48:
On 07/30/2015 06:53 AM, Christian Hesse wrote:
Gerardo Exequiel Pozzi <vmlinuz386@gmail.com> on Sat, 2015/07/18 18:18:
This happens even if you set the machine-id in initramfs. On an ext4-based machine I have:
# systemctl status systemd-machine-id-commit.service ● systemd-machine-id-commit.service - Commit a transient machine-id on disk Loaded: loaded (/usr/lib/systemd/system/systemd-machine-id-commit.service; static; vendor preset: disabled) Active: inactive (dead) Condition: start condition failed at Thu 2015-07-30 08:29:45 CEST; 3h 19min ago ConditionPathIsMountPoint=/etc/machine-id was not met Docs: man:systemd-machine-id-commit.service(8)
I do not see the relation here, no errors. In you case looks like not started.
True. Because it is from an ext4-based machine. ;)
The unit is not startet because condition fails. With overlayfs the condition is always true, thus starts the unit and fails to unmount.
hehe, yeah this is on "normal" conditions. Your case, my case, most users case!, lol I had not paid enough attention to the condition.
Am 30.07.2015 um 11:53 schrieb Christian Hesse:
Looks like overlayfs is missing some features compared to ext4 and friends. We had some changes in systemd about filesystem features lately, so is this still true?
For live systems I tend to set some more journal configuration... What about adding something like this in /etc/systemd/journald.conf:
[Journal] Storage=volatile SystemMaxUse=8M RuntimeMaxUse=8M
We should definitely set Storage=volatile on a live system by default!
On 08/13/2015 04:59 AM, Thomas Bächler wrote:
Am 30.07.2015 um 11:53 schrieb Christian Hesse:
Looks like overlayfs is missing some features compared to ext4 and friends. We had some changes in systemd about filesystem features lately, so is this still true?
For live systems I tend to set some more journal configuration... What about adding something like this in /etc/systemd/journald.conf:
[Journal] Storage=volatile SystemMaxUse=8M RuntimeMaxUse=8M
We should definitely set Storage=volatile on a live system by default!
Yes, volatile is implemented since 2013 (previuosly was rm /var/log/journal...). What is proposed here is the *MaxUse ;)
Am 30.07.2015 um 11:53 schrieb Christian Hesse:
(2) /etc/machine-id: Failed to unmount transient /etc/machine-id file in our private namespace: Invalid argument
This happens even if you set the machine-id in initramfs. On an ext4-based machine I have:
# systemctl status systemd-machine-id-commit.service ● systemd-machine-id-commit.service - Commit a transient machine-id on disk Loaded: loaded (/usr/lib/systemd/system/systemd-machine-id-commit.service; static; vendor preset: disabled) Active: inactive (dead) Condition: start condition failed at Thu 2015-07-30 08:29:45 CEST; 3h 19min ago ConditionPathIsMountPoint=/etc/machine-id was not met Docs: man:systemd-machine-id-commit.service(8)
Since this is a live system, we can simply mask this service to make the error go away - we don't need it.
On 08/13/2015 05:07 AM, Thomas Bächler wrote:
Am 30.07.2015 um 11:53 schrieb Christian Hesse:
(2) /etc/machine-id: Failed to unmount transient /etc/machine-id file in our private namespace: Invalid argument
This happens even if you set the machine-id in initramfs. On an ext4-based machine I have:
# systemctl status systemd-machine-id-commit.service ● systemd-machine-id-commit.service - Commit a transient machine-id on disk Loaded: loaded (/usr/lib/systemd/system/systemd-machine-id-commit.service; static; vendor preset: disabled) Active: inactive (dead) Condition: start condition failed at Thu 2015-07-30 08:29:45 CEST; 3h 19min ago ConditionPathIsMountPoint=/etc/machine-id was not met Docs: man:systemd-machine-id-commit.service(8)
Since this is a live system, we can simply mask this service to make the error go away - we don't need it.
Yes, or just wait for Linux-4.2 that seems to fix some overlayfs to make it more POSIX compliant.
On 07/18/2015 06:18 PM, Gerardo Exequiel Pozzi wrote:
Hello
Guys, what do you think about switching to overlay filesystem by default? This is already implemented around Jan 2015 of this year.
Why?: * It seems the most "natural" way. * Low RAM usage if user wants do to some changes inside live-enviroment. * No crazy crashes if zero-free-space is reached (some bbs/wiki talks posts ask about this)
There is at least two issues at boot time: (1) /var/log/journal: Cannot set file attribute for '/var/log/journal', value=0x00800000, mask=0x00800000: Inappropriate ioctl for device (2) /etc/machine-id: Failed to unmount transient /etc/machine-id file in our private namespace: Invalid argument
(1) Does not care. (2) Unsure about it. The file has an "id" after bootup, maybe the most safe thing to do, is to generate machine-id at build time (or at initramfs), instead of just placing an empty file and generate an "id" at runtime (on switched-root).
# hostnamectl Static hostname: archiso Icon name: computer-vm Chassis: vm Machine ID: b0e5ffa9728f421dacf4564936dce6e1 Boot ID: 92e4f6a2202f49798cb0e4782e791daf Virtualization: kvm Operating System: Arch Linux Kernel: Linux 4.1.2-2-ARCH Architecture: x86-64
archiso-23 now uses by default overlayfs, there are no warnings anymore with newer systemd-226 and linux-4.2. Old mode can be used with "mkarchiso ... -s img prepare".
participants (3)
-
Christian Hesse
-
Gerardo Exequiel Pozzi
-
Thomas Bächler