User:Az990tony/edublog-beta-sw: Difference between revisions
Line 29: | Line 29: | ||
/dev/sdb (this is drive 2) |
/dev/sdb (this is drive 2) |
||
Note that /dev/sda1, sda2, sda3 and sda4 can be bootable primary partitions. Typically, |
|||
sda4 is configured as an "extended partition" which allows subsets to be defined as sda5, sda6, and so on. |
|||
; USB keys or external drives : |
; USB keys or external drives : |
Revision as of 14:38, 15 June 2008
This software stack is based on This Beta Server hardware built for the Educational_Blogger_Project .
The following topics are covered
- Devices available
- RAID and Logical Volume Mirror considerations
- Disk Layout
- Operating System considerations
- Middleware (web server, database, etc.)
- Additional Utilities
Devices Available
Based on the hardware, the following devices are available:
- CD/DVD Burner
/dev/hda (it is in the Primary/Master position on the first EIDE cable)
/dev/cdrom (many operating systems use this)
/dev/dvd (and this)
/dev/dvdrw (and this)
- SATA disks
/dev/sda (this is drive 1)
/dev/sdb (this is drive 2)
Note that /dev/sda1, sda2, sda3 and sda4 can be bootable primary partitions. Typically, sda4 is configured as an "extended partition" which allows subsets to be defined as sda5, sda6, and so on.
- USB keys or external drives
/dev/sdf for the drive itself
/dev/sdf1 (for the VFAT file system usually on it)
- Ethernet Network Interface cards
eth0, eth1 and eth2 seemed to be assigned to the one motherboard connector and two PCI cards differently between operating systems. I will need to track down the MAC addresses to keep them straight.
RAID and Logical Volume Mirror
Most Linux systems only require the following:
- A Master Boot Record (MBR) that contains the boot loader and disk layout
- A root directory (/)
- swap space (typically as big or bigger than installed RAM)
Redundant Array of Inexpensive Disks (RAID)
Configurations include:
- RAID 0
Stripes data across for better performance. Two 160GB drives would look like a fast 320GB drive, but if you lose any one drive, you have lost everything
- RAID 1
Mirrors the data across drives. Multiple copies means you have better protection, so if you lose any one drive, the rest of the system can still run. Two 160GB drives would look like a single 160GB drive. Performance is the same or slightly slower than a single drive.
- RAID 5
Stripes with parity for added protection. One drive's worth is set aside for parity, so three 160GB drives would hold 320GB of data; four 160GB drives would hold 480GB of data. Since we have only two drives, this option does not apply to us. Performance is faster for read, but can be slower for writes, depending on how the parity methods are implemented.
- RAID 10
Striped and Mirrored. Sometimes referred to as RAID 0+1 or RAID 1+0, this combines RAID 1 with RAID 0. Data is striped across disk 1 and disk 2, disk 3 is a mirror of disk 1 stripe, and disk 4 is mirror of disk 2 stripe. Thus four 160GB drives holds 320GB of data. If you lose any one drive, the mirrored copy is still available, so the system will be able to continue to run. Performance is same or slightly slower than a 2-drive RAID 0 configuration.
- JBOD
JBOD stands for "Just a Bunch of Disks", a term meaning there is no RAID for protection or performance improvement. This refers to deployments where each disk drive is independent.
RAID-1 Considerations:
- Can mirror the entire drive ( /dev/sda <--> /dev/sdb ) or individual same-sized partitions ( /dev/sda1 <--> /dev/sdb1 )
- Can mirror swap space. This appears to be preferred best practice over just having swap space on separate disks.
- Mirrored drives appear as (/dev/md0, /dev/md1) or (/dev/dm-0, /dev/dm1)
- Can be used as physical volumes for Logical Volume Manager
Logical Volume Manager (LVM2)
Logical Volume Manager allows a level of storage virtualization between the physical hardware and the operating system and applications.
- Physical Volumes
A physical volume (pv) can be an entire disk drive (/dev/sda), partition (/dev/sda1), or RAID mirror (/dev/md0)
- Volume Groups
A volume group (vg) combines the space capacity of one or more physical volumes. A physical volume can only be part of a single volume group. A volume group can host one or more logical volumes.
- Logical Volume
A logical volume is a "virtual drive" that appears like a device or partition to the operating system. A logical volume can be the entire space of a single volume group, or a subset of a single volume group. Logical volumes can be increased or decreased in size, and can be moved as needed onto or away from specific physical volumes.
LVM2 Considerations:
- A volume group can contain physical volumes of different sizes
- Linux cannot boot from a Logical Volume, this can be solved by having a separate /boot directory that is not part of the Logical Volume, and the rest of root (/) in the logical volume.
Disk Layout
Several disk layouts are possible.
1. Simple JBOD (no RAID, no LVM)
/dev/sda /dev/sdb MBR (boot loader / disk layout ) MBR (disk layout only) /dev/sda1 as /boot /dev/sdb1 for extra space /dev/sda5 as / /dev/sda6 as swap
2. RAID (no LVM)
/dev/sda /dev/sdb MBR1 (boot loader/layout) <-independent-> MBR2 (boot loader/layout) /dev/sda1 as /boot <- /dev/md0 -> /dev/sdb1 /dev/sda5 as / <- /dev/md1 -> /dev/sdb5 /dev/sda6 as swap <- /dev/md2 -> /dev/sdb6
2. LVM (no RAID)
/dev/sda /dev/sdb MBR (boot loader / disk layout ) MBR (disk layout only) /dev/sda1 as /boot /dev/sdb1 as physical volume /dev/sda5 as physical volume where: VolGroup00 --- combines /dev/sda5 and /dev/sdb1 LogVol00 -- as / LogVol01 -- as swap
3. RAID (no LVM)
/dev/sda /dev/sdb MBR1 (boot loader/layout) <-independent-> MBR2 (boot loader/layout) /dev/sda1 as /boot <- /dev/md0 -> /dev/sdb1 /dev/sda5 as / <- /dev/md1 -> /dev/sdb5 /dev/sda6 as swap <- /dev/md2 -> /dev/sdb6
4. RAID and LVM
/dev/sda /dev/sdb MBR1 (boot loader/layout) <-independent-> MBR2 (boot loader/layout) /dev/sda1 as /boot <- /dev/md0 -> /dev/sdb1 /dev/sda5 as physical vol <- /dev/md1 -> /dev/sdb5 where: VolGroup00 --- /dev/md1 LogVol00 -- as / LogVol01 -- as swap
5. RAID and LVM with rescue partition
/dev/sda /dev/sdb MBR1 (boot loader/layout) <-independent-> MBR2 (boot loader/layout) /dev/sda1 as /rescue <- /dev/md0 -> /dev/sdb1 /dev/sda2 as /boot <- /dev/md1 -> /dev/sdb2 /dev/sda5 as physical vol <- /dev/md2 -> /dev/sdb5 where: VolGroup00 --- /dev/md2 LogVol00 -- as / LogVol01 -- as swap