Installing a new hard drive isn't a particularly arduous task, but there are a few commands I usually forget. Here are the steps I take after hooking up a new drive:
- Run fdisk -land find the new drive's device (we'll call it xxx).
- Run sudo fdisk /dev/xxxand create a new primary partition (entern,p,1, default, default).
- Run mkfs.ext3 /dev/xxx1to format the new partition.
- Label the new ext3 partition using sudo e2label <new-label>
- Refresh /dev/disk/by-uuidusingsudo /etc/init.d/udev restart
- Edit /etc/fstab to add the new partition to the list of mounts.