ユーザ用ツール

サイト用ツール


サイドバー



最近の更新



Tag Cloud

タグ#
9
10
1
3
1
2
17
7
1
1
4
13
4
1
2
291
1
8
2
7
17
5
1
30
3
3
1
6
1
1
45
1
3
3
1
1
1
1
1
1
33
46
7
9
10
7
10
3
3
2
9
2
2
6
8
1
1
5
10
4
3
3
2
1
8
2
4
1
6
30
2
12
2
3
1
1
2
3
1
1
2
4
3
2
4
2
2
1
1
2
1
2
1
2
1
27
2
1
2
2
2
1
1
2
3
16
5
8
1
1
2
14
2
6
1
2
12
1
3
1
1
4
11
1
6
2
1
6
1
3
3
11
1
2
1
1
10
3
1
16
3
1
5
1
2
1
1
2
9
2
2
3
2
1
3
1
2
1
2
2
2
1
2
3
1
4
3
4
1
3
1
3
3
2
1
1
30
1
3
3
1
1
1
3
5
1
36
2
3
2
1
2
2
3
1
1
1
4
1
2
1
3
1
1
1
2
5
2
5
2
1
1
1
5
3
2
4
2
1
2
1
20
1
1
3
4
1
1
2
1
1
2
1
1
1
1
2
1
1
1
1
1
11
6
1
3
1
1
3
1
1
1
1
2
1
1
1
1
1
1
2
1
1
1
1
1
06_virtualization:03_xen:01_xen_mount_lvm

01 lvmをマウント

①スナップショット作成

# lvcreate -s -n snapshot -L 5G /dev/disk.image

# lvdisplay /dev/disk.image
  --- Logical volume ---
  LV Name                /dev/disk.image
  VG Name                dg7tv18txypm17
  LV UUID                XmLioY-vRC4-3IJo-eT4u-S6ib-z7Je-cxAAjq
  LV Write Access        read/write
  LV snapshot status     source of
                         /dev/dg7tv18txypm17/snapshot [active]
  LV Status              available
  # open                 1
  LV Size                5.00 GB
  Current LE             1280
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:47

②マウント

普通にマウントしようとすると、エラーがでます。

# mount /dev/dg7tv18txypm17/snapshot /mnt/
mount: you must specify the filesystem type

①mapperを作成

# kpartx -p X -a /dev/dg7tv18txypm17/snapshot

②改めてマウント

# mount /dev/mapper/snapshotp1 /mnt/

③これで中身が見れる

# ll /mnt/
total 104
dr-xr-xr-x  2 root root  4096 Jul  4  2012 bin
dr-xr-xr-x  4 root root  4096 Jul  4  2012 boot
drwxr-xr-x  2 root root  4096 Sep 24  2011 cgroup
drwxr-xr-x  2 root root  4096 Jul  4  2012 dev
drwxr-xr-x 74 root root  4096 Mar 22 14:11 etc
drwxr-xr-x  3 root root  4096 Jul  4  2012 home
dr-xr-xr-x 10 root root  4096 Jul  4  2012 lib
dr-xr-xr-x  7 root root 12288 Jul  4  2012 lib64
drwx------  2 root root 16384 Jul 12  2011 lost+found
drwxr-xr-x  2 root root  4096 Sep 23  2011 media
drwxr-xr-x  2 root root  4096 Sep 23  2011 mnt
drwxr-xr-x  3 root root  4096 Jul  4  2012 opt
drwxr-xr-x  2 root root  4096 Jul 12  2011 proc
dr-xr-x---  5 root root  4096 Mar 22 14:10 root
dr-xr-xr-x  2 root root  4096 Jul  4  2012 sbin
drwxr-xr-x  2 root root  4096 Sep 23  2011 selinux
drwxr-xr-x  2 root root  4096 Sep 23  2011 srv
drwxr-xr-x  2 root root  4096 Jul 12  2011 sys
drwxrwxrwt  3 root root  4096 Mar 22 18:02 tmp
drwxr-xr-x 13 root root  4096 Dec 12  2011 usr
drwxr-xr-x 22 root root  4096 Jul  4  2012 var

③アンマウント

# umount /mnt/
# kpartx -p X -d /dev/dg7tv18txypm17/snapshot
# lvremove /dev/dg7tv18txypm17/snapshot
06_virtualization/03_xen/01_xen_mount_lvm.txt · 最終更新: 2016/05/17 16:02 by matsui

Yesterday:317 Today:126 Total:22898