Lvm-mount-hack » История » Версия 1
Андрей Волков, 2015-05-05 13:27
1 | 1 | Андрей Волков | h1. Lvm-mount-hack |
---|---|---|---|
2 | |||
3 | |||
4 | h2. Смещение в байтах от начала диска. |
||
5 | |||
6 | pvs -o pv_name,pe_start,seg_size --units b |
||
7 | |||
8 | <pre> |
||
9 | PV 1st PE SSize |
||
10 | /dev/vda 1048576B 3221225472B |
||
11 | </pre> |
||
12 | |||
13 | PV_OFFSET=1048576 |
||
14 | SEG_SIZE=3221225472 |
||
15 | |||
16 | lvdisplay -m storage/root |
||
17 | |||
18 | h3. Важно, чтобы: |
||
19 | |||
20 | <pre> |
||
21 | Segments 1 |
||
22 | </pre> |
||
23 | |||
24 | h3. Данные для монтирования. |
||
25 | |||
26 | <pre> |
||
27 | --- Segments --- |
||
28 | Logical extent 0 to 767: |
||
29 | Type linear |
||
30 | Physical volume /dev/vda |
||
31 | Physical extents 0 to 767 |
||
32 | </pre> |
||
33 | |||
34 | START_SEG=0 |
||
35 | |||
36 | lvs --units b |
||
37 | |||
38 | <pre> |
||
39 | LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert |
||
40 | root storage -wi-ao---- 3221225472B |
||
41 | </pre> |
||
42 | |||
43 | BLK_SIZE=3221225472 |
||
44 | |||
45 | h2. Создание: |
||
46 | |||
47 | losetup -f -o $[${PV_OFFSET}+${SEG_SIZE}*${START_SEG}] --sizelimit ${BLK_SIZE} |