linux poison RSS
linux poison Email

How To add another disk to running Linux system

In this example we will fdisk the disk attached to our 2nd array controller.

1. fdisk the new drive
* fdisk /dev/sda
* Make a new partition using fdisk (/dev/sda1)

2. format the new partition using mkfs
* mkfs -t ext3 /dev/sda1
* Note, if you will be storing lots of small files, you may need to increase the inode count. You do this when you format the drive. The default count of inodes will be good for most people.

3. Make a new directory to mount your new space to
* mkdir /newspace
* Note: If moving a current filesystem over to this new space, you will need to first mount the new space to a temporary mount point, move all the contents to it, then unmount that temporary mount point, and finally add an entry in /etc/fstab so it will mount automatically on bootup.

4. Have the new drive mount automatically
* vi /etc/fstab
* make a copy of an existing line
* change this new line to match your partition number

5. Test that your partition mounts ok according to the changes you made in /etc/fstab
* mount /dev/sda1 /newspace


Post a Comment

Related Posts with Thumbnails