Can't seem to find the right info on this

Started by
4 comments, last by Nervo 20 years, 7 months ago
After installing linux on the new HD for the server, I didn''t actually do anything manually with the partitioning scheme as I allowed Redhat to do it automatically. I might want/have-to change that. But for now I was interested in finding out how I can find what partition has a certain directory. For instance /var doesn''t have its own partition, but I want to find out if it is on hda1 or hda2. And depending on where it is, I might want to move a certain folder one level below the /var/www/html directory to another partition that has more space allocated to it. I can''t seem to find the right way to do this (if its possible nonethless, though I think it should be). I thought maybe the ''mount'' command might be the right one but it doesn''t seem so. Does anyone have the right commands for these two issues? Thanks alot with a cherry on top
Well, R2D22U2..
Advertisement
/etc/fstab would be the place to look under fbsd anyway.. perhaps similar in RH land?
The command "df" shows where each partition is mounted. It also displays information about available space, etc.
df should display it as well.

If it''s not a mount point, you can just deduce its on the same partition as /.

Int.
Thanks Interim, I thought that was probably the situation and I confirmed it after copying a file from another computer and verifying the free space within hda1.

Someone from another site had suggested to someone who wanted to know the same thing I did that this should be done as an example:

mkdir /home/usr
cp -a /usr /home/usr
telinit 1
umount /usr
mv /usr /usr.old
ln -s /home/usr /usr
telinit 5

I might need to research that.
Well, R2D22U2..
What would be easier would be to just create a symlink to to a directory on a bigger partition.

Say you have a large www site, you install a new drive (or partition). You can just mv www /your/new/partition. Then, create a symlink in /var/www -> /your/new/partition/www.

Of course, if this is just for apache, you can change apache''s directory in the httpd.conf and move your directory, skipping the symlink.


Int.

This topic is closed to new replies.

Advertisement