~ubuntu-branches/ubuntu/jaunty/ubuntu-docs/jaunty-proposed

« back to all changes in this revision

Viewing changes to serverguide/C/installation.xml

  • Committer: Bazaar Package Importer
  • Author(s): Matthew East
  • Date: 2009-02-15 11:50:28 UTC
  • Revision ID: james.westby@ubuntu.com-20090215115028-exdnd0gtie61uvn2
Tags: 9.04.2
* Various serverguide fixes:
  - Grammar error (LP: #203829) - Dean Sas
  - Fix mailman dependencies (LP: #291772) - Morten Siebuhr
  - CVS installation error (LP: #298605) - Thomas M
  - Postfox installation error (LP: #306289) - Adam Sommer
  - SSH update (LP: #311900) - Dean Sas
  - unzoo replaced by zoo (LP: #312506)
  - Samba instructions update (LP: #313232) - Adam Sommer
  - Clearer SSL instructions (LP: #314951) - Adam Sommer
  - LDAP error (LP: #319179) - Adam Sommer
  - MoinMoin installation fix (LP: #320840) - Adam Sommer
  - Postfix ssl improvements (LP: #323203) - Adam Sommer
  - Ebox instructions error (LP: #324399) - Dean Sas
  - Typo in openssh section (LP: #325828) - Dean Sas
  - Typo in samba section (LP: #285484) - Nick Ellery
  - SSHD fix (LP: #295279) - Adam Sommer
  - Jeos fix (LP: #307582) - Adam Sommer
  - Remove reference to ebox-all package (LP: #322367) - Adam Sommer

* Typo in "switching from windows" (LP: #309735)
* Broken link in "programming" (LP: #310081) - Jonathan Jesse
* lsb_release issue in "basic commands" (LP: #310713) - Thomas M
* Updating logout instructions (LP: #327060) - Dean Sas
* Updating all documents to use apt-url for installation instructions
* Refreshing pot files for Rosetta
* Recompress *.png files with 'advpng -z -4 file.png' to save space -  Sahak Petrosyan
* Improve instructions on pasting commands (LP: #185892) - Martin Mai
* Rewrite of networking instructions (LP: #298513, LP: #321308, LP: #314680, LP: #321179) - Dougie Richardson
* Amend punctuation of about-ubuntu (LP: #275592) - Dougie Richardson
* Documentation for automatic login (LP: #290467) - Dougie Richardson

Show diffs side-by-side

added added

removed removed

Lines of Context:
390
390
 
391
391
        <para>
392
392
        The RAID software included with current versions of Linux (and Ubuntu) is based on the <application>'mdadm'</application>
393
 
        driver and works very well, better even than many so-called 'hardware' RAID controllers. 
 
393
        driver and works very well, better even than many so-called 'hardware' RAID controllers.  This section will guide you 
 
394
        through installing Ubuntu Server Edition using two RAID1 partitions on two physical hard drives, one for 
 
395
        <emphasis>/</emphasis> and another for <emphasis>swap</emphasis>.
394
396
        </para>
395
397
 
396
398
        <sect3 id="raid-partitioning" status="review">
429
431
            <step>
430
432
 
431
433
              <para>
432
 
              Next, select the <emphasis>Size</emphasis> of the partition, then choose <emphasis>Primary</emphasis>,
433
 
              then <emphasis>Beginnning</emphasis>. 
 
434
              Next, select the <emphasis>Size</emphasis> of the partition.  This partition will be the <emphasis>swap</emphasis> partition,
 
435
              and a general rule for swap size is twice that of RAM.  Enter the partition size, then choose <emphasis>Primary</emphasis>,
 
436
              then <emphasis>Beginning</emphasis>. 
434
437
              </para>
435
438
 
436
439
            </step>
438
441
 
439
442
              <para>
440
443
              Select the <emphasis>"Use as:"</emphasis> line at the top.  By default this is 
441
 
              <emphasis role="italic">"Ext3 journaling file system"</emphasis>, change that to <emphasis>"physical volume for RAID"</emphasis>. 
442
 
              </para>
443
 
 
444
 
            </step>
445
 
            <step>
446
 
 
447
 
              <para>
448
 
              Repeat steps three through five for the other disks and partitions. 
 
444
              <emphasis role="italic">"Ext3 journaling file system"</emphasis>, change that to <emphasis>"physical volume for RAID"</emphasis>
 
445
              then <emphasis>"Done setting up partition"</emphasis>. 
 
446
              </para>
 
447
 
 
448
            </step>
 
449
            <step>
 
450
 
 
451
              <para>
 
452
              For the <emphasis>/</emphasis> partition once again select <emphasis>"Free Space"</emphasis> on the first drive then
 
453
              <emphasis>"Create a new partition"</emphasis>. 
 
454
              </para>
 
455
 
 
456
            </step>
 
457
            <step>
 
458
 
 
459
              <para>
 
460
              Use the rest of the free space on the drive and choose <emphasis>Continue</emphasis>, then <emphasis>Primary</emphasis>. 
 
461
              </para>
 
462
 
 
463
            </step>
 
464
            <step>
 
465
 
 
466
              <para>
 
467
              As with the swap partition, select the <emphasis>"Use as:"</emphasis> line at the top, changing it to 
 
468
              <emphasis>"physical volume for RAID"</emphasis> then choose <emphasis>"Done setting up partition"</emphasis>. 
 
469
              </para>
 
470
 
 
471
            </step>
 
472
            <step>
 
473
 
 
474
              <para>
 
475
              Repeat steps three through eight for the other disk and partitions. 
449
476
              </para>
450
477
 
451
478
            </step>
456
483
          <title>RAID Configuration</title>
457
484
 
458
485
          <para>
459
 
          With the partitions setup the array is ready to be configured:
 
486
          With the partitions setup the arrays are ready to be configured:
460
487
          </para>
461
488
 
462
489
          <procedure>
477
504
            <step>
478
505
 
479
506
              <para>
480
 
              Choose <emphasis>"Create new MD drive"</emphasis>.
 
507
              Choose <emphasis>"Create MD drive"</emphasis>.
481
508
              </para>
482
509
 
483
510
            </step>
484
511
            <step>
485
512
 
486
513
              <para>
487
 
              Select <emphasis>"RAID1"</emphasis>, or the type of RAID you want (RAID0 RAID1 RAID5).
 
514
              For this example, select <emphasis>"RAID1"</emphasis>, but if you are using a different setup choose the appropriate type 
 
515
              (RAID0 RAID1 RAID5).
488
516
              </para>
489
517
 
490
518
              <note>
514
542
 
515
543
              <para>
516
544
              Choose which partitions to use. Generally they will be sda1, sdb1, sdc1, etc. The numbers will usually match and the different 
517
 
              letters correspond to different hard drives.
 
545
              letters correspond to different hard drives.  
518
546
              </para>
519
547
 
520
548
              <para>
 
549
              For the <emphasis>swap</emphasis> partition choose <emphasis>sda1</emphasis> and <emphasis>sdb1</emphasis>.
521
550
              Select <emphasis>"Continue"</emphasis> to go to the next step.
522
551
              </para>
523
552
 
525
554
            <step>
526
555
 
527
556
              <para>
528
 
              Repeat steps <emphasis>three</emphasis> through <emphasis>seven</emphasis> with each pair of partitions you have created 
529
 
              (you may only have one pair).
 
557
              Repeat steps <emphasis>three</emphasis> through <emphasis>seven</emphasis> for the <emphasis>/</emphasis> partition choosing 
 
558
              <emphasis>sda2</emphasis> and <emphasis>sdb2</emphasis>.
530
559
              </para>
531
560
 
532
561
            </step>
553
582
            <step>
554
583
 
555
584
              <para>
556
 
              Select first RAID device partition. 
557
 
              </para>
558
 
 
559
 
            </step>
560
 
            <step>
561
 
 
562
 
              <para>
563
 
              Choose <emphasis>"Use as:"</emphasis>.  Then select <emphasis>"Ext3 journaling file system"</emphasis>, or whichever filesystem you 
564
 
              prefer. 
565
 
              </para>
566
 
 
567
 
            </step>
568
 
            <step>
569
 
 
570
 
              <para>
571
 
              If you selected Ext3, then select your mount point.  You can also create multiple partitions on one RAID device or use multiple RAID
572
 
              devices for different partitions.  As an example, if you only have one partition for choose <emphasis>"/"</emphasis> as the mount point.
573
 
              </para>
574
 
 
575
 
            </step>
576
 
            <step>
577
 
 
578
 
              <para>
579
 
              Repeat for any additional RAID devices. 
 
585
              Select the <emphasis>RAID1 device #0</emphasis> partition. 
 
586
              </para>
 
587
 
 
588
            </step>
 
589
            <step>
 
590
 
 
591
              <para>
 
592
              Choose <emphasis>"Use as:"</emphasis>.  Then select <emphasis>"swap area"</emphasis>, then 
 
593
              <emphasis>"Done setting up partition"</emphasis>.
 
594
              </para>
 
595
 
 
596
            </step>
 
597
            <step>
 
598
 
 
599
              <para>
 
600
              Next, select the <emphasis>RAID1 device #1</emphasis> partition. 
 
601
              </para>
 
602
 
 
603
            </step>
 
604
            <step>
 
605
 
 
606
              <para>
 
607
              Choose <emphasis>"Use as:"</emphasis>.  Then select <emphasis>"Ext3 journaling file system"</emphasis>.
 
608
              </para>
 
609
 
 
610
            </step>
 
611
            <step>
 
612
 
 
613
              <para>
 
614
              Then select the <emphasis>"Mount point"</emphasis> and choose <emphasis>"/ - the root file system"</emphasis>.
 
615
              Change any of the other options as appropriate, then select <emphasis>"Done setting up partition"</emphasis>.
580
616
              </para>
581
617
 
582
618
            </step>
821
857
            </listitem>
822
858
          </itemizedlist>
823
859
        </sect3>
824
 
      </sect2>       
 
860
      </sect2>  
 
861
      <sect2 id="lvm" status="review">
 
862
        <title>Logical Volume Manager (LVM)</title>
 
863
 
 
864
        <para>
 
865
        Logical Volume Manger, or <emphasis>LVM</emphasis>, allows administrators to create <emphasis>logical</emphasis> volumes out of
 
866
        one or multiple physical hard disks.  LVM volumes can be created on both software RAID partitions and standard partitions 
 
867
        residing on a single disk.  Volumes can also be extended, giving greater flexibility to systems as requirements change.
 
868
        </para>
 
869
 
 
870
        <sect3 id="lvm-overview" status="review">
 
871
          <title>Overview</title>
 
872
 
 
873
          <para>
 
874
          A side effect of LVM's power and flexibility is a greater degree of complication.  Before diving into the LVM installation process,
 
875
          it is best to get familiar with some terms.
 
876
          </para>
 
877
 
 
878
          <itemizedlist>
 
879
            <listitem>
 
880
              <para>
 
881
              <emphasis>Volume Group (VG):</emphasis> contains one or several Logical Volumes (LV). 
 
882
              </para>
 
883
            </listitem>
 
884
            <listitem>
 
885
              <para>
 
886
              <emphasis>Logical Volume (LV):</emphasis> is similar to a partition in a non-LVM system.  Multiple Physical Volumes (PV) 
 
887
              can make up one LV, on top of which resides the actual EXT3, XFS, JFS, etc filesystem.
 
888
              </para>
 
889
            </listitem>
 
890
            <listitem>
 
891
              <para>
 
892
              <emphasis>Physical Volume (PV):</emphasis> physical hard disk or software RAID partition.  The Volume Group can be extended
 
893
              by adding more PVs.
 
894
              </para>
 
895
            </listitem>
 
896
          </itemizedlist>
 
897
 
 
898
        </sect3>
 
899
        <sect3 id="lvm-installation" status="review">
 
900
          <title>Installation</title>
 
901
 
 
902
          <para>
 
903
          As an example this section covers installing Ubuntu Server Edition with <filename role="directory">/srv</filename> mounted
 
904
          on a LVM volume.  During the initial install only one Physical Volume (PV) will be part of the Volume Group (VG).  Another
 
905
          PV will be added after install to demonstrate how a VG can be extended.
 
906
          </para>
 
907
 
 
908
          <para>
 
909
          There are several installation options for LVM, <emphasis>"Guided - use the entire disk and setup LVM"</emphasis>, 
 
910
          <emphasis>"Guided - use entire and setup encrypted LVM"</emphasis>, or <emphasis>Manually</emphasis> setup the partitions
 
911
          and configure LVM.  At this time the only way to configure a system with both LVM and standard partitions, during installation,
 
912
          is to use the Manual approach.
 
913
          </para>
 
914
 
 
915
          <procedure>
 
916
            <step>
 
917
 
 
918
              <para>
 
919
              Follow the installation steps until you get to the <emphasis>Partition disks</emphasis> step, then:
 
920
              </para>
 
921
 
 
922
            </step>
 
923
            <step>
 
924
 
 
925
              <para>
 
926
              At the <emphasis>"Partition Disks</emphasis> screen choose <emphasis>"Manual"</emphasis>.
 
927
              </para>
 
928
 
 
929
            </step>
 
930
            <step>
 
931
 
 
932
              <para>
 
933
              Select the hard disk and on the next screen choose "yes" to <emphasis>"Create a new empty partition table on this device"</emphasis>.
 
934
              </para>
 
935
 
 
936
            </step>
 
937
            <step>
 
938
 
 
939
              <para>
 
940
              Next, create standard <emphasis>/boot</emphasis>, <emphasis>swap</emphasis>, and <emphasis>/</emphasis> partitions with whichever
 
941
              filesystem you prefer.
 
942
              </para>
 
943
 
 
944
            </step>
 
945
            <step>
 
946
 
 
947
              <para>
 
948
              For the LVM <emphasis>/srv</emphasis>, create a new <emphasis>Logical</emphasis> partition.  Then change <emphasis>"Use as"</emphasis>
 
949
              to <emphasis>"physical volume for LVM"</emphasis> then <emphasis>"Done setting up the partition"</emphasis>.
 
950
              </para>
 
951
 
 
952
            </step>
 
953
            <step>
 
954
 
 
955
              <para>
 
956
              Now select <emphasis>"Configure the Logical Volume Manager"</emphasis> at the top, and choose <emphasis>"Yes"</emphasis> to write 
 
957
              the changes to disk.
 
958
              </para>
 
959
 
 
960
            </step>
 
961
            <step>
 
962
 
 
963
              <para>
 
964
              For the <emphasis>"LVM configuration action"</emphasis> on the next screen, choose <emphasis>"Create volume group"</emphasis>.  Enter
 
965
              a name for the VG such as <emphasis>vg01</emphasis>, or something more descriptive. After entering a name, select the partition 
 
966
              configured for LVM, and choose <emphasis>"Continue"</emphasis>.
 
967
              </para>
 
968
 
 
969
            </step>
 
970
            <step>
 
971
 
 
972
              <para>
 
973
              Back at the <emphasis>"LVM configuration action"</emphasis> screen, select <emphasis>"Create logical volume"</emphasis>.  Select 
 
974
              the newly created Logical Volume, and enter a name for the new LV, for example <emphasis>srv</emphasis> since that is the intended
 
975
              mount point.  Then choose a size, which may be the full partition because it can always be extended later. Choose 
 
976
              <emphasis>"Finish"</emphasis> and you should be back at the main <emphasis>"Partition Disks"</emphasis> screen.    
 
977
              </para>
 
978
 
 
979
            </step>
 
980
            <step>
 
981
 
 
982
              <para>
 
983
              Now add a filesystem to the new LVM.  Select the partition under <emphasis>"LVM VG vg01, LV srv"</emphasis>, or whatever name
 
984
              you have chosen, the choose <emphasis>Use as</emphasis>.  Setup a file system as normal selecting <emphasis>/srv</emphasis> as
 
985
              the mount point.  Once done, select <emphasis>"Done setting up the partition"</emphasis>.
 
986
              </para>
 
987
 
 
988
            </step>
 
989
            <step>
 
990
 
 
991
              <para>
 
992
              Finally, select <emphasis>"Finish partitioning and write changes to disk"</emphasis>.  Then confirm the changes and continue
 
993
              with the rest of the installation.
 
994
              </para>
 
995
 
 
996
            </step>
 
997
          </procedure>
 
998
 
 
999
          <para>
 
1000
          There are some useful utilities to view information about LVM: 
 
1001
          </para>
 
1002
 
 
1003
          <itemizedlist>
 
1004
            <listitem><para><emphasis>vgdisplay:</emphasis> shows information about Volume Groups.</para></listitem>
 
1005
            <listitem><para><emphasis>lvdisplay:</emphasis> has information about Logical Volumes.</para></listitem>
 
1006
            <listitem><para><emphasis>pvdisplay:</emphasis> similarly displays information about Physical Volumes.</para></listitem>
 
1007
          </itemizedlist>
 
1008
 
 
1009
        </sect3>
 
1010
        <sect3 id="lvm-extending" status="review">
 
1011
          <title>Extending Volume Groups</title>
 
1012
 
 
1013
          <para>
 
1014
          Continuing the <emphasis>/srv</emphasis> as an LVM volume example, this section covers adding a second Physical Volume (PV) to 
 
1015
          <filename role="directory">/srv</filename> and expanding the filesystem.  This example assumes a second hard disk has been added
 
1016
          to the system and will be added to the <emphasis>vg01</emphasis> volume group.
 
1017
          </para>
 
1018
 
 
1019
          <procedure>
 
1020
            <step>
 
1021
 
 
1022
              <para>
 
1023
              First, create a partition on the new disk using the <application>fdisk</application> utility.  For example,
 
1024
              from a terminal enter:
 
1025
              </para>
 
1026
 
 
1027
<screen>
 
1028
<command>sudo fdisk /dev/sdb</command>
 
1029
<computeroutput>Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
 
1030
Building a new DOS disklabel with disk identifier 0x7b741e03.
 
1031
Changes will remain in memory only, until you decide to write them.
 
1032
After that, of course, the previous content won't be recoverable.
 
1033
 
 
1034
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
 
1035
 
 
1036
Command (m for help): <userinput>n</userinput>
 
1037
Command action
 
1038
   e   extended
 
1039
   p   primary partition (1-4)
 
1040
<userinput>p</userinput>
 
1041
Partition number (1-4): <userinput>1</userinput>
 
1042
First cylinder (1-391, default 1): 
 
1043
Using default value 1
 
1044
Last cylinder, +cylinders or +size{K,M,G} (1-391, default 391): 
 
1045
Using default value 391
 
1046
Command (m for help): <userinput>w</userinput>
 
1047
The partition table has been altered!
 
1048
 
 
1049
Calling ioctl() to re-read partition table.
 
1050
Syncing disks.</computeroutput>
 
1051
</screen>
 
1052
 
 
1053
              <para>
 
1054
              The above output creates a single partition covering the entire disk.  Your output will vary depending on your hard disk.
 
1055
              </para>
 
1056
 
 
1057
              <para>
 
1058
              A quick <application>fdisk</application> reference:
 
1059
              </para>
 
1060
 
 
1061
              <itemizedlist>
 
1062
                <listitem><para><emphasis>n:</emphasis> creates a new partition.</para></listitem>
 
1063
                <listitem><para><emphasis>p:</emphasis> prints the partition table.</para></listitem>
 
1064
                <listitem><para><emphasis>w:</emphasis> writes the changes to disk, and exits fdisk.</para></listitem>
 
1065
                <listitem><para><emphasis>q:</emphasis> quits fdisk without writing the changes to disk.</para></listitem>
 
1066
              </itemizedlist>
 
1067
 
 
1068
              <note>
 
1069
                <para>
 
1070
                Adjust <filename>/dev/sdb</filename> according to your system.  Also, the <application>cfdisk</application>,
 
1071
                menu driven, partition utility can be used instead of <application>fdisk</application>.
 
1072
                </para>
 
1073
              </note>
 
1074
 
 
1075
            </step>
 
1076
            <step>
 
1077
 
 
1078
              <para>
 
1079
              Next, create a Physical Volume (PV) on the new partition:
 
1080
              </para>
 
1081
 
 
1082
<screen>
 
1083
<command>sudo pvcreate /dev/sdb1</command>
 
1084
</screen>
 
1085
 
 
1086
            </step>
 
1087
            <step>
 
1088
 
 
1089
              <para>
 
1090
              Now extend the Volume Group (VG):
 
1091
              </para>
 
1092
 
 
1093
<screen>
 
1094
<command>sudo vgextend vg01 /dev/sdb1</command>
 
1095
</screen>
 
1096
 
 
1097
            </step>
 
1098
            <step>
 
1099
 
 
1100
              <para>
 
1101
              The Logical Volume (LV) can now be extended:
 
1102
              </para>
 
1103
 
 
1104
<screen>
 
1105
<command>sudo lvextend /dev/vg01/srv -L3221M</command>
 
1106
</screen>
 
1107
 
 
1108
              <para>
 
1109
              The <emphasis>-L</emphasis> option allows the LV to be extended using Meg, Gig, Tera, etc bytes.  Just be sure the 
 
1110
              hard disk has enough space for the value you choose.  The <application>fdisk</application> <emphasis>q</emphasis> 
 
1111
              option will display the exact size of a drive.
 
1112
              </para>
 
1113
 
 
1114
            </step>
 
1115
            <step>
 
1116
 
 
1117
              <para>
 
1118
              Finally, resize the filesystem:
 
1119
              </para>
 
1120
 
 
1121
<screen>
 
1122
<command>sudo resize2fs /dev/vg01/srv</command>
 
1123
</screen>
 
1124
 
 
1125
              <para>
 
1126
              The above command is for an <application>EXT3</application> or <application>EXT4</application> filesystem.  If you are 
 
1127
              using another filesystem there may be other resize utilities available.
 
1128
              </para>
 
1129
 
 
1130
            </step>
 
1131
          </procedure>
 
1132
 
 
1133
          <para>
 
1134
          You should now see the expanded space in <filename>/srv</filename>: <command>df -h</command>.
 
1135
          </para>
 
1136
 
 
1137
        </sect3>
 
1138
        <sect3 id="lvm-resources" status="review">
 
1139
          <title>Resources</title>
 
1140
 
 
1141
          <itemizedlist>
 
1142
            <listitem>
 
1143
              <para>
 
1144
              See the <ulink url="http://tldp.org/HOWTO/LVM-HOWTO/index.html">LVM HOWTO</ulink> for more information.
 
1145
              </para>
 
1146
            </listitem>
 
1147
            <listitem>
 
1148
              <para>
 
1149
              Another good article is 
 
1150
              <ulink url="http://www.linuxdevcenter.com/pub/a/linux/2006/04/27/managing-disk-space-with-lvm.html">Managing Disk Space with LVM</ulink>
 
1151
              on O'Reilly's linuxdevcenter.com site.
 
1152
              </para>
 
1153
            </listitem>
 
1154
            <listitem>
 
1155
              <para>
 
1156
              For more information on <application>fdisk</application> see the
 
1157
              <ulink url="http://manpages.ubuntu.com/manpages/jaunty/en/man8/fdisk.8.html">fdisk man page</ulink>.
 
1158
              </para>
 
1159
            </listitem>
 
1160
          </itemizedlist>
 
1161
        </sect3>
 
1162
      </sect2>     
825
1163
    </sect1>
826
1164
</chapter>