1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ip netns execでmountエラーが発生する場合の回避策

Posted at

ChromebookのLinuxでip netns execするとmountエラーが発生しました。

$ cat /etc/debian_version 
11.2
$ 
$ sudo ip netns add host1
$ sudo ip netns exec host1 ip a
mount of /sys failed: Operation not permitted
$

以下のコマンドを実行すると回避出来ました。

$ sudo mkdir /sys2
$ sudo mount -t sysfs --make-private /sys2
$ sudo ip netns exec host1 ip a
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
$ 
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?