[systemd-devel] systemd-nspawn -- bind multiple directories
To install a Fedora container from the raw image in my host Archlinux, I can do this: # systemd-nspawn -M Fedora-Cloud-Base-22_Beta-20150415.x86_64.raw -- bind=/var/lib/machines/enl:/mnt Now for the use of two btrfs subvol, I would like to bind /var/lib/machines/enl/{etc,var} Does the systemd bind options accept multi directories to bind? Soemthing like this : # systemd-nspawn -M Fedora-Cloud-Base-22_Beta-20150415.x86_64.raw -- bind=/var/lib/machines/enl:/mnt /var/lib/machines/enl/etc:/mnt/etc /var/lib/machines/enl/var:/mnt/var Thank you for hints -- google.com/+arnaudgabourygabx ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-nspawn -- bind multiple directories
On Mon, 27.04.15 10:19, arnaud gaboury (arnaud.gabo...@gmail.com) wrote: To install a Fedora container from the raw image in my host Archlinux, I can do this: # systemd-nspawn -M Fedora-Cloud-Base-22_Beta-20150415.x86_64.raw -- bind=/var/lib/machines/enl:/mnt Now for the use of two btrfs subvol, I would like to bind /var/lib/machines/enl/{etc,var} Does the systemd bind options accept multi directories to bind? Soemthing like this : # systemd-nspawn -M Fedora-Cloud-Base-22_Beta-20150415.x86_64.raw -- bind=/var/lib/machines/enl:/mnt /var/lib/machines/enl/etc:/mnt/etc /var/lib/machines/enl/var:/mnt/var You can specify --bind= multiple times in one command line to bind mount multiple directories. I have updated the man page now to explicit mention this. The command line you are using for is hence: # systemd-nspawn -M Fedora-Cloud-Base-22_Beta-20150415.x86_64.raw --bind=/var/lib/machines/enl:/mnt --bind=/var/lib/machines/enl/etc:/mnt/etc --bind=/var/lib/machines/enl/var:/mnt/var Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-nspawn -- bind multiple directories
On Mon, Apr 27, 2015 at 3:44 PM, Lennart Poettering lenn...@poettering.net wrote: On Mon, 27.04.15 10:19, arnaud gaboury (arnaud.gabo...@gmail.com) wrote: To install a Fedora container from the raw image in my host Archlinux, I can do this: # systemd-nspawn -M Fedora-Cloud-Base-22_Beta-20150415.x86_64.raw -- bind=/var/lib/machines/enl:/mnt Now for the use of two btrfs subvol, I would like to bind /var/lib/machines/enl/{etc,var} Does the systemd bind options accept multi directories to bind? Soemthing like this : # systemd-nspawn -M Fedora-Cloud-Base-22_Beta-20150415.x86_64.raw -- bind=/var/lib/machines/enl:/mnt /var/lib/machines/enl/etc:/mnt/etc /var/lib/machines/enl/var:/mnt/var You can specify --bind= multiple times in one command line to bind mount multiple directories. I have updated the man page now to explicit mention this. The command line you are using for is hence: # systemd-nspawn -M Fedora-Cloud-Base-22_Beta-20150415.x86_64.raw --bind=/var/lib/machines/enl:/mnt --bind=/var/lib/machines/enl/etc:/mnt/etc --bind=/var/lib/machines/enl/var:/mnt/var This features solved my issue regarding my Btrfs setting of three non nested volumes : rootvol, etc and var. Boot first the raw Fedora image, # mkdir -p /mnt/{etc,var}, log out then boot again when binding all three subvol. Lennart -- Lennart Poettering, Red Hat -- google.com/+arnaudgabourygabx ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-nspawn -- bind multiple directories
On Mon, Apr 27, 2015 at 3:44 PM, Lennart Poettering lenn...@poettering.net wrote: On Mon, 27.04.15 10:19, arnaud gaboury (arnaud.gabo...@gmail.com) wrote: To install a Fedora container from the raw image in my host Archlinux, I can do this: # systemd-nspawn -M Fedora-Cloud-Base-22_Beta-20150415.x86_64.raw -- bind=/var/lib/machines/enl:/mnt Now for the use of two btrfs subvol, I would like to bind /var/lib/machines/enl/{etc,var} Does the systemd bind options accept multi directories to bind? Soemthing like this : # systemd-nspawn -M Fedora-Cloud-Base-22_Beta-20150415.x86_64.raw -- bind=/var/lib/machines/enl:/mnt /var/lib/machines/enl/etc:/mnt/etc /var/lib/machines/enl/var:/mnt/var You can specify --bind= multiple times in one command line to bind mount multiple directories. I have updated the man page now to explicit mention this. The command line you are using for is hence: # systemd-nspawn -M Fedora-Cloud-Base-22_Beta-20150415.x86_64.raw --bind=/var/lib/machines/enl:/mnt --bind=/var/lib/machines/enl/etc:/mnt/etc --bind=/var/lib/machines/enl/var:/mnt/var Very good. Thank you for the hard job Lennart -- Lennart Poettering, Red Hat -- google.com/+arnaudgabourygabx ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel