• Adding a new hard drive:

    fdisk -ul # this tells us the location of the new disk
    fdisk /dev/sdb

    n - create new partition
    p - primary
    1 - first partition
    the rest use the default options
    t - we intend to pick the relevant code for the partition
    83 - Linux (L lists the possible codes)
    w - write the modifications to disk
    Create new file system
    mkfs.ext3 /dev/sdb1
    Check the block size of a partition
    dumpe2fs /dev/sdb1 | grep -i 'size'
    edit /etc/fstab to add the new partition to be mounted
    /dev/sdb1 /mnt/data1 ext3 defaults 1 1
    mount /mnt/data1

  • Determine the type of file system on a drive: file -sL /dev/sd*

  • Installing linux on software RAID:
    1-Don't forget to leave a small amount of empty space (200MB) at the beginning of each disk so that grub can be installed on them easily afterwards. If you don't leave such empty space, you might end up getting "embedding is not possible" errors later on.
    2-Create identical partition tables on both disks, example: 8GB for swap, 250MB for /boot, 32GB for /, and 200GB for /home, each of these separately generated on both. None of these partitions should have filesystems on them, all of them must be "used as" "physical volume for raid".
    3-Start configuring software raid, create 4 MD devices by pairing the pieces on the two drives.
    4-Click on each of the 4 raid "partitions" and set them properly as swap, ext2, ext4, ext4 with the above mentioned mount points.
    5-Do not forget to install grub on both drives. By default, it is installed on a single drive, so you might need to manually run something like: "grub-install /dev/sda" and "grub-install /dev/sdb".
Topic revision: r3 - 21 Sep 2015, ErkcanOzcan
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback