Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filesystems/partitions

Status
Not open for further replies.

bitbybit

Programmer
Jul 28, 2002
10
US
Hi.

I am a dba using AIX but am now setting up a Linux server as well. I want to set up several filesystems, e.g. /var /home /usr /web but I think I am getting caught up on the way filesystems and partitions are defined on Linux.

I have Red-Hat 8.0 and after researching, decided to use ext3 for the type of filesystem. Further research indicates that Linux can have 4 partitions and then you have to set up extended partitions (which are logical).

I was going to use mkfs and create the filesystems with a type of ext3 but now I'm not sure if I have to create the partition and then create the filesystem.

I currently have the following:

/dev/sda2 /
/dev/sda1 /boot
none 0% /dev/shm



Can someone please shed light on this.

I am using to dealing with volume groups and file systems. And just having the filesystem mounted on the directory.

I have looked through the internet for info and I think the more info I have, the more I am confused.

Thanks so much.

Kathy

 
You have to create the partitions before you create the filesystem on them.

//Daniel
 
So since I have three partitions already, one for root; one for boot and one for swap, I only have one partition left and then have to create an extended partition and on that extended partition, I can create more filesystems?
 
bibybit,
Your fourth patition will be an extended partition. Inside of the extended partition you can add logical partitons. The file systems will then be defined to the logical partition. Think of it as the extended partion is a database file, and the logical partions are tables in the dbf.

Not as easy as AIX's logical volumn manager but workable once you get used to it.

Hope that helps.
 
usige,

you're right regarding the fact that AIX is easier. phew!

okay, I understand what you're saying. Now here's my next question. since I already have three partitions set up and the root partition has 32GIGs, can I create a logical partition inside an extended partition and still access the files within the directory I decide to mount it on? Or do I have to start the Install all over?

I am reading the RedHat documentation and it seems to indicate that if you have files already and then create a partition and mount the directory that the existing files will not be available until after you unmount. Argh.

Do I have to start all over?

 

You don't have to reinstall but you will have to move the files to the new filesystem. Just mount your new file system somewhere else and move the files, then remount the new file system in the right place.

Just a tip: Linux has an LVM similar to the one in AIX. You can create a fourth partition with fdisk and make it type 8e. Then do 'pvcreate /dev/sda4' to make it a PV.

Then use vgcreate, lvcreate and mkfs to create your file systems. You don't have to worry about primary and logical partitions with the LVM.

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top