Before you do anything, read the man page for
fdisk. Better still, read the
linux partition howto, especially the chapter on 'partitioning with fdisk'. Sorry not to give you a one or two line answer, but that document is so on-topic and complete that I couldn't possibly be more concise.
You can then start by making yourself root, and running
fdisk /dev/sdb. Use the 'p' command to see if there are any existing partitions. If there are none, then use the 'n' command to make one or more partitions. You can create an arbitrary number of partitions, of whatever size you want. If you are going to use the entire space for similar types of files, then a sinlge partition of type 'ext2' (82) is probably appropriate. If this is a Windows dual-boot host, maybe now is a good time to create a partition for sharing between Linux & Windows; a few Gigabytes of FAT32 serves well for that. If you are going to be backing up this new space, it might make sense to match partition sizes with the size of the backup media. Its all up to you, though.
So having created the new partition(s), which will be named /dev/sdb1, /dev/sdb2..., you will need to create a filesystem on each one. If you have created a linux partition on the first partition of the new drive, then use
Code:
mkfs -t ext2 /dev/sda1
This will format the partition with the filesystem type 'ext2'. Repeat for all partitions, using the filesystem type appropriate to that partition.
Now, you can mount the partitions on your existing root filesystem. Make a mountpoint. In this sample, I will use the names of the partitions, but you can choose any name that is appropriate, such as matlab, matlabdata, etc.
As root,
This will simply create a directory, upon which the new partition will be mounted. You will only have to do this once for each partiton you want to mount. You can create such directories anywhere in the filesystem. You can even use existing directories, and these will be 'replaced' by the new partiton when you, next, mount the partition.
Again, as root
Code:
mount -t ext2 /dev/sdb1 /sdb1
The partiton will be mounted on /sdb1, and you should be able to see it, read, and write to it according to the ownership and priveleges that were set up on the mountpoint. See the 'mount' man-page for details of assigning different permissions to the mounted partition.
The previous step will need to be repeated after any re-boot, unless you make an appropriate entry in /etc/fstab. An appropriate entry for the above example might look like
Code:
/dev/sdb1 /sdb1 ext2 rw,users,umask=022 0 0
Make one new entry for each partiton that you want mounted at boot time.
All of this and more is detailed in the Howto that I pointed out at the top if this post. Really recommended reading.
--- rod.
edit: forgot to mention off the top, that your new disk is /dev/sdb. SATA drives tend to look like SCSI drives...