Christofer C. Bell wrote:
On 4/23/05, stuart <stuart(a)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?
Hey Chris thanks for the help, that is essentialy what i had done, the
directory was mounted, but i had mounted it on a new partition directory
named "/www" and then had changed my "/etc/httpd/conf/httpd.conf" to
reflect the new document root settings, i ran the "restorecon -R -v
/www" and then reloaded the HTTPD server, the error i received was that
none of my new directory structure existed. I then tried as you posted,
to mount my new MD0 device in its the position "/var/www" , "mount -t
ext3 /dev/md0 /var/www" and ran "restorecon -R -v /var/www" this seems
to work as Apache loaded fine, where as me labeling "/dev/md0" as
"/www" and running "restorecon -R -v /www" didn't seem work for
me. I
know by default of course Apache has its core directory stored in "/var/www"
--
RHCE - RHEL4
CERT# 804005316914471
https://www.redhat.com/training/certification/verify