Re: simple RAID setup
Sorry for the late reply, hopefully the below will still be useful. Some things that i would like to share from setting up raid on my own home server. For all drives in your machine: Create a partition table. Create a 1gb partition to be used for software raid containing your /boot partition. For EFI based systems you may also need a efi boot partition, just create it and copy the contents to the other drives after installation. Create a partition for software raid / btrfs volume that uses the rest of the drive. Create a raid 1 containing all your drives. This will make a 1gb raid disk, mount this as /boot and format it with ext2/3 raid 1 copies the same data to all drives, so adding more drives does not give you more space but more redundancy. This is an advantage for /boot as you want to be able to boot from any drive so if your first drive fails it will still continue. You need to change the debconf priority when you get to the installing raid to the highest so it will ask you where to install grub, choose to install grub on all drives. if you have already installed your os run: dpkg-reconfigure grub-pc and select all drives. What you do with the rest of your storage is up to you. Things to consider are: how many drives do you have? You need at least 3 for raid 5, 4 for raid 10 are they all the same size? You will be limited to the size of the smallest drive with raid. Btrfs / zfs can work with different sized drives as long as there is enough capacity in the system for the desired redundancy. ie you have 3x1gb drives and a 3gb drive, you can set up a virtual raid 1 and it will give you 3gb of redundant storage. are they all (roughly) the same speed? If you use btrfs instead of raid this can take advantage of faster disks or ssd's to have more frequently used files read faster. What raid level do you want to use? raid 0 - no redundancy, good performance, avoid this if you loose 1 drive you loose everything. raid 1 - You have redundancy but you use 1 drive for that redundancy. raid 5 - You take advantage better advantage of the disks you have but your write performance sucks. raid 10 - You get good performance and redundancy but it becomes expensive to get disks. btrfs / zfs - This can be used in a similar way to software raid and lvm. It has sub volumes giving options on how you use your storage. I would recommend creating a raid 10 and putting lvm over the top. If possible do not allocate all your storage to allow you to change your mind later. Having spare space also allows you to take lvm snapshots, these could be used for testing. The XFS file system is a better choice for large files than ext3/4, if you are storing things like virtual machine disk images use xfs. For smaller files such as photo's ext3 / ext4 is a good choice but it does not matter as much. Monitoring your raid: - once you have your raid set up keep an eye on it. This is done with the virtual file /proc/mdstat This will tell you if you have a degraded array and the status of the rebuild dns@apoc:~$ cat /proc/mdstat Personalities : [raid10] [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid10 sdd1[1] sdb1[0] sde1[2] sdf1[3] 3907023872 blocks 64K chunks 2 near-copies [4/4] [] md0 : active raid10 sdi[3] sdh[2] sda[1] sdc[0] 3907028992 blocks 64K chunks 2 near-copies [4/4] [] unused devices: The config file for software raid is /etc/madm.conf and using the tool mdadm See http://en.wikipedia.org/wiki/Mdadm for commands. Replacing a failed drive: - If one of your drives fails you can add a replacement with mdadm --add md0 /dev/sdb1 Another thing to consider is writing the serial number of the drive down and having this list stuck to the side of the machine. When your drive fails you do not know what drive is at fault you know what to replace. You can find the serial number printed on the disk, you can usually see this information in the bios configuration screen as well. you can find the serial number under linux with smartctl. dns@apoc:~$ sudo smartctl --all /dev/sda smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-35-generic] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net === START OF INFORMATION SECTION === Model Family: Western Digital Caviar Green Device Model: WDC WD20EADS-00R6B0 Serial Number:WD-WCAVY0815050 So when the disk fails, run smartctl on the remaining disks to work out what disk is dead. Create the same partition layout as before, a 1gb for your /boot and the rest for raid storage. Add the 1gb to the raid 1 array and wait for it to synchronise, it should automatically balance across the new drive, there are commands you can use to force it to balance. Add the second partition to the other array and wait for it to balance. run$ dpkg-reconfigure grub-pcto reconfigure grub and install grub on all drives. Hope this gives you some ideas. Regards, Dani
Re: simple RAID setup
> > From: Paul Gear >To: Ubuntu AU List >Sent: Saturday, 29 December 2012 3:42 PM >Subject: Re: simple RAID setup > > >On 12/29/2012 12:36 PM, Tom Sparks wrote: > >>I am looking at setup a RAID what is the simplest setup? >RAID 1 is recommended for boot disks. My preferred setup is to set > up all boot disks (usually 2, but i've been known to go as high as > 4) as follows: I am using the array to store my data for my file server tom sparks -- ubuntu-au mailing list ubuntu-au@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-au
Re: simple RAID setup
On 12/29/2012 03:45 PM, Jackson Doak wrote: for simplicity, try to use hardware raid, e.g. created in bios. use either RAID 0 (striping, more speed but lose on drive, loose them all) or RAID 1 (mirroring, gives redundancy) Most hardware RAID created in BIOS is actually software RAID (sometimes called "fake RAID") implemented in a driver. I've never had anything but bad experiences with it, and plenty of good experiences with Linux software RAID. More here: http://linuxman.wikispaces.com/RAID Paul <>-- ubuntu-au mailing list ubuntu-au@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-au
Re: simple RAID setup
for simplicity, try to use hardware raid, e.g. created in bios. use either RAID 0 (striping, more speed but lose on drive, loose them all) or RAID 1 (mirroring, gives redundancy) On Sat, Dec 29, 2012 at 3:42 PM, Paul Gear wrote: > On 12/29/2012 12:36 PM, Tom Sparks wrote: > > I am looking at setup a RAID > > what is the simplest setup? > > > RAID 1 is recommended for boot disks. My preferred setup is to set up all > boot disks (usually 2, but i've been known to go as high as 4) as follows: > > 1. primary partition, 1 GB or so, Linux RAID partition (type 0xFD in > fdisk, known as physical volume for RAID in the server/alternate > installer). Once these have been combined into a RAID partition (usually > /dev/md0), i create an ext3 filesystem for /boot on it. > > 2. primary or logical partition, rest of the disk, Linux RAID. Once these > have been combined into a RAID partition (usually /dev/md1), i create an > LVM physical volume (PV) on this, create a volume group (VG) named for the > host and a sequence number (e.g. myserv0). Then you can create logical > volumes (LVs) in the VG that act like physical partitions, but can be moved > and grown as needed. > > 3. LVs in the root VG: > >- lv00 4GB swap >- lv01 8GB+ / >- lv02 8GB+ /var >- rest of VG can be allocated as desired, but often it goes in /home > > It's not required to have a separate /boot nowadays, but i prefer it > because it has been very stable and trouble-free for me for many years. I > have an idea that the Ubuntu installer nowadays might even have a canned > configuration that sets up RAID 1 + LVM. But don't quote me on that one. > > I've got a bit more at my wiki (hasn't been updated in a while, though): > >- http://linuxman.wikispaces.com/search/view/raid >- http://linuxman.wikispaces.com/Software+RAID+troubleshooting >- http://linuxman.wikispaces.com/Recovering+from+a+RAID+drive+failure >- http://linuxman.wikispaces.com/filesystem+layers+overview > > I'm sure there are better guides than mine if you care to search, but i > haven't found anything like the filesystem layers overview elsewhere. > > If you have any troubles, jump on IRC in #ubuntu-au and ping me > (blahdeblah) and i'll see what i can do to help. > > Regards, > Paul > > > -- > ubuntu-au mailing list > ubuntu-au@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/ubuntu-au > > -- ubuntu-au mailing list ubuntu-au@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-au
Re: simple RAID setup
On 12/29/2012 12:36 PM, Tom Sparks wrote: I am looking at setup a RAID what is the simplest setup? RAID 1 is recommended for boot disks. My preferred setup is to set up all boot disks (usually 2, but i've been known to go as high as 4) as follows: 1. primary partition, 1 GB or so, Linux RAID partition (type 0xFD in fdisk, known as physical volume for RAID in the server/alternate installer). Once these have been combined into a RAID partition (usually /dev/md0), i create an ext3 filesystem for /boot on it. 2. primary or logical partition, rest of the disk, Linux RAID. Once these have been combined into a RAID partition (usually /dev/md1), i create an LVM physical volume (PV) on this, create a volume group (VG) named for the host and a sequence number (e.g. myserv0). Then you can create logical volumes (LVs) in the VG that act like physical partitions, but can be moved and grown as needed. 3. LVs in the root VG: * lv00 4GB swap * lv01 8GB+ / * lv02 8GB+ /var * rest of VG can be allocated as desired, but often it goes in /home It's not required to have a separate /boot nowadays, but i prefer it because it has been very stable and trouble-free for me for many years. I have an idea that the Ubuntu installer nowadays might even have a canned configuration that sets up RAID 1 + LVM. But don't quote me on that one. I've got a bit more at my wiki (hasn't been updated in a while, though): * http://linuxman.wikispaces.com/search/view/raid * http://linuxman.wikispaces.com/Software+RAID+troubleshooting * http://linuxman.wikispaces.com/Recovering+from+a+RAID+drive+failure * http://linuxman.wikispaces.com/filesystem+layers+overview I'm sure there are better guides than mine if you care to search, but i haven't found anything like the filesystem layers overview elsewhere. If you have any troubles, jump on IRC in #ubuntu-au and ping me (blahdeblah) and i'll see what i can do to help. Regards, Paul <>-- ubuntu-au mailing list ubuntu-au@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-au
simple RAID setup
I am looking at setup a RAID what is the simplest setup? --- tom_a_sparks "It's a nerdy thing I like to do" Please use ISO approved file formats excluding Office Open XML - http://www.gnu.org/philosophy/no-word-attachments.html Ubuntu wiki page https://wiki.ubuntu.com/tomsparks 3 x (x)Ubuntu 10.04, Amiga A1200 WB 3.1, UAE AF 2006 Premium Edition, AF 2012 Plus Edition, Sam440 AOS 4.1.2, Raspberry Pi model B, Microbee Premium Plus+, Roland DXY-1300 pen plotter, Cutok DC330 cutter/pen plotter Wanted: GEOS system (C64/C128), Atari ST, Apple Macintosh (6502/68k/PPC only) -- ubuntu-au mailing list ubuntu-au@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-au