Raspberry Pi Home Server - step 4 : Preparing the disk

Now that we have our ready to use system thanks to installation of Moebius, We can move on to the configuration of the hard disk and its partitions.step4-1

  1. As a first step it should be obviously connect our disk and connect it to the Pi Raspberry !
  2. Detect the name of the device with the command dmesg

    Name of the disk with dmesg

    Name of the disk with dmesg (Click to enlarge)

  3. If we return to what has been defined in the post on the hardware, with the command fdisk Here's what it takes create :

    Output of the command fdisk after the definition of partitions

    Output of the command fdisk after the definition of partitions

  4. We are not going to touch the HFS partition (/dev/sda1) for the moment. We'll talk when Time Machine.Il setting must prepare the partitions with the commands
    mkfs.ext4/dev/sda2/dev/sda3/dev/sda4 mkfs.ext4 mkfs.ext4
  5. So now we have to automatically mount different partitions at startup of Raspberry Pi. For this, just change the file /etc/fstab as below. We will see later in updating it to rights-manage because here partions are all mount with the user root.
    /dev/sda2/media/usbdrive/internet ext4 defaults 0 0
    
    /dev/sda3/media/usbdrive/private ext4 defaults 0 0
    
    /dev/sda4/media/usbdrive/share ext4 defaults 0 0

    So at home I created a directory /Media/usbdrive then a directory by partition usage

  6. Here is the result of occupation of disks

    Result of the disk share

    Result of the disk share

On the other hand, a point that I have not yet clarified it is why my memory went from 29 MB to 32 MB …

Decrease of 3 MB of memory with mounting partitions

Decrease of 3 MB of memory with mounting partitions

If you have evidence I'm interested because having regard to the objective of the project, 3Mo ça peut servir 🙂

Cheers for the installation of the first service

Like this article ? Bear with me on patreon!

You may also like...