Difference between revisions of "Web Server Documentation"
imported>Alex |
imported>Alex |
||
Line 1: | Line 1: | ||
− | == Configuring RAID | + | == Configuring RAID 10 on Web Server (2/15/2016) == |
hostname: McNairWebServ | hostname: McNairWebServ | ||
Line 11: | Line 11: | ||
I guessed that, because the 1 MB RAID device was made first, that the kernel tried to install itself to that device and failed. So I went back to the partitioner and set the first RAID device to "do not use" and then tried the installation process again. It prompted me a couple of times warning me that the old filesystem would be overwritten, but I continued the installation regardless. But then the GRUB boot loader failed, even if we tried not installing it to the master boot record (MBR) and installing it to "dev/md0" or installing it to "dev/md0_raid1" | I guessed that, because the 1 MB RAID device was made first, that the kernel tried to install itself to that device and failed. So I went back to the partitioner and set the first RAID device to "do not use" and then tried the installation process again. It prompted me a couple of times warning me that the old filesystem would be overwritten, but I continued the installation regardless. But then the GRUB boot loader failed, even if we tried not installing it to the master boot record (MBR) and installing it to "dev/md0" or installing it to "dev/md0_raid1" | ||
− | + | == Configuring RAID 1 on Web Server (2/17/2016) == | |
The first RAID device (/dev/md0) we set to use as an ext4 filesystem and mounted /boot to it, and the second RAID device (/dev/md127) we set to use as an ext4 filesystem and mounted / to it (we tried this before, but it failed to install the kernel). This time, it failed to install the bootloader, but it never prompted me to choose where to install the bootloader (usually it asks whether you'd like to install the bootloader to the master boot record). | The first RAID device (/dev/md0) we set to use as an ext4 filesystem and mounted /boot to it, and the second RAID device (/dev/md127) we set to use as an ext4 filesystem and mounted / to it (we tried this before, but it failed to install the kernel). This time, it failed to install the bootloader, but it never prompted me to choose where to install the bootloader (usually it asks whether you'd like to install the bootloader to the master boot record). | ||
Line 50: | Line 50: | ||
First hard disk (/dev/sda): | First hard disk (/dev/sda): | ||
− | * 10 MB partition, use as | + | * 10 MB partition, use as reserved BIOS boot area, bootable flag off |
* 32 GB partition, use as swap space | * 32 GB partition, use as swap space | ||
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off | * rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off | ||
Second hard disk (/dev/sdb): | Second hard disk (/dev/sdb): | ||
− | * 10 MB partition, use as | + | * 10 MB partition, use as reserved BIOS boot area, bootable flag off |
* 32 GB partition, use as swap space | * 32 GB partition, use as swap space | ||
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off | * rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off |
Revision as of 16:58, 17 February 2016
Configuring RAID 10 on Web Server (2/15/2016)
hostname: McNairWebServ full name: McNair Center username: mcnair
Sahil and I tried to configure RAID 10 using the software RAID option in the installer, which is documented here. We put two 64 GB swap space partitions on the first two hard drives, and created two ext4 partitions that took up the rest of the space on those two drives. For the other two drives, we used a single ext4 partition for each drive. For all of the ext4 partitions, we set the bootable flag to "on." Then we chose to configure the software RAID, created a new MD device, and chose RAID10 with 2 active devices and 2 spare devices. For the active devices, we chose the two ext4 partitions on the first two hard drives, and for the spare devices, we chose the two ext4 partitions on the other two hard drives. But then the installation process fails when the GRUB boot loader can't be installed, because the GUID partition tables (GPT) need a designated, small (1 MB is enough) partition for the GRUB bootloader.
So we started partitioning from scratch, but with only two hard drives for a RAID1 array. In the first drive, there are three partitions: one 1 MB partition reserved for the bootloader, one 64 GB swap partition, and the rest of the drive as an ext4 partition for the filesystem. In the second drive, there are two partitions: one 1 MB partition reserved for the bootloader and the rest of the drive as an ext4 partition for the filesystem. Then we made two software RAID devices, both with one with 2 active devices and 0 spare devices. The first RAID device had both of the bootloader partitions as the active devices, and the second RAID device had both of the ext4 filesystem partitions as the active devices. Then we set the first RAID device to "use as ext4" and the mount as "/boot" and the second RAID device as "use as ext4" and the mount as "/" and then continued with the installation. This time, it failed to install the kernel.
I guessed that, because the 1 MB RAID device was made first, that the kernel tried to install itself to that device and failed. So I went back to the partitioner and set the first RAID device to "do not use" and then tried the installation process again. It prompted me a couple of times warning me that the old filesystem would be overwritten, but I continued the installation regardless. But then the GRUB boot loader failed, even if we tried not installing it to the master boot record (MBR) and installing it to "dev/md0" or installing it to "dev/md0_raid1"
Configuring RAID 1 on Web Server (2/17/2016)
The first RAID device (/dev/md0) we set to use as an ext4 filesystem and mounted /boot to it, and the second RAID device (/dev/md127) we set to use as an ext4 filesystem and mounted / to it (we tried this before, but it failed to install the kernel). This time, it failed to install the bootloader, but it never prompted me to choose where to install the bootloader (usually it asks whether you'd like to install the bootloader to the master boot record).
Second partitioning attempt:
First hard disk (/dev/sda):
- 10 MB partition, use as reserved BIOS boot area, bootable flag off
- 64 GB partition, use as swap space
- rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off
Second hard disk (/dev/sdb):
- 10 MB partition, use as reserved BIOS boot area, bootable flag
- rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off
Write partition changes to disk and then start configuring software RAID:
- First RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb2), 0 spare devices
- Second RAID device (/dev/md1): RAID1, 2 active devices (/dev/sda1 and /dev/sdb1), 0 spare devices
- first RAID device partition: use as ext4 filesystem, mount point /
- second RAID device partition: use as ext4 filesystem, mount point /boot, format data on the partition
Failed to install GRUB bootloader on a hard disk (again).
Next attempt: First RAID device (/dev/md0): use as ext4 filesystem, mount point /, format data on the partition Second RAID device (/dev/md1): erase data on partition, use as "do not use"
Next attempt: Redo the RAID devices so that the first device (/dev/md0): RAID1, 2 active devices (/dev/sda1 and /dev/sdb1), 0 spare devices, and the second RAID device (/dev/md1): RAID1, 2 active devices (/dev/sda3 and /dev/sdb2), 0 spare devices. Then configure the RAID devices:
- first RAID device partition: use as ext4 filesystem, mount point /boot, format data on the partition
- second RAID device partition: use as ext4 filesystem, mount point /, format data on the partition
New idea: ditch the idea of RAID on the boot partitions (we'll put the bootloader on one of the boot partitions and then we can try to set up RAID once we've got the thing booting into Linux), so leave the partitions as above ("Second Partitioning Attempt"). Only make one software RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb2), 0 spare devices. Then configure the first RAID device partition: use as ext4 filesystem, mount point /, format data on the partition.
Third partitioning attempt:
First hard disk (/dev/sda):
- 10 MB partition, use as reserved BIOS boot area, bootable flag off
- 32 GB partition, use as swap space
- rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off
Second hard disk (/dev/sdb):
- 10 MB partition, use as reserved BIOS boot area, bootable flag off
- 32 GB partition, use as swap space
- rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off
One RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb3), 0 spare devices. set partition: use as ext4 filesystem, mount point /
Database server drive partition specs: RAID 10 the four drives 1 MB out of each drive for bootloader use all of M.2 drive as swap space PCIe express drive format as linux partition (for PostgreSQL data directory)