LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mount points and partition clarification (https://www.linuxquestions.org/questions/linux-newbie-8/mount-points-and-partition-clarification-207993/)

tuxrules 07-21-2004 03:37 PM

mount points and partition clarification
 
Hey all,
I have multi-boot with RH9/FC2/Winxp. Here's my disk geometry

/dev/hda - winxp

/dev/hdb1 - boot - 100 MB
/dev/hdb2 - "/" for RH9 - 5GB
/dev/hdb3 - Swap - 1GB
/dev/hdb4 - extended
/dev/hdb5 - "/" for FC2 - 5GB

hdb is 40 GB.

I have a question regarding mount points.
I want to fill up the empty space by making partitions for /usr, /var, /opt, /home.

since the "/" directories of respective distros already have /usr , /opt , /var and /home directories, does this mean that contents in /usr, /opt, /var, /home will be visible in newly created respective partitions.

One more question, I want to install slackware 10. I believe slackware recognizes ext3 and reiserfs. I'm going to create partition from RH9. I would like to use reiserfs. Is that possible or i've to stick with ext2.

I once installed slackware 10 (ext2 fs) few days back but then i had to format the whole harddrive as my fs corrupted due to power failure.

Any pointers???
Thanks in advance

Komakino 07-21-2004 03:55 PM

First...why did you use ext2 with slackware 10? It gives you the option to use both ReiserFS and ext2...either would have been better!

Second...if you create a new /usr partition you will have to copy all the files over from your current /usr directory for them to be usable. You will also have to put an entry in /etc/fstab for the new partition and mount point.

Third...no, it's perfectly fine for partitions to use different filesystems to each other. On my old box I used ext3 on / and reiserfs on /home.

tuxrules 07-21-2004 03:59 PM

That enlightens me!!! I'll try out reiserfs for slackware 10.

Thanks,

crusher 07-21-2004 04:03 PM

Re: mount points and partition clarification
 
Quote:

Originally posted by tuxrules
Hey all,
I have multi-boot with RH9/FC2/Winxp. Here's my disk geometry

/dev/hda - winxp

/dev/hdb1 - boot - 100 MB
/dev/hdb2 - "/" for RH9 - 5GB
/dev/hdb3 - Swap - 1GB
/dev/hdb4 - extended
/dev/hdb5 - "/" for FC2 - 5GB

hdb is 40 GB.

I have a question regarding mount points.
I want to fill up the empty space by making partitions for /usr, /var, /opt, /home.

since the "/" directories of respective distros already have /usr , /opt , /var and /home directories, does this mean that contents in /usr, /opt, /var, /home will be visible in newly created respective partitions.

One more question, I want to install slackware 10. I believe slackware recognizes ext3 and reiserfs. I'm going to create partition from RH9. I would like to use reiserfs. Is that possible or i've to stick with ext2.

I once installed slackware 10 (ext2 fs) few days back but then i had to format the whole harddrive as my fs corrupted due to power failure.

Any pointers???
Thanks in advance


Quote:

OK.... I would suggest not to make such a lot of separate mount points. Keep it easy. I would just create a separate mount point for /Home and maybe for /var. The rest I would keep under /.

Anyway back to your question:
If you mount a partition to a certain directory, you would see only content of the mounted volume.
It doesn't matter even if you have already a directory under / (e.g. /var) with stuff in it and now you mount your partition /dev/hdb4 to /var, you would see only the content of /dev/hdb4. This means you can mount everything to any directory.

The other way around means, if you have during the installation /dev/hdb4 mounted on /var and after installation you unmount /dev/hdb4 you just leave an empty directory /var on your / partition. It's Linux, everything is just a question of virtual and logical devices .

Regarding your Partition format (ext2 / reiser)
As far as I know you have to stick with this format or you have to format the partition new. Make a backup and reformat the partition with reiserfs. I could imagine that there are tools around, which can transform ext2 into reiser, but I am not sure and never have thought about something like this :-)

I hope I could help a bit

Regards

Crusher

Komakino 07-21-2004 04:15 PM

The tool to format a disk to reiserfs is mkreiserfs (as root). It will erase all data though.

crusher 07-21-2004 04:33 PM

Quote:

Originally posted by Komakino
The tool to format a disk to reiserfs is mkreiserfs (as root). It wil erase all data though.
Thanks ... I know :-) But I was thinking about a tool, which maybe can transfer ext2 into reiserfs. I am not sure if something like this exists.

Komakino 07-21-2004 04:35 PM

Quote:

Originally posted by crusher
Thanks ... I know :-) But I was thinking about a tool, which maybe can transfer ext2 into reiserfs. I am not sure if something like this exists.
I don't think so, but it is possible to convert a partition to ext3 from ext2:
tune2fs -j /dev/xxx

xxx being the partition you want to convert. It only adds a journal, keeping data intact.

tuxrules 07-21-2004 04:43 PM

I've reformatted my harddrive several times for various reasons and to answer all your questions - I would like to run a webserver on my linux. I ran a webserver before my fs got corrupt (I only had important data in /home which i backup up). I would also like to run a ftp server occasionally and would run shoutcast audio streaming server.

Now coming to crusher's post...
My earlier config was everything under "/" - which was pretty then (about 25 GB). Now I read somewhere that if I have a small "/" size (as it it the case with me right now, 5 GB and with packages installed only about 1.5 GB free) and I'm running a webserver my logs could fill in the free space quickly. I also read a lot of places about making partition for various important directories like /var, /usr etc. My idea is to make /var, /usr, /home, /opt only that I might install more softwares in future and I dont want to run out of space in "/" and then resize the partitions.

For Komakino's tip,
i'll be using parted to make reiserfs partition for slackware 10
#parted -i /dev/hdb print
take start and end blocks from above and then

#parted -i /dev/hdb mkpartfs logical reiserfs start end

I think this should do.
Thanks,
tuxRULES!

crusher 07-21-2004 05:16 PM

Quote:

Originally posted by tuxrules
I've reformatted my harddrive several times for various reasons and to answer all your questions - I would like to run a webserver on my linux. I ran a webserver before my fs got corrupt (I only had important data in /home which i backup up). I would also like to run a ftp server occasionally and would run shoutcast audio streaming server.

Now coming to crusher's post...
My earlier config was everything under "/" - which was pretty then (about 25 GB). Now I read somewhere that if I have a small "/" size (as it it the case with me right now, 5 GB and with packages installed only about 1.5 GB free) and I'm running a webserver my logs could fill in the free space quickly. I also read a lot of places about making partition for various important directories like /var, /usr etc. My idea is to make /var, /usr, /home, /opt only that I might install more softwares in future and I dont want to run out of space in "/" and then resize the partitions.

For Komakino's tip,
i'll be using parted to make reiserfs partition for slackware 10
#parted -i /dev/hdb print
take start and end blocks from above and then

#parted -i /dev/hdb mkpartfs logical reiserfs start end

I think this should do.
Thanks,
tuxRULES!

Sounds OK. But just remember about logical volume manager (LVM) for linux. With this you are able to span multiple volumes across several hard drives. It could be handy for later upgrading :-)

Here a link:
http://tldp.org/HOWTO/LVM-HOWTO/

Just have a look. You can even resize your partitions without any data loss.

LVM is great :-)

Crusher


All times are GMT -5. The time now is 11:49 AM.