Formatting and mounting 2. hard drive

  • I just installed LibreELEC after building an HTPC again.

    Many years ago I used OpenELEC and networked storage, but this time around I went for a SSD bootdrive and a large HDD storage drive.

    After installing LibreELEC though, I couldn't access the other HDD, it occurred to me that it wasn't formatted being brand new. I've messed around with it for an hour now, and I simply cannot find anything on the interwebs that I can make work.

    If somebody could help, or point me in the right direction, that would be much appreciated.

  • Double check your HDD for errors. Linux can be picky with those buggers. Also a Windows suspend or hibernation mode is not appreciated.

    Execute the following commands via SSH and give us each of the returned URLs.

    Code
    blkid | pastebinit
    mount | pastebinit
    dmesg | pastebinit
  • Code
    parted -s /dev/sdb mklabel gpt
    parted -s /dev/sdb mkpart primary ext4 40s 100%
    parted -s /dev/sdb name 1 'MEDIA'
    mkfs.ext4 -L "MEDIA" /dev/sdb1
    fsck.ext4 -y /dev/sdb1

    ^^ this creates a GPT partition structure, creates a single primary ext4 partition that is 100% of the available space, labels the partition "MEDIA" then formats an ext4 filesystem labelled as "MEDIA" (for consistency) then fsck's the partition to ensure all is okay. Commands assume /dev/sda is the boot SSD and /dev/sdb is the secondary HDD. You need to check/validate /dev/sdb by checking dmesg output as the commands are destructive.

  • Thank you for this post! I just added a hard drive to my new PC Kodi box and I would have been futzing around for days if I hadn't have found this information. Quick and easy.

    Bruce

  • i had the same issue. It worked... almost...

    I installed tranmission, with docker it's downloading files, but it seems it not writing to my MEDIA drive... probably a permission issue

  • Code
    parted -s /dev/sdb mklabel gpt
    parted -s /dev/sdb mkpart primary ext4 40s 100%
    parted -s /dev/sdb name 1 'MEDIA'
    mkfs.ext4 -L "MEDIA" /dev/sdb1
    fsck.ext4 -y /dev/sdb1

    ^^ this creates a GPT partition structure, creates a single primary ext4 partition that is 100% of the available space, labels the partition "MEDIA" then formats an ext4 filesystem labelled as "MEDIA" (for consistency) then fsck's the partition to ensure all is okay. Commands assume /dev/sda is the boot SSD and /dev/sdb is the secondary HDD. You need to check/validate /dev/sdb by checking dmesg output as the commands are destructive.

    Thanks for this help on adding a second hard drive!