Adding Raid 5 partition

Christofer C. Bell christofer.c.bell at gmail.com
Sun Apr 24 06:58:41 UTC 2005


On 4/23/05, stuart <stuart at jamesnet.ca> wrote:
> I have added 3 extra disks to my system, which i have created a new
> raid5 device on /dev/md0.  I wish to use this device to serve webpages,
> but when i change the document root directive in my httpd.conf, and
> restart the httpd server, i get the error that this directory does not
> exist. I have properly labeled md0 with "e2label" command and added the
> approriate stanza in my "/etc/fstab" to mount the directory
> automatically on boot. I have Selinux running on targeted policy and i
> have attempted to use "fixfiles" and "restorecon" so that Selinux
> recoginizes it.. But i am yet to have success. I have also tried just
> using a normal ext3 partition, that i created after installation, and i
> get the same error.

/dev/md0 is a metadevice that describes a raid5 disk volume, it's not
a directory.  While I'm not clear on what exactly you're doing from
your post, I have a sneaking suspicion that you've not mounted the
device anywhere.  What I believe you want to do is something akin to
the following:

# mkfs -t ext3 /dev/md0
# mount -t ext3 /mnt
# service stop httpd
# cp -a /var/www/html/* /mnt
# rm -rf /var/www/html/*
# umount /mnt
# mount -t ext3 /dev/md0 /var/www/html
# restorecon -R -v /var/www/html
# service httpd start

This creates an extended 3 filesystem on the new raid device, mounts
it in a temporary location, copies your existing web content to it,
removes the web content from the old location, and the replaces it
with the new raid device.  The restorecon is self-explanitory as are
the service commands.

If this isn't the issue, can you please give some more detail on the
problem you're experiencing?

-- 
Chris

() ASCII Ribbon Campaign!
/\ Say NO to HTML in Mail and News!




More information about the selinux mailing list