New partition won't automount

  • New ext4 partition on 2TB HDD won't automount at startup but manualy.

    Libreelec version : 9.26 - Generic (AMD / Intel / nVidia)

    # parted -l

    ...

    Model: ATA ST2000DM001-1CH1 (scsi)

    Disk /dev/sdd: 2000GB

    Sector size (logical/physical): 512B/4096B

    Partition Table: gpt

    Disk Flags:

    Number Start End Size File system Name Flags

    1 1049kB 2000GB 2000GB ext4 msftdata

    #blkid

    /dev/sda1: LABEL="Seagate_3TB" UUID="xxxxxxxxxxxxxxxxx" TYPE="ext4" PARTUUID="xxxxxxxxxxxxxxxxxxx"

    /dev/sdb1: SEC_TYPE="msdos" LABEL_FATBOOT="System" LABEL="System" UUID="xxxxxxxxxxx" TYPE="vfat" PARTUUID="xxxxxxxxxxxx"

    /dev/sdb2: LABEL="Storage" UUID="xxxxxxxxxxxxxxd" TYPE="ext4" PARTUUID="xxxxxxxxxxxxxxxx"

    /dev/sdc1: LABEL="WD_2TB" UUID="xxxxxxxxxxxxxxxxxx" TYPE="ext4" PARTLABEL="WD_2TB" PARTUUID="xxxxxxxxxxxxxxxxxxxxxxx"

    /dev/loop0: TYPE="squashfs"

    # mount

    ...

    tmpfs on /tmp type tmpfs (rw,nosuid,nodev)

    /dev/sdc1 on /var/media/WD_2TB type ext4 (rw,nosuid,nodev,noexec,noatime)

    /dev/sda1 on /var/media/Seagate_3TB type ext4 (rw,nosuid,nodev,noexec,noatime)

    Manualy mount from command line :

    # mkdir -p /media/ST_2T

    # mount /dev/sdd1 /var/media/ST_2TB -o nosuid,nodev,noexec,noatime

    # mount

    ....

    tmpfs on /tmp type tmpfs (rw,nosuid,nodev)

    /dev/sdc1 on /var/media/WD_2TB type ext4 (rw,nosuid,nodev,noexec,noatime)

    /dev/sda1 on /var/media/Seagate_3TB type ext4 (rw,nosuid,nodev,noexec,noatime)

    /dev/sdd1 on /var/media/ST_2TB type ext4 (rw,nosuid,nodev,noexec,noatime)

    What's wrong ?

  • I didn't see any error about sdd.

    How can i increase log level and see specific log about disk mounting processs ?

    # dmesg | egrep "ata|sd"

    [26144.125068] sd 3:0:0:0: [sdd] Synchronizing SCSI cache

    [26144.143480] sd 3:0:0:0: [sdd] Stopping disk

    [26144.951753] sd 2:0:0:0: [sdc] Synchronizing SCSI cache

    [26144.951872] sd 2:0:0:0: [sdc] Stopping disk

    [26146.498437] sd 1:0:0:0: [sdb] Synchronizing SCSI cache

    [26146.498515] sd 1:0:0:0: [sdb] Stopping disk

    [26146.521762] sd 0:0:0:0: [sda] Synchronizing SCSI cache

    [26146.522087] sd 0:0:0:0: [sda] Stopping disk

    [26150.130059] ata6: SATA link down (SStatus 0 SControl 300)

    [26150.130124] ata5: SATA link down (SStatus 0 SControl 300)

    [26150.189228] sd 0:0:0:0: [sda] Starting disk

    [26150.189253] sd 1:0:0:0: [sdb] Starting disk

    [26150.189314] sd 2:0:0:0: [sdc] Starting disk

    [26150.189348] sd 3:0:0:0: [sdd] Starting disk

    [26150.285794] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

    [26150.303256] ata2.00: configured for UDMA/133

    [26156.762607] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

    [26156.932566] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

    [26156.934626] ata4.00: configured for UDMA/133

    [26156.969869] ata3.00: configured for UDMA/133

    [26159.755961] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

    [26159.788094] ata1.00: configured for UDMA/133

    [31221.024496] sd 3:0:0:0: [sdd] Synchronizing SCSI cache

    [31221.056534] sd 3:0:0:0: [sdd] Stopping disk

    [31221.857847] sd 2:0:0:0: [sdc] Synchronizing SCSI cache

    [31221.857998] sd 2:0:0:0: [sdc] Stopping disk

    [31222.277858] sd 1:0:0:0: [sdb] Synchronizing SCSI cache

    [31222.277933] sd 1:0:0:0: [sdb] Stopping disk

    [31222.297854] sd 0:0:0:0: [sda] Synchronizing SCSI cache

    [31222.298365] sd 0:0:0:0: [sda] Stopping disk

    [31225.699602] ata5: SATA link down (SStatus 0 SControl 300)

    [31225.699665] ata6: SATA link down (SStatus 0 SControl 300)

    [31225.755499] sd 0:0:0:0: [sda] Starting disk

    [31225.755507] sd 1:0:0:0: [sdb] Starting disk

    [31225.755585] sd 2:0:0:0: [sdc] Starting disk

    [31225.755615] sd 3:0:0:0: [sdd] Starting disk

    [31225.855407] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

    [31225.872881] ata2.00: configured for UDMA/133

    [31232.342208] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

    [31232.553128] ata3.00: configured for UDMA/133

    [31232.592219] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

    [31232.594011] ata4.00: configured for UDMA/133

    [31235.535576] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

    [31235.566798] ata1.00: configured for UDMA/133

  • Thank's Chewitt.

    Please find in attachment output from command line :

    # journalctl | egrep -v "ntp|kodi.sh|tun0|eth0"

    It seem last line "LibreELEC systemd[1]: var-media-ST_2TB.mount: Succeeded" come from my workaround to mount /dev/sdd1 in ksh script "~/..config/autostart.sh" executed at startup.journalctl.txt

    # cat autostart.sh

    #!/bin/sh

    mkdir -p /media/ST_2TB

    mount /dev/sdd1 /var/media/ST_2TB -o nosuid,nodev,noexec,noatime

  • in addition fsck output :

    # fsck.ext4 -fv /dev/sdd1

    e2fsck 1.45.3 (14-Jul-2019)

    Pass 1: Checking inodes, blocks, and sizes

    Pass 2: Checking directory structure

    Pass 3: Checking directory connectivity

    Pass 4: Checking reference counts

    Pass 5: Checking group summary information

    152 inodes used (0.00%, out of 122101760)

    0 non-contiguous files (0.0%)

    0 non-contiguous directories (0.0%)

    # of inodes with ind/dind/tind blocks: 0/0/0

    Extent depth histogram: 73/71

    87005300 blocks used (17.82%, out of 488378368)

    0 bad blocks

    57 large files

    75 regular files

    68 directories

    0 character device files

    0 block device files

    0 fifos

    0 links

    0 symbolic links (0 fast symbolic links)

    0 sockets

    ------------

    143 files

  • Good point Chewitt. It seems udev flags are persistants even after deleting partition :

    # udevadm info /dev/sdd1

    ...

    E: ID_FS_VERSION=5000

    E: ID_FS_TYPE=zfs_member

    ....

    This disk come from my NAS with zpool partition (zfs V5000 filesystem). Probably, I should destroy zpool before using the disk !

    I take a look to fix it.

  • Partition was delete and recreate with gparted.

    The udev flags has been reset with news and good values :

    ...

    E: ID_FS_VERSION=1.0

    E: ID_FS_TYPE=ext4

    ....

    Now automount partition works fine.

    I change mount point with e2label to finish my setup.

    Special thank to Chewitt bringing me on the right way.

    Thread is Resolved