Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

Amazon LinuxでOverlayFSを試してみる

More than 5 years have passed since last update.

Amazon Linux AMI 2015.09にて、OverlayFSが使えるのか、試してみました。

① t2.microにてLaunch後、アップデート

$ sudo yum clean all && sudo yum update

② /upper /lower /work /mergedディレクトリを作成

$ sudo mkdir /upper /lower /work /merged

③ マウント

$ sudo mount -t overlay overlay -olowerdir=/lower/,upperdir=/upper,workdir=/work /merged/

④ 確認

$ sudo touch /lower/lower.txt
$ sudo ls -l /upper /merged /lower
lower:
total 0
-rw-r--r-- 1 root root 0 Oct 12 05:17 lower.txt
merged/:
total 0
-rw-r--r-- 1 root root 0 Oct 12 05:17 lower.txt
upper/:
total 0
$ sudo touch merged/merged.txt
$ ls -l upper/ merged/ lower
lower:
total 0
-rw-r--r-- 1 root root 0 Oct 12 05:17 lower.txt
merged/:
total 0
-rw-r--r-- 1 root root 0 Oct 12 05:17 lower.txt
-rw-r--r-- 1 root root 0 Oct 12 05:33 merged.txt
upper/:
total 0
-rw-r--r-- 1 root root 0 Oct 12 05:33 merged.txt
$ sudo touch upper/upper.txt
$ ls -l upper/ merged/ lower
lower:
total 0
-rw-r--r-- 1 root root 0 Oct 12 05:17 lower.txt
merged/:
total 0
-rw-r--r-- 1 root root 0 Oct 12 05:17 lower.txt
-rw-r--r-- 1 root root 0 Oct 12 05:33 merged.txt
-rw-r--r-- 1 root root 0 Oct 12 05:33 upper.txt
upper/:
total 0
-rw-r--r-- 1 root root 0 Oct 12 05:33 merged.txt
-rw-r--r-- 1 root root 0 Oct 12 05:33 upper.txt

という感じですが、もう少し調査が必要です

参考

OverlayFSとは
https://www.kernel.org/doc/Documentation/filesystems/overlayfs.txt
Amazon Linux AMI 2015.09公開
http://aws.typepad.com/aws_japan/2015/09/now-available-amazon-linux-ami-2015-09.html

emai
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away