1 |
wellsi |
1.1 |
Index: updates/storage/__init__.py |
2 |
|
|
=================================================================== |
3 |
|
|
RCS file: /cvsroot/smeserver/cdrom.image/sme9/updates/storage/__init__.py,v |
4 |
|
|
retrieving revision 1.3 |
5 |
|
|
retrieving revision 1.4 |
6 |
|
|
diff -u -r1.3 -r1.4 |
7 |
|
|
--- updates/storage/__init__.py 6 Nov 2013 02:06:23 -0000 1.3 |
8 |
|
|
+++ updates/storage/__init__.py 3 Dec 2013 04:09:59 -0000 1.4 |
9 |
|
|
@@ -918,7 +918,7 @@ |
10 |
|
|
vgnames = [vg.name for vg in self.vgs] |
11 |
|
|
if hn is not None and hn != '': |
12 |
|
|
if hn == 'localhost' or hn == 'localhost.localdomain': |
13 |
|
|
- vgtemplate = "VolGroup" |
14 |
|
|
+ vgtemplate = "main" |
15 |
|
|
elif hn.find('.') != -1: |
16 |
|
|
template = "vg_%s" % (hn.split('.')[0].lower(),) |
17 |
|
|
vgtemplate = safeLvmName(template) |
18 |
|
|
@@ -926,7 +926,7 @@ |
19 |
|
|
template = "vg_%s" % (hn.lower(),) |
20 |
|
|
vgtemplate = safeLvmName(template) |
21 |
|
|
else: |
22 |
|
|
- vgtemplate = "VolGroup" |
23 |
|
|
+ vgtemplate = "main" |
24 |
|
|
|
25 |
|
|
if vgtemplate not in vgnames and \ |
26 |
|
|
vgtemplate not in lvm.lvm_vg_blacklist: |
27 |
|
|
@@ -951,12 +951,12 @@ |
28 |
|
|
if mountpoint: |
29 |
|
|
# try to incorporate the mountpoint into the name |
30 |
|
|
if mountpoint == '/': |
31 |
|
|
- lvtemplate = 'lv_root' |
32 |
|
|
+ lvtemplate = 'root' |
33 |
|
|
else: |
34 |
|
|
if mountpoint.startswith("/"): |
35 |
|
|
- template = "lv_%s" % mountpoint[1:] |
36 |
|
|
+ template = "%s" % mountpoint[1:] |
37 |
|
|
else: |
38 |
|
|
- template = "lv_%s" % (mountpoint,) |
39 |
|
|
+ template = "%s" % (mountpoint,) |
40 |
|
|
|
41 |
|
|
lvtemplate = safeLvmName(template) |
42 |
|
|
else: |
43 |
|
|
@@ -964,13 +964,13 @@ |
44 |
|
|
if len([s for s in self.swaps if s in vg.lvs]): |
45 |
|
|
idx = len([s for s in self.swaps if s in vg.lvs]) |
46 |
|
|
while True: |
47 |
|
|
- lvtemplate = "lv_swap%02d" % idx |
48 |
|
|
+ lvtemplate = "swap%02d" % idx |
49 |
|
|
if lvtemplate in [lv.lvname for lv in vg.lvs]: |
50 |
|
|
idx += 1 |
51 |
|
|
else: |
52 |
|
|
break |
53 |
|
|
else: |
54 |
|
|
- lvtemplate = "lv_swap" |
55 |
|
|
+ lvtemplate = "swap" |
56 |
|
|
else: |
57 |
|
|
idx = len(vg.lvs) |
58 |
|
|
while True: |