Registered: Feb 2004
More on RAID
OK, a bit of background.
I originally had one 30GB disk, with the usual mix of Linux (ext2) and Windows (FAT, NTFS) partitions on them. After buying a second 30GB disk, I wanted to see what I could with RAID. I also had a spare 10GB, which I initially installed Linux onto, just to see if I could get Debian+KDE more or less setup. Result: no problems at all (big thanks to Nvidia as well for making a fantastic module installer for their card...).
I also decided to make the move to Linux permanently, since I was tired of trying to persuade Windows to boot from another partition without re-installing.
The setup was thus:
RAID: HDE + HDG (each 30GB)
I experimented with the setup until I got the following working:
Boot from /dev/hda, using everything else on /dev/ataraid/d0, including root. This is not ideal, since I would actually like to boot from /dev/ataraid/d0, but I have not yet managed this. My lilo.conf thus has:
boot = /dev/hda
with a 'main' linux version of:
root = /dev/ataraid/d0p7
whilst a backup linux is available on HDA itself under
root = /dev/hda7
When installing a new kernel, I merely need to install the kernel and lilo to /dev/hda, so it's not too much of a problem (lilo can chroot). But it's not ideal, esp. since I want the 10GB disk to be a 'real' emergency disk, and not necessary to boot the system every day. I have kept a working Windows on the 10GB disk as well, in case of .. well, not much really -- games, I guess *G.
Anyway, I have been using the RAID as it is very intensively. After I set it up under the BIOS using the Promise tools, I had four partitions on it originally: 3 Primary and 1 Extended. The 3 Primarys were FAT32, NTFS and NTFS, whilst all the Linux stuff was in the Extended, under about 5 logical partitions (four system parts plus swap). I have been slowly copying files from one partition to another, intending to reduce the partitions down to a manageable size -- and of course intending to get rid of the NTFS and FAT32 stuff.
What I have found out -- which is *very* interesting -- is that with the NTFS partitions, when one deletes them, they are somehow "remembered" by the system, which is what I meant with my 'problem'.
I had /dev/ataraid/d0p7, which is 5GB in size, and NTFS. I have just copied it to /dev/ataraid/d0p2, which is already formatted as ext2. After verifying the files as best I can, I can now delete /dev/ataraid/d0p7. I also have some free space on the RAID, so I now do the following:
Run cfdisk /dev/ataraid/d0. Remove d0p7, and set up a new partition with a bigger size, using the remaining free space on the drive, say 10GB.
Use mke2fs to create a new filesystem on /dev/ataraid/d0p7.
Mount filesyystem (read-write) under /mnt to test it.
And now what happens is weird. One of two things happens: either the partition is mounted with the old information, which means the size and all the files seem to have magically survived the partition being deleted and recreated, OR I cannot mount the partition at all. In the first case, I also cannot write anything to the partition, because it has been mounted read-only (just like NTFS must be!!).
I finally solved this by in the first case running a double check on the partition (mke2fs -cc), which seems to have 'reset' the information about the partition. And in the second case I simply forced Linux to see the drive as ext2 by specifying this in the mount:
mount -t ext2 /dev/ataraid/d0p7 /mnt
which also works. But it's a bit shaky, to say the least.
And I'm still not happy with the setup, it's less than ideal to not boot from the RAID, and I think I will also need to use LVM, since at the moment I often need to re-size partitions, when addressing the disks as LVM would make a lot more sense (just the one partition on each disk, but split up using RAID and LVM).
So, my plan is as follows:
Get rid of ATA RAID, and use Linux native (md)
Re-structure the disk into four primary partitions:
/dev/hde1 - boot (RAID 1)
/dev/hde2 - swap (RAID 1)
/dev/hde3 - root (RAID 1)
/dev/hde4 - RAID 1 partition -> Goes into LVM
/dev/hdg same as /dev/hde
This way, I get the security of RAID on the essential three Linux partitions together with the flexibility of LVM for the other partitions which I need (for home, user, etc., etc.). All partitions will be formatted as reiserfs.
The only thing I am not sure about is how to 'switch off' ATA RAID, for which I need someone to answer my other thread in this forum!!
What would also be interesting, is if one can use *four* disks on the Promise controller -- there shouldn't be any reason why not...
Sorry for the long post!