Manage disk partitions on libreelec

  • hi.

    I have an external 6tb hdd formated on ntfs.

    I encounter issues with mounting hard drive some time and need to repare it by plugging it to a windows pc each time.

    I had read in the forum that the best way to solve this issue is to use ext4 hdd.

    Here is my question:

    In libreelec from ssh How to :

    1. Resise the ntfs partition to free some space
    2. Format that the free space to ext4
    3. Transfer all the data to this new ext4 partition
    4. Erease te ntfs partition
    5. Rename the new ext4 partition with the label of the ereased ntfs partition.

    Thank you in advance.

  • I rather doubt anyone on staff will leap down the rabbit-hole of trying to describe something that complex to a novice user. It can be done, but it's one of those topics where if you need to ask how it's done you probably shouldn't be doing it.

    Plan B: Move the data somewhere else. Reformat the drive. Move the data back .. this is much (much) easier.

  • Plan B: Move the

    I think that Plan B assumes that i have a linux pc and a second hard drive with at least 2.5 tb (the data that i need to backup). I don't have the 2 conditions.

    Then plan a : I will follow some tutorials on using parted that i found on the net. If it works thats great. If no, i will only loose my library. I will survive

    I see a lot of peaple here having the same issue with ntfs. If my experience works, i will share the steps. Maybe it wil help some of them to migrate to ext4.

  • I've never used GParted so my suggestion would be Linux Mint from a thumb drive and use DISKS. I might be tempted to use MiniTool Partition Manager on Windows to do the initial resizing and formatting.

  • I think that Plan B assumes that i have a linux pc and a second hard drive with at least 2.5 tb (the data that i need to backup). I don't have the 2 conditions.

    Then plan a : I will follow some tutorials on using parted that i found on the net. If it works thats great. If no, i will only loose my library. I will survive

    I see a lot of peaple here having the same issue with ntfs. If my experience works, i will share the steps. Maybe it wil help some of them to migrate to ext4.

    Take a look to the Ventoy project, you can make your thumb drive to boot almost any (bootable) ISO file.

    What you want to do, with resizing, moving data and resizing again on same disk, is risky. If anything go wrong you will lose all your 2.5TB data. So if you have a possibility, save your data somewhere else, boot a live linux (GParted, Ubuntu...) and change the partition to EXT4, than copy back your data.

    If you will try the "plan a", the risky way, for NTFS partition resize, the MiniTool Partition Manager installed on Windows PC is a good idea, but for creating/copying/resizing the EXT4 I recommend to use a (live) Linux OS.

    And if you that 6TB drive will want to use with Windows too, maybe you can consider to use EXFAT partition instead of EXT4. In this case you can use your windows pc and the MiniTool Partition Manager.

  • The last point made by VLouis is the critical one. If you want to be able to access the HDD using both LibreElec and Windows then, unless you have a high speed network, you really have to stick with NTFS or ExFAT., otherwise, if you use EXT4 all Windows access will have to be via SAMBA or something like FileZilla.

    A lot will depend on how you load stuff onto the HDD. In my case I'm back to using NTFS after a time using ExFAT. I started with NTFS and moved to ExFAT because of the corruption issues (not real corruption ie I never lost anything but LE/Kodi wouldn't boot with the HDD attached). I moved back to NTFS because with one of the upgrades and the move to RPi4 the way file timestamps were calculated on LE and Windows differed which messed up my backup system.

    I'm not concerned about the time to move a ripped DVD over to Kodi over my slow network I just wander off and let it get on with it while I do something else, even if it takes an hour. However, when I moved from NTFS to ExFAT I connected both live and backup HDDs to USB3 ports on my PC and it still took 10+hours to copy the c3.5TB of data. If I'd tried to do that over my slow powerline LAN it would have been in the DAYS.

    With that out of the way I'd like to say that using ExFAT did give me a lot less problem on LE/Kodi. There was only one big issue. If I tried to boot my Windows PC with a 6TB ExFAT formatted HDD - it just wouldn't. Whenever I forgot it (my backup HDD) was plugged in I had to turn the PC off, unplug and restart. Not a problem with NTFS.

  • Boot GParted Live from a thumb drive on your Windows PC, and follow plan A.

    Thank you all for the support.

    I followed Da Flex advice and it was a success. It took a while though.

    I share my experience here for those who are interested.

    First, i have to say that i use libreelec on an intel nuc7. I downloaded Gparted from the official website and created a booatble usb using balena etcher with the downloaded ISO.

    The last release was not good for me. I had a black screen after the boot. I had issues with display setup. The solution was to use the 0.33 release witch worked fine with the default settings.

    When gparted booted correctly, the steps were:

    1. Shrink the ntfs partition to the minimum allowed regarding the sise of my library. The process took 12 hours.

    2. Create a ext4 partition on the freed disc space.

    3. Boot on libreelec

    4. Copy all the data from ntfs partition to ext4 partition using the librelec file manager. The process took 10 hours.

    5. Rebooted with gparted.

    6. Ereased ntfs partition.

    7. Extended the ext4 partition to fit the entire hdd size. The process took 12 hours

    8. Renamed the ext4 partition to match the old ntfs partition.

    9. Rebooted librelec... the library is here...no thing to do.

    After a week of testing, i have no corruption of hdd and random not mounting hdd as i had with the ntfs partition.

    Edited once, last by walidbha (November 10, 2023 at 6:45 PM).

  • I'd like to do a filesystem check/repair of libreelec's current partition with e2fsck or fsck, I try to read /etc/fstab but the file is empty.

    Sometimes in case of cold reboot I'd like to check that the filesystem is ok, because I store my media library on libreelec's partition.

  • The /etc/fstab file exists because there are binaries in the OS that behave badly without it, but we don't otherwise require or use it, hence it's not populated with anything. The OS checks /flash and /storage (only) before mounting during boot and will automatically fsck them if any issues are detected. So just reboot once in a while. Since LE12 any issues detected are logged to /flash.

  • Correction: since LE12 file system expansion on first boot is logged to /flash.

    fsck on boot is logged to kernel and can be seen with dmesg|grep fsck:. Please note : in default configuration no check is forced as long the file system is clean.