First step: Create a partition root# fdisk/dev/had à enter into the newly added hard drive
The number of cylinders for this disk was set to 10402.There is nothing wrong with the, but the is larger than 1024x768,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 the other OSs(e.g., DOS fdisk, OS/2 fdisk) Command (M for help): NÀ create a new partitionCommand Actione Extendedp Primary partition (1-4)PÀ create a primary partitionPartition Number (1-4): 1À new primary partition numberFirst cylinder (1-10402, default 1):Using Default value 1Last cylinder or +size or +sizem or +sizek (1-10402, default 10402): +500mÀ create primary partition size Command (M for help): WÀ save the created primary partition |
Step two: Make the newly created partition effective immediately in the system
Step three: Format the newly created partition
[email protected] ~]# mkfs.ext3/dev/hda1mke2fs 1.39 (29-may-2006)Filesystem label=OS Type:linuxBlock size=1024 (log=0)Fragment size=1024 (log=0)122400 inodes, 488848 blocks24442 Blocks (5.00%) reserved for the Super userFirst data block=1Maximum filesystem blocks=67633152block Groups8192 blocks per group, 8192 fragments per group2040 inodes per groupsuperblock backups stored on blocks:8193, 24577, 40961, 57345, 73729, 204801 , 221185, 401409 Writing inode Tables:doneCreating Journal (8192 blocks): doneWriting superblocks and filesystem accounting Information:done This filesystem would be automatically checked every mounts orwhichever comes first. Use Tune2fs-c or-i to override.[email protected] ~]# |
Fourth step: Mount the newly created partition under the/MNT/RHCE01 directory
Root#mount/dev/hda1/mnt/rhce01 |
Fifth step: Make the mount still valid after the system restarts
root# Vim/etc/fstabÀ edit this file, add the following line so that the mount is valid after the restart; label=/1/ext3 defaults 1 1tmpfs/dev/shm tmpfs defaults 0 0devpts/dev/pts devpts gid=5,mode=620 0 0Sysfs/sys Sysfs defaults 0 0proc/proc proc Defaults 0 0Label=swap-sda3 Swap swap defaults 0 0/dev/hda1/mnt/rhce01 ext3 defaults 0 0 |
Linux Add new hard disk, partition, format, auto mount