Command (m for help):
l logical (5 or over)
p primary partition (1-4)
First cylinder (1-32768, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-32768, default 32768):
--> +30000M (just an example for 30G)
repeat for every amount of logical partition(s) you like until all space is full.
--> w (write partitions to disk)
--> fdisk -l (shows all partitions found)
then create a filesystem on the partition(s) you've just set up.
--> mkfs.ext3 /dev/sdb5 (just an example, you can also use mkfs.reiserfs and others you like/need)
create an entry in /etc/fstab like:
/dev/sdb5 /MY-DATA-DISK ext3 acl,user_xattr 0 1
- if you don't want it to mount at boot you can add "noauto" to the options "acl,...."
- if it should be mountable by ordinary users add "user"
- the first digit (0) is called "dump flag", can be ignored, google for it if needed.
- the 2nd digit (1) is used for file system checks during boot if something has gone bad. 1 = first partition to check, 2 = second ....
- make sure /MY-DATA-DISK actually exists.
now decide which file permissions should be set on that directory
- set appropriate permissions on the mount-point with "chown" / "chmod". if you need access control lists (somewhat like in windoze) have a look at "setfacl" and "getfacl"
owner: root (can do ANYTHING)
group: users (should be able to read, write, execute = change into directory)
--> chown root.users /MY-DATA-DISK
--> chmod u+rwx,g+rwx,o-rwx /MY-DATA-DISK
--> ls -lsd /MY-DATA-DISK
drwxrwx--- 2 root users 4096 2007-07-23 21:39 MY-DATA-DISK/
for more detailled access control you need to use ACLs (access control lists).
some info here: http://www.suse.de/~agruen/acl/chapter/fs_acl-en.pdf