~ubuntu-branches/ubuntu/utopic/xfsprogs/utopic-proposed

« back to all changes in this revision

Viewing changes to doc/README.LVM

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2002-04-13 09:45:06 UTC
  • Revision ID: james.westby@ubuntu.com-20020413094506-t8dhemv41gkeg4kx
Tags: 2.0.3-1
New upstream bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
XFS on LVM
 
2
__________
 
3
 
 
4
PREFACE
 
5
 
 
6
This is a quick reference to setting XFS up on LVM. For more information
 
7
please see the LVM HOWTO at:
 
8
 
 
9
                http://www.linuxdoc.org/HOWTO/LVM-HOWTO.html
 
10
 
 
11
PREREQUISITES
 
12
 
 
13
You need a kernel with LVM support either built in or as a module.
 
14
This document assumes lvm as a module.
 
15
 
 
16
SETTING UP LVM
 
17
 
 
18
>>> Load module
 
19
 
 
20
      [root@crash /sbin]# modprobe lvm-mod
 
21
 
 
22
>>> Set partition type to 0x8e for partitions you wish to use with LVM
 
23
 
 
24
      [root@crash /sbin]# fdisk /dev/sda1
 
25
      Command (m for help): t
 
26
      Partition number (1-4): 1
 
27
      Hex code (type L to list codes): 8e
 
28
      Changed system type of partition 1 to 8e (Unknown)
 
29
 
 
30
      Command (m for help): w
 
31
      The partition table has been altered!
 
32
 
 
33
>>> Write PV superblock on physical volumes
 
34
 
 
35
      [root@crash /root]# pvcreate /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
 
36
      pvcreate -- physical volume "/dev/sda1" successfully created
 
37
      pvcreate -- physical volume "/dev/sdb1" successfully created
 
38
      pvcreate -- physical volume "/dev/sdc1" successfully created
 
39
      pvcreate -- physical volume "/dev/sdd1" successfully created
 
40
 
 
41
>>> Create a volume group consisting of the PVs we just set up
 
42
 
 
43
[root@crash /root]# vgcreate vg00 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
 
44
      vgcreate -- INFO: using default physical extent size 4 MB
 
45
      vgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte
 
46
      vgcreate -- doing automatic backup of volume group "vg00"
 
47
      vgcreate -- volume group "vg00" successfully created and activated
 
48
 
 
49
>>> Create a logical volume - striped across 4 PVs, 64 KB chunk size, 20 GB
 
50
 
 
51
[root@crash /root]# lvcreate -i 4 -I 64 -L 20G -n lv00 vg00
 
52
      lvcreate -- rounding 20971520 KB to stripe boundary size 20975616 KB / 5121 PE
 
53
      lvcreate -- doing automatic backup of "vg00"
 
54
      lvcreate -- logical volume "/dev/vg00/lv00" successfully created
 
55
 
 
56
>>> Build a filesystem on the LV
 
57
 
 
58
[root@crash /root]# mkfs -t xfs /dev/vg00/lv00 
 
59
      meta-data=/dev/vg00/lv00         isize=256    agcount=20, agsize=262144 blks
 
60
      data     =                       bsize=4096   blocks=5242879, imaxpct=25
 
61
               =                       sunit=0      swidth=0 blks, unwritten=1
 
62
      naming   =version 2              bsize=4096  
 
63
      log      =internal log           bsize=4096   blocks=1200
 
64
      realtime =none                   extsz=65536  blocks=0, rtextents=0
 
65
 
 
66
[root@crash /root]# mount -t xfs /dev/vg00/lv00 /xfs
 
67
 
 
68
>>> Go nuts
 
69
 
 
70
 
 
71
After a reboot you will need to reactivate the VGs/LVs:
 
72
 
 
73
      modprobe lvm-mod
 
74
      vgchange -a y
 
75
 
 
76
These commands could be added to a startup script.
 
77