Re: Partitioning RAID5 disks into 2 Filesystems
Andrew Cady wrote: Use cfdisk to create partitions; using fdisk is afaik deprecated. *Always* reboot after creating partitions or changing the partition table before doing anything else, and verify that the partitions have been created in the way you wanted after the reboot. This isn't necessary if the kernel re-reads the partition table. cfdisk will notify you if it did not. Yeah, it does, but if it fails nonetheless ... The safest way is probably a reboot --- but I must admit that I didn't reboot during the installation process when renewing the mail server this weekend. But then, the disks were new anyway :) It only fails if a partition on the disk is mounted. I'd say that it *should* fail then :) By the way, if the re-read fails, you can always umount and then run "sfdisk -R" (or cfdisk and hit W) to try it again. The sfdisk man page recommends running this before changing your partitions, so you know whether it will succeed afterwards. Good idea! Ah, that's something to check out. I've never used sfdisk yet. The BUGS section of the manpage of fdisk has some quite noteworthy hints: "There are several *fdisk programs around. Each has its problems and strengths. Try them in the order cfdisk, fdisk, sfdisk. (Indeed, cfdisk is a beautiful program that has strict requirements on the partition tables it accepts, and produces high quality partition tables. Use it if you can. fdisk is a buggy program that does fuzzy things - usually it happens to produce reasonable results. Its single advantage is that it has some support for BSD disk labels and other non-DOS partition tables. Avoid it if you can. sfdisk is for hackers only - the user interface is terrible, but it is more correct than fdisk and more powerful than both fdisk and cfdisk. Moreover, it can be used noninteractively.)" When the manpage of a program tells you that the program is buggy and that you should not use it, that should tell you something :) GH -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Partitioning RAID5 disks into 2 Filesystems
On Thu, Mar 09, 2006 at 10:42:07AM +0100, . wrote: > Pabla,Balbir [Ontario] wrote: > > > I thought, the process should be fdisk followed by mkfs. > > Use cfdisk to create partitions; using fdisk is afaik deprecated. > *Always* reboot after creating partitions or changing the partition > table before doing anything else, and verify that the partitions have > been created in the way you wanted after the reboot. This isn't necessary if the kernel re-reads the partition table. cfdisk will notify you if it did not. It only fails if a partition on the disk is mounted. This is a long-standing kernel bug; the kernel hackers disagreed on the best way to fix it, so it remains broken. (Actually, it may be fixed in recent versions). By the way, if the re-read fails, you can always umount and then run "sfdisk -R" (or cfdisk and hit W) to try it again. The sfdisk man page recommends running this before changing your partitions, so you know whether it will succeed afterwards. Good idea! -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Partitioning RAID5 disks into 2 Filesystems
On Wed, Mar 08, 2006 at 01:15:40PM -0500, Matthias Julius wrote: > Andrew Cady <[EMAIL PROTECTED]> writes: > > > RAID devices typically are named /dev/md0 for the first, and so on; or > > /dev/md/0 for the devfs naming scheme. (md stands for multi-disk; the > > software RAID driver in linux is called "md"). In any case the first > > raid device (md0) has major number 9 and minor 0. > > I thought he has a hardware RAID controller. Oh. Nevermind the above, then. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Partitioning RAID5 disks into 2 Filesystems
Pabla,Balbir [Ontario] wrote: I thought, the process should be fdisk followed by mkfs. Use cfdisk to create partitions; using fdisk is afaik deprecated. *Always* reboot after creating partitions or changing the partition table before doing anything else, and verify that the partitions have been created in the way you wanted after the reboot. I've seen it failing once, and you don't want to create a new filesystem and thereby accidentially overwrite something else or run into other troubles later because the boundaries of the partitions are incorrectly recognized :) 1. How to recognise the device file for RAID5 ? fdisk -l, cat /proc/devices and cat /proc/scsi/scsi might help. Ls -l /dev My guess is /dev/sda is for RAID1 and /dev/sdb is for RAID5. Am I correct that device file for all the RAID5 disks is /dev/sdb /dev/sda is the first SCSI disk, /dev/sdb is the second. See /usr/src/linux/Documentation/devices.txt. May I know exact sysntax of commands to partition and create 2 filesystems on my 7 RAID disks. After creating the partitions with cfdisk, use mkfs -j to create ext3 filesystems on them. You may want to use LVM if you need the advantages it offers, but using it also means to add a layer of serious (software) complexity to a system that should be as failsave as possible and therefore be kept as simple as possible. GH -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Partitioning RAID5 disks into 2 Filesystems
Andrew Cady <[EMAIL PROTECTED]> writes: > RAID devices typically are named /dev/md0 for the first, and so on; or > /dev/md/0 for the devfs naming scheme. (md stands for multi-disk; the > software RAID driver in linux is called "md"). In any case the first > raid device (md0) has major number 9 and minor 0. I thought he has a hardware RAID controller. This would then present the whole RAID device as SCSI drive e.g. /dev/sdb. Matthias -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Partitioning RAID5 disks into 2 Filesystems
"Pabla,Balbir [Ontario]" <[EMAIL PROTECTED]> writes: > I tried : > fdisk -s 102000 /dev/sdb... it says cannot open 102000 ... > What is wrong with my syntax? You don't have a partition called 102000. >From man fdisk , | -s partition | The size of the partition (in blocks) is printed on the | standard output. ` This is not what you want. This prints the size of the partition on screen. Try 'fdisk /dev/sdb' > > May I know exact sysntax of commands to partition and create 2 > filesystems on my 7 RAID disks. Type 'm' at the fdisk prompt. Matthias -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Partitioning RAID5 disks into 2 Filesystems
On Wed, Mar 08, 2006 at 10:20:57AM -0500, Pabla,Balbir [Ontario] wrote: > 1. How to recognise the device file for RAID5 ? RAID devices typically are named /dev/md0 for the first, and so on; or /dev/md/0 for the devfs naming scheme. (md stands for multi-disk; the software RAID driver in linux is called "md"). In any case the first raid device (md0) has major number 9 and minor 0. > Ls -l /dev My guess is /dev/sda is for RAID1 and /dev/sdb is > for RAID5. Am I correct that device file for all the RAID5 disks is > /dev/sdb No. sda is the first scsi disk; sdb is the second. > I tried : > fdisk -s 102000 /dev/sdb... it says cannot open 102000 ... > What is wrong with my syntax? See fdisk(8). This option does not do what you think it does. > May I know exact sysntax of commands to partition and create 2 > filesystems on my 7 RAID disks. Your RAID device must be divided into partitions when it is created, or not at all. The proper way to do this is to have one RAID partition, and then put LVM on it. The LVM partition can then be further divided into partitions. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]