The order
- Partition table
- Make partitions
- File system
- Mount
Partitioning
There are parted, gparted, fdisk and cfdisk. parted and gparted can work on disks > 2TB.
To resize a normal partition, use cfdisk to delete and recreate it. This won't lose you any information, as long as you don't also format that partition and as long as it starts from the same sector.
To resize an LVM partition:
- Use cfdisk to create an extra partition.
- Reboot
- Use pvcreate to initialize your new partition for LVM
- Use vgextend to your old volume group over your new volume group.
- Use lvextend –resize to extend your logical volumn to fill its volume group.
BIOS Partition
Make a small (2MB?) first partition for BIOS to use.
Formatting
Formatting tools are usually called mkfs.filesystemtype, for example mkfs.ntfs
.
Swap file
There's also a mkswap
utility for making a partition into a swap partition.
Mounting
Make a directory to mount to (usually inside /media).
Then run sudo mount /dev/devicename /media/mydir
.
Devices are usually called sda sdb etc. Partitions are called sda1 sda2 and so on.
/etc/fstab
is used to control auto mounting on boot.
Try sudo fdisk -l
to see all the drives.