How to finish partitioning the 8TB drive I put LibreElec 10 on?

  • All,

    I installed LibreElec 10 on a Raspberry Pi 4 that is attached to an 8TB WD drive. I ended up with the following configuration:

    Model: WD My Book 25EE (scsi)
    Disk /dev/sda: 8002GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: msdos
    Disk Flags:
    Number Start End Size Type File system Flags
    1 4194kB 541MB 537MB primary fat16 boot, lba
    2 541MB 575MB 33.6MB primary ext4

    I'd like to partition the rest of the drive to make full use of this drive. I'm sure partition 1 is the boot drive and has LibreElec and Kodi on it. How can I tell what is on partition 2? Even that partition is only 33MB in size. What commands can I use to wipe that partition 2 (if possible) and then create one massive partition for my media storage in Kodi? Thanks much!

    If I run the command:
    mkpart extended ext4 575 8002

    I get an error "Invalid number". Any help is greatly appreciated!

    Dave

  • An msdos partition table is limited to 2 TB. Since the drive has an msdos partition table then you will need to consider reformatting the drive with a GPT (GUID Partition Table) to be able to access more than 2 TB. Remember to back up all your important information first!

  • Partition Table: msdos

    I'd say that GPT is a better suited partition table.

    Create a bootable USB stick with the GParted ISO, and install the GPT partition table on the 8TB drive (all info will be wiped).

    Then create the EXT4 primary partition, and after that, you could do a full disk check since it seems to be a new drive. It can take some time, but better be safe than sorry. Also check the drive's S.M.A.R.T. error log.

    When that's all done, you're good to go with the RPi4 & LibreELEC.

  • you could do a full disk check since it seems to be a new drive. It can take some time

    a "smartctl -a /dev/sda" before reports how long it will last

    e.g.

    Short self-test routine recommended polling time: ( 2) minutes.

    Extended self-test routine recommended polling time: ( 104) minutes.

    so

    smartctl -t short /dev/sda for the first

    smartctl -t long /dev/sda for the second

    both will report when the command is complete !

    smartctl -X /dev/sda (uppercase "X") will abort the test

    Edited once, last by GDPR-7 (November 2, 2021 at 4:40 PM).

  • The "msdos" partition table type is what LibreElec created for me when I installed the software using the imager. Is there a way to change that so that the imager builds a GPT partition instead? Otherwise, how do I change the partition type on the boot drive? Can I just copy all of the files off to a USB stick, partition the drive as one giant GPT/EXT4 partition and copy the files back and it still be bootable?

  • and then create one massive partition for my media storage

    I would do the following after you changed the partition table to GPT:

    - I'm unsure if and how it's doable -

    e.g.

    a) does the LE installer leave the partition table as is during a new LE install ??? and

    b) is it possible to limit the size of the storage partition under the installer ?

    if both answers are "yes":

    I would partition the disk as following:

    1. one usual boot partition for LE

    2. one usual storage partition for LE, let's say ~1 GB or more in size

    3. a third partition for the whole media's mounted [1] in an directory on the usual storage partition of LE (size: rest of the disk)

    in short:

    a usual LE install with a limited size of the LE storage partition and an additional third partition

    background:

    if in the future a LE release comes out and a new/fresh/clean install is recommended (e.g. a upgrade is impossible)

    one could unmount the third (media) partition, new install the shiny new LE and mount the partition back again

    benefit:

    NO movement of the whole media's to another disk is needed (maybe time consuming) before fresh install !

    [1]

    via a script or maybe it's done automatically [2]

    [2]

    running an release LE on an ssd and an nightly LE on an USB Stick: media from the ssd is mounted into a directory of the stick without manually intervention

    (via udev, systemd ???)

    +++ EDIT +++

    tested it with release LE 10.0.1 :

    answer for question b) is NOanswer for question a) is unclear (don't know what the partition table was before; now it is GPT on a 500 GB disk)

    partitions from another disk in the same box are auto. mounted to /var/media/

    Edited 3 times, last by GDPR-7 (November 3, 2021 at 12:10 AM).

  • The "msdos" partition table type is what LibreElec created for me when I installed the software using the imager.

    Wait.. Are you installing LibreELEC itself directly on the 8TB drive? I would not recommend that.

    Keep LibreELEC on a SDcard or bootable USB stick, and keep your media (movies/series/music) on the 8TB drive.

  • Wait.. Are you installing LibreELEC itself directly on the 8TB drive? I would not recommend that.

    Keep LibreELEC on a SDcard or bootable USB stick, and keep your media (movies/series/music) on the 8TB drive.

    It would be more reliable to run LE from the 8TB drive as less chance of failure than an SD card or USB stick.

    The biggest downside of course being to recreate the partitioning. If the start and end sectors are noted it should be possible to wipe out msdos and create a gpt table, then recreate the partition at the correct place. No data is inherently lost, but care needs to be taken to pull it off successfull.

  • It would be more reliable to run LE from the 8TB drive as less chance of failure than an SD card or USB stick.

    Meh... Keeping your programs and tools away from your data is one lesson I learned years ago. Besides, disk fragmentation could be increased by all the small thumbnail cache files that will plant themselves amoung the big(ger) movie/tvshow files over time.

    SDcards are at the top of the f-o-o-d chain as far as storage corruption goes, IMO.

    USB-sticks are more sturdy, I have experienced much less corruption with them.

    I now use a USB30/SATA cable on a OCZ Vertex 1 60GB SSD (from 2009...) for LibreELEC only, and it still works. All media is on a NAS.

  • I use a 6TB drive in a setup too for LE+Media (no NAS etc).

    I already lost my data because I needed to redo something so the data was lost too :)

    I would really avoid such setups, better add a USB Stick or something.