A server with 3 SATA HDD to setup a RAID5 storage.
Setup TFTP server.
sudo apt-get install bootp tftpd-hpa
sudo vim /etc/xinet.d/bootp
service bootps
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/bootpd
server_args = -i /etc/bootptab
}
sudo vim /etc/xinet.d/tftpd
oleksiy@odin:/etc/xinetd.d$ cat tftp
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
sudo vim /etc/bootptab
client:\
hd=/tftpboot:\
bf=pxelinux.0:\
ip=host_ip_addr:\
sm=255.255.255.0:\
sa=tftpsrv_ip_addr:\
ha=host_hw_addr:
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/bootpd
server_args = -i /etc/bootptab
}
sudo vim /etc/xinet.d/tftpd
oleksiy@odin:/etc/xinetd.d$ cat tftp
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
sudo vim /etc/bootptab
client:\
hd=/tftpboot:\
bf=pxelinux.0:\
ip=host_ip_addr:\
sm=255.255.255.0:\
sa=tftpsrv_ip_addr:\
ha=host_hw_addr:
sudo /etc/init.d/xinetd restart
sudo mkdir /tftproot
sudo chmod +rx /tftproot
cd /tftproot
wget http://archive.ubuntu.com/ubuntu/dists/karmic/main/installer-i386/current/images/netboot/netboot.tar.gz
tar xfz netboot.tar.gz
boot up the server:
check what PXE boot is enables
the server suppose to start booting.
go through configuration process
when comes partitioning do it manually:
the server suppose to start booting.
go through configuration process
when comes partitioning do it manually:
for each drive create 2 partitions: i.e. 100Mb for /boot and the rest. Mark a /dev/sda1 as /root and the rest as 'do not use', go on. Hit Alt+F2, run:
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1
mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sda5 /dev/sdb5 /dev/sdc5
back to the installation process Alt+F1, go couple of steps back to Drive Detection. remove /root mounting point form /dev/sda1. Set the mounting point of /dev/md0 as /boot (at least /boot should be there). Create LVM from /dev/md1 and partition it as you want (at least root, /home, swap).
Proceed with installation.
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1
mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sda5 /dev/sdb5 /dev/sdc5
back to the installation process Alt+F1, go couple of steps back to Drive Detection. remove /root mounting point form /dev/sda1. Set the mounting point of /dev/md0 as /boot (at least /boot should be there). Create LVM from /dev/md1 and partition it as you want (at least root, /home, swap).
Proceed with installation.
2 comments:
Doesn't this imply that GRUB is MD-aware? And that it can actually scan all available disks, construct a RAID5 set, and then load the kernel from it?
it is, but only for mirrors :(
Post a Comment