LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Creating Hardware or Software RAID 1 setup on two existing drives: How? (Fedora 10) (https://www.linuxquestions.org/questions/linux-newbie-8/creating-hardware-or-software-raid-1-setup-on-two-existing-drives-how-fedora-10-a-694581/)

sauceboxcreative 01-02-2009 05:47 PM

Creating Hardware or Software RAID 1 setup on two existing drives: How? (Fedora 10)
 
Prior setup: windows 2003 server with two 400GB SATA drives running on a Promise TX2300 Raid controller set up as RAID 1/Mirror.

Hardware has stayed the same, but the box has been moved to Fedora 10. The OS can see all of my physical drives--no problem. Both of the two prior drives maintain the former drive label (VCMIRROR) and mount at startup. Currently the devices mount at /dev/sdb1 and /dev/sdc1.

What I can't figure out is how to create a mirror raid on these drives (in Linux). Formatting the drives is no problem; data was properly backed up and verified.

The point of all of this is to run an XP VM in VirtualBox (successfully done on my laptop; that part is easy), but the essential problem is that when setting up the XP virtual drive, I'm out of space (the actual Fedora OS is installed on a 40GB drive, and I need XP to have the full 400GB that the mirror provides).

EDIT: Something is somewhat working....

It looks as if I've gotten the RAID to work, but I can't seem to make it initialize into a valid linux 'space' (i.e., when saving files, or creating VM hard disk images, all I get is the original 40GB drive). How to I move the drive from the /media/ pool to a /useful space/ pool?

From the terminal, hopefully this will help:

[root@master Administrator]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
35188408 2533688 32297640 8% /
/dev/sda1 194442 20862 163541 12% /boot
tmpfs 768828 544 768284 1% /dev/shm
/dev/sdd1 976768032 842022728 134745304 87% /media/BACKUP
/dev/md0 390643708 203932584 186711124 53% /media/VCMIRROR
[root@master Administrator]# mount /dev/md0
mount: /dev/md0 already mounted or /media/VCMIRROR busy
mount: according to mtab, /dev/md0 is already mounted on /media/VCMIRROR



I'm completely (about a week or so) new to Linux, but not to administration. If anybody could lend a hand....

tommylovell 01-04-2009 10:06 AM

I'm not familiar with Virtualbox (and suspect that this is the case with others, as there have been a lot of views, but no responses), but I'll take a stab at this.

Your 400GB RAID1 /dev/md0 (as you said, composed of /dev/sdb1 and /dev/sdb1) is being mounted on /media/VCMIRROR.
If you want it mounted elsewhere, you need to first unmount it: 'umount /media/VCMIRROR' or 'umount /dev/md0'.
(You can umount it by device name or mountpoint by virtue of the fact that there is an entry in '/etc/fstab'.)

Once unmounted you should be able to mount it where it will be useful to Virtualbox. There I can't help you,
but it would be in the form 'mount /dev/md0 /<mountpoint>'

Once happy with where you've mounted it, don't forget to update '/etc/fstab' so that it is mounted at boot time.

By the way, to check that your Software RAID is healthy, there is a pretty obscure method: 'cat /proc/mdstat'

I've got two Software RAID arrays on my system
Quote:

[root@athlon5k2 ~]# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md1 : active raid1 sda5[0] sdb5[1]
1440026304 blocks [2/2] [UU]

md0 : active raid1 sda2[0] sdb2[1]
25005056 blocks [2/2] [UU]

unused devices: <none>
[root@athlon5k2 ~]#
If you have questions or problems with Virtualbox, you can post a new question with Virtualbox in the title. That might get a better response.

Good luck.


All times are GMT -5. The time now is 10:09 PM.