1 |
<h3>debian ext3-LVM-dsl notes</h3> |
2 |
|
3 |
Sebastian Utz [seut@netfrag.org] |
4 |
<hr/> |
5 |
|
6 |
Description: |
7 |
- install & configure pppoe(ADSL) |
8 |
- ext3 shortcuts |
9 |
- LVM (Logical Volume Manager) shortcuts |
10 |
|
11 |
|
12 |
FIRST CHECK if |
13 |
kernel with built-in(boot ext3 or lvm!) or module supported ext3 and lvm is running! |
14 |
|
15 |
- EXT3: |
16 |
- convert fs to ext3 |
17 |
tune2fs -j /dev/sdaXX |
18 |
- create new ext3-fs (normally already done in default-(guided)-setup) |
19 |
mke2fs -j /dev/sdaXX |
20 |
- auto-check-every-n-mounts/days/seconds |
21 |
tune2fs -i 0 /dev/sdaXX |
22 |
|
23 |
- Mouse: |
24 |
- Install packet "gpm" |
25 |
|
26 |
- ADSL: |
27 |
- Install packet "pppoe" and "pppoeconf" |
28 |
- Run "pppoeconf" or |
29 |
- Edit /etc/ppp/peers/dsl-provider (modify "user"-entry) |
30 |
- Edit /etc/ppp/pap-secrets (add entry) |
31 |
- Connect with "pon dsl-provider" or use start-stop script at /etc/init.d/ppp |
32 |
- Disconnect with "poff dsl-provider" or use start-stop script at /etc/init.d/ppp |
33 |
|
34 |
- LVM |
35 |
- install packet "lvm(>>0.9)" and "lvm-common" |
36 |
(currently not in the Debian/testing(woody) package-set, |
37 |
search it at the unstable sets!) |
38 |
|
39 |
- create LVM-partitions with "fdisk /dev/sdx" |
40 |
- "d" and partition-nr "y" for delete partition "sdxy" |
41 |
- "n" and parition-nr "y" for add partition "sdxy" |
42 |
- "t" partition-nr "y" and hex-code "8e" for |
43 |
change /dev/sdxy to LVM partition-type |
44 |
- "w" for write partition table and quit |
45 |
|
46 |
- do a "pvcreate /dev/sd[ce]1" |
47 |
For testing purposes you can use more than one partition on a disk. |
48 |
You should not use more than one partition because in the case of |
49 |
a striped LV you'll have a performance breakdown. |
50 |
|
51 |
- do a "vgcreate test_vg /dev/sd[ce]1" to create the new VG named "test_vg" |
52 |
which has the total capacity of both partitions. |
53 |
vgcreate activates (transfers the metadata into the LVM driver in the kernel) |
54 |
the new volume group too to be able to create LVs in the next step. |
55 |
|
56 |
- do a "lvcreate -L1500 -ntest_lv test_vg" to get a 1500MB linear LV named |
57 |
"test_lv" and it's block device special "/dev/test_vg/test_lv". |
58 |
|
59 |
Or do a "lvcreate -i2 -I4 -l1500 -nanother_test_lv test_vg" to get a 100 LE |
60 |
large logical volume with 2 stripes and stripesize 4 KB. |
61 |
|
62 |
- For example generate a ext3 filesystem in one LV with |
63 |
"mke2fs -j /dev/test_vg/test_lv" and mount it. |
64 |
|
65 |
- extend /dev/test_vg/test_lv to 1600MB with relative size by |
66 |
"lvextend -L+100 /dev/test_vg/test_lv" |
67 |
or with absolute size by |
68 |
"lvextend -L1600 /dev/test_vg/test_lv" |
69 |
|
70 |
- reduce /dev/test_vg/test_lv to 900 logical extents with relative extents by |
71 |
"lvreduce -l-700 /dev/test_vg/test_lv" |
72 |
or with absolute extents by |
73 |
"lvreduce -l900 /dev/test_vg/test_lv" |
74 |
|
75 |
- rename a VG by deactivating it with |
76 |
"vgchange -an test_vg" # only VGs with _no_ open LVs can be deactivated! |
77 |
"vgrename test_vg whatever" |
78 |
and reactivate it again by |
79 |
"vgchange -ay whatever" |
80 |
|
81 |
- rename a LV after closing it by |
82 |
"lvchange -an /dev/whatever/test_lv" # only closed LVs can be deactivated |
83 |
"lvrename /dev/whatever/test_lv /dev/whatever/whatvolume" |
84 |
or by |
85 |
"lvrename whatever test_lv whatvolume" |
86 |
and reactivate it again by |
87 |
"lvchange -ay /dev/whatever/whatvolume" |
88 |
|
89 |
- if you own Ted Tso's/Powerquest's resize2fs program, you are able to |
90 |
resize the ext2 type filesystems contained in logical volumes without |
91 |
destroyiing the data by |
92 |
"e2fsadm -L+100 /dev/test_vg/another_test_lv" |
93 |
|
94 |
|
95 |
<hr/> |
96 |
$Id: debian_ext3-LVM-dsl_notes.twingle,v 1.1 2003/03/13 22:32:47 jonen Exp $ |