Bug 1361043
Summary: | pivot_root: failed to change root from `.' to `old-root': Invalid argument | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Xibo Ning <xning> |
Component: | util-linux | Assignee: | Karel Zak <kzak> |
Status: | CLOSED NOTABUG | QA Contact: | qe-baseos-daemons |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.2 | CC: | fw.dmitrii, lpol |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-12-01 10:53:37 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Xibo Ning
2016-07-28 08:58:38 UTC
Hi, You may have some mounts with MS_SHARED so this is probably not a bug: Note 'shared' in the output: grep -iP '/ /\s' /proc/$$/mountinfo ... 25 0 252:1 / / rw,relatime shared:1 - ext4 /dev/mapper/my--vg-root rw,errors=remount-ro,data=ordered ... This will block you from using pivot_root, see linux/fs/namespace.c, pivot_root definition. The relevant kernel code (checks for IS_MNT_SHARED and returns EINVAL on failure): https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/namespace.c?h=v3.10#n2627 1da177e4c 1313 (Linus Torvalds 2005-04-16 15:20:36 -0700 3064) error = -EINVAL; 419148da6e 2627 (Al Viro 2011-11-24 19:41:16 -0500 3065) new_mnt = real_mount(new.mnt); 419148da6e 2628 (Al Viro 2011-11-24 19:41:16 -0500 3066) root_mnt = real_mount(root.mnt); 84d17192d2 2613 (Al Viro 2013-03-15 10:53:28 -0400 3067) old_mnt = real_mount(old.mnt); 84d17192d2 2614 (Al Viro 2013-03-15 10:53:28 -0400 3068) if (IS_MNT_SHARED(old_mnt) || fc7be130c7 2647 (Al Viro 2011-11-25 01:05:37 -0500 3069) IS_MNT_SHARED(new_mnt->mnt_parent) || fc7be130c7 2648 (Al Viro 2011-11-25 01:05:37 -0500 3070) IS_MNT_SHARED(root_mnt->mnt_parent)) b12cea9198 2603 (Al Viro 2011-03-18 08:55:38 -0400 3071) goto out4; If you do `unshare -m` before step 5 it should work just fine. -Dmitrii S. Yes, due to migration to systemd we use "shared" as the default propagation for mount points. |