How to mount new partition on Red hat linux
Procedure that I use after you add the disk:
- Reboot the machine
- Check to see if the disk is present using
ls -l /dev/sd*
. If you started with only one disk and added another you should see/dev/sdb
-
fdisk /dev/sdb
and partition the disk. I'd recommend adding primary partition 1 using the entire disk. - reboot the system to let the system create the other necessary device files. In the above case
/dev/sdb1
. - Check to see if
/dev/sdb1
is present. If so, then you can create a filesystem on the disk. -
mkfs -t ext3 /dev/sdb1
to create the new filesystem. - I'd do the following also:
tune2fs -i 0 -c 0 -m 1 -e panic /dev/sdb1
. This inhibits the inconvient full fscks at mounts after a number of days and/or number of mounts. The system will still fsck the filesystem if necessary. Only reserve 1% of the diskspace for the root user. Otherwise, the default is to basically reserve 10%. Panic the system once filesystem errors are detected, default is to continue operations with the filesystem R/O. -
mkdir /mountpoint
8a.chmod 755 /mountpoint
. VERY important. -
add to the
/etc/fstab
:/dev/sdb1 /mountpoint ext3 defaults 0 1
Reboot your system and and do a df and see that your mount is present and active.
- You are done.