PDA

View Full Version : URGENT: How to create ext3 partition and mount???


mrvajrala
8th July 2005, 06:54 PM
:confused:

Hello All,

I need to create couple of File Systems to install Oracle software and for other stuff that come along with it.

I used fdisk to create a partition (/fdisk /dev/sda) , but it is creating a ext2 partition. How to create a ext3 partition??

Also I am not sure about the entries that are required to edit the "/etc/fstab" for the newly created filesystem.

Can someone guide me with a step-by-step process?

I really appreciate your help.

Thank you,
Madhu

tc3driver
8th July 2005, 07:30 PM
Fdisk is fine for creating the "partition"
you format it as ext3

[root@bill01 ~]# fdisk /dev/sda
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 4500.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): d
No partition is defined yet!

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-4500, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-4500, default 4500):
Using default value 4500

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@bill01 ~]#
[root@bill01 ~]# mkfs.ext3 /dev/sda1
mke2fs 1.37 (21-Mar-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
4521984 inodes, 9036554 blocks
451827 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=12582912
276 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@bill01 ~]#
[root@bill01 ~]# mkdir /newhd
[root@bill01 ~]# mount /dev/sda1 /newhd
[root@bill01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 73G 9.0G 60G 14% /
/dev/hda1 677M 23M 620M 4% /boot
/dev/shm 506M 40K 506M 1% /dev/shm
/dev/hdh1 294G 205G 74G 74% /anime
/dev/hdg1 230G 210G 8.5G 97% /unwatched
/dev/sda1 34G 81M 33G 1% /newhd
[root@bill01 ~]#

as for fstab
add this line under your main hd...

/dev/sda1 /newhd ext3 defaults 1 1

mrvajrala
8th July 2005, 07:57 PM

Thank YOU very much for quick response. I will use "mkfs.ext3" as you suggested.

Thansk again,
Madhu