From: J G Miller on 14 Apr 2010 11:26 On Wed, 14 Apr 2010 15:00:17 +0000, Unruh asked: > Is there a difference between that and 83 Linux ? Yes. 83 is Linux (as in ext2/ext3/ext4) and fd is Linux raid auto. If the partition type is not correctly set, then the Linux kernel will not have the correct information about which partitions are being used for RAID, and therefore will be unable to auto-detect and automatically manage the RAID array. From <http://en.gentoo-wiki.COM/wiki/RAID/Software> QUOTE When you partition your disks, make sure that your partitions use fd (Linux RAID autodetect) as Partition Type instead of the default 83 (Linux native) or 82 (swap). UNQUOTE Also, I hope that when you create the file system on your RAID array, you use the most suitable parameters (stride, stride_width) for the type of RAID in order to optimize performance. See calculator at <http://busybox.NET/~aldot/mkfs_stride.html>
From: Robert Heller on 14 Apr 2010 11:38 At Wed, 14 Apr 2010 15:00:17 GMT unruh <unruh(a)wormhole.physics.ubc.ca> wrote: > > On 2010-04-14, J G Miller <miller(a)yoyo.ORG> wrote: > > On Wed, 14 Apr 2010 00:52:40 +0000, Unruh wrote: > > > >> I have a raid 0 array, with two partitions, /dev/sdb3 and /dev/sda3 as > >> parts of that raid 0 array. > > > > Just a reminder in case it has been overlooked, but in the partition > > tables for the disks, the partitions sda3 and sdb3 should be set to > > > > fd Linux raid auto > > Is there a difference between that and 83 Linux ? YES. The kernel looks for the "Linux raid auto" partition type to automagically construct RAID arrays during the boot process. > -- Robert Heller -- 978-544-6933 Deepwoods Software -- Download the Model Railroad System http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows heller(a)deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/
From: unruh on 14 Apr 2010 12:11 On 2010-04-14, J G Miller <miller(a)yoyo.ORG> wrote: > On Wed, 14 Apr 2010 15:00:17 +0000, Unruh asked: > >> Is there a difference between that and 83 Linux ? > > Yes. > > 83 is Linux (as in ext2/ext3/ext4) and fd is Linux raid auto. > > If the partition type is not correctly set, then the Linux kernel > will not have the correct information about which partitions are > being used for RAID, and therefore will be unable to auto-detect > and automatically manage the RAID array. Thanks. I had not even realised that type fd existed. > > From <http://en.gentoo-wiki.COM/wiki/RAID/Software> > > QUOTE > > When you partition your disks, make sure that your partitions use fd > (Linux RAID autodetect) as Partition Type instead of the default 83 > (Linux native) or 82 (swap). > > UNQUOTE > > Also, I hope that when you create the file system on your RAID array, > you use the most suitable parameters (stride, stride_width) for > the type of RAID in order to optimize performance. No idea what that means. I will read up on it. Thanks. > > See calculator at <http://busybox.NET/~aldot/mkfs_stride.html> Unfortunately I do not understand the inputs (Raid Chunck Size, number of filesystem blocks)
From: J G Miller on 14 Apr 2010 12:44 On Wed, 14 Apr 2010 16:11:21 +0000, Unruh explained: > No idea what that means. I will read up on it. Thanks. > >> See calculator at <http://busybox.NET/~aldot/mkfs_stride.html> > Unfortunately I do not understand the inputs (Raid Chunck Size, number > of filesystem blocks) To the best of my knowledge (corrections from others actively sought) this piece of advice still applies to RAID 5, from <http://tldp.ORG/HOWTO/Software-RAID-0.4x-HOWTO-8.html> QUOTE When using the current (November 1997) RAID-4/5 implementation, it is strongly recommended that the file system be created with mke2fs -b 4096 instead of the default 1024 byte filesystem block size. This is because the current RAID-5 implementation allocates one 4K memory page per disk block; if a disk block were just 1K in size, then 75% of the memory which RAID-5 is allocating for pending I/O would not be used. If the disk block size matches the memory page size, then the driver can (potentially) use all of the page. Thus, for a filesystem with a 4096 block size as opposed to a 1024 byte block size, the RAID driver will potentially queue 4 times as much pending I/O to the low level drivers without allocating additional memory. UNQUOTE Do you have a file called /etc/mke2fs.conf on your system? In that you will see the default block size which is used by mke2fs. [defaults] base_features = dir_index,ext_attr,filetype,resize_inode,sparse_super blocksize = 4096 inode_size = 256 inode_ratio = 16384 So long as the block size there is set to 4096 as the default, you do not have to worry about specifying that to mke2fs, but you will need to specify the stride and stride_width parameters as appropriate. So to summarize the steps for setting up RAID properly 1) Create partitions on disks using fdisk with filesystem type fd 2) Create /etc/mdadm/mdadm.conf with appropriate parameters, for example ARRAY /dev/md0 devices=/dev/sda10,/dev/sdb7,/dev/sdc9,/dev/sdd9 level=5 num-devices=4 ARRAY /dev/md1 devices=/dev/sda9,/dev/sdd7 level=0 num-devices=2 CREATE auto=yes group=disk mode=0660 owner=root HOMEHOST <system> MAILADDR root(a)myhost.mydomain 3) Run the mdadm utility to create the RAID devices 4) Use mke2fs (it you want ext3 or ext4 filesystems of course) with the correct parameters specifying block size, stride, and stride width on the RAID device md0, md1 etc 5) mount the RAID device as a regular filesystem On Debian/Ubuntu/Mint systems there is also an /etc/default/mdadm configuration file AUTOCHECK=true DAEMON_OPTIONS="--syslog" START_DAEMON=true VERBOSE=false If I recall correctly AUTOCHECK means that the array will automagically be checked every month at the time specfied in /etc/cron.d/mdadm For big arrays this checking will many hours (6-8) as it checks/rebuilds the array depending on machine load, speed of disks etc. This is not the same as fsck checking which is at the filesystem level, and which would be done if the raid array was not unmounted cleanly. Hope this all helps in better administering your home RAID array.
From: Robert Heller on 14 Apr 2010 13:20 At Wed, 14 Apr 2010 16:11:21 GMT unruh <unruh(a)wormhole.physics.ubc.ca> wrote: > > On 2010-04-14, J G Miller <miller(a)yoyo.ORG> wrote: > > On Wed, 14 Apr 2010 15:00:17 +0000, Unruh asked: > > > >> Is there a difference between that and 83 Linux ? > > > > Yes. > > > > 83 is Linux (as in ext2/ext3/ext4) and fd is Linux raid auto. > > > > If the partition type is not correctly set, then the Linux kernel > > will not have the correct information about which partitions are > > being used for RAID, and therefore will be unable to auto-detect > > and automatically manage the RAID array. > > Thanks. I had not even realised that type fd existed. > > > > > > From <http://en.gentoo-wiki.COM/wiki/RAID/Software> > > > > QUOTE > > > > When you partition your disks, make sure that your partitions use fd > > (Linux RAID autodetect) as Partition Type instead of the default 83 > > (Linux native) or 82 (swap). > > > > UNQUOTE > > > > Also, I hope that when you create the file system on your RAID array, > > you use the most suitable parameters (stride, stride_width) for > > the type of RAID in order to optimize performance. > > No idea what that means. I will read up on it. Thanks. > > > > > > See calculator at <http://busybox.NET/~aldot/mkfs_stride.html> > > Unfortunately I do not understand the inputs (Raid Chunck Size, number > of filesystem blocks) The Raid Chunck Size is an input to mdadm when you create the array. It is 64K by default. The number of filesystem blocks is the number of blocks in the file system, it is the number of bytes in the file system divided by the block size (mke2fs ... -b bs ...). > > -- Robert Heller -- 978-544-6933 Deepwoods Software -- Download the Model Railroad System http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows heller(a)deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: mailcap for open document Next: linux, windows, mac file transfer and print network |