Dima73 / enigma2-plugin-systemplugins-devicemanager

manager for storage devices (format/change partitions and type/fast & fixed mount and umount)
3 stars 6 forks source link

Formatting & mounting issue !! #10

Open fairbird opened 3 days ago

fairbird commented 3 days ago

Hello ... I using your plugin as default plugin in my images https://github.com/fairbird/openpli-dreambox-oe-core

But I have got some issue with Formatting & mounting (does not work correctly) .. If I format any drive some time I have got message (partitioning failed) and I can not format it. I need to format it by pc then I can format it by plugin. But some time I formatted with message success. But does not correctly format as screenshot show if I mount drive and do reboot I can not find it mounted (No label in drive (/dev/sdb1)) 1

root@dm920:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 14.4G 4.8G 8.9G 35% / devtmpfs 491.6M 4.0K 491.6M 0% /dev /dev/sdc1 14.4G 4.8G 8.9G 35% /media/ba /dev/sdc1 14.4G 4.8G 8.9G 35% /media/ba /dev/sdc1 14.4G 4.8G 8.9G 35% / tmpfs 64.0K 0 64.0K 0% /media /dev/sdc1 14.4G 4.8G 8.9G 35% /media/ba tmpfs 499.6M 0 499.6M 0% /dev/shm tmpfs 499.6M 216.0K 499.4M 0% /run tmpfs 499.6M 132.0K 499.5M 0% /tmp tmpfs 499.6M 16.7M 483.0M 3% /var/volatile tmpfs 499.6M 0 499.6M 0% /sys/fs/cgroup /dev/sda1 147.1G 57.4G 82.2G 41% /media/hdd

root@dm920:~# blkid /dev/sda1: LABEL="hdd" UUID="d4ba43ea-5e3a-ac39-1951-d2bfdc46778a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f2e1e5ad-29df-70c6-1d82-c1af1aaa35d1" /dev/sdb1: UUID="b36063e1-21aa-4dcb-bf5e-462253a8c614" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="23358291-01" /dev/sdc1: LABEL="ba" UUID="51b7923e-d01c-4c8a-92ba-3b0ca56001e8" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="cc453b20-f453-4af8-9517-eefe40c74576" /dev/mmcblk0p2: LABEL="dreambox-rootfs" UUID="967f7430-0755-4550-a13b-33cbaca50972" BLOCK_SIZE="4096" TYPE="ext4" /dev/mmcblk0p3: LABEL="dreambox-data" UUID="4d77179f-26a0-4776-9950-ee9a45cca82b" BLOCK_SIZE="4096" TYPE="ext4"

Dima73 commented 3 days ago

I also noticed this error, but I don’t know how to calculate it. This is probably related to Python 3. By the way, give me an answer cat /etc/fctab

Dima73 commented 3 days ago

answer sfdisk -l

fairbird commented 2 days ago

Screenshot after format drive by ubuntu (label name fine) and the mount done just fine.

root@dm920:~# blkid /dev/sda1: LABEL="hdd" UUID="d4ba43ea-5e3a-ac39-1951-d2bfdc46778a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f2e1e5ad-29df-70c6-1d82-c1af1aaa35d1" /dev/sdb1: LABEL="RAED_60GB" BLOCK_SIZE="512" UUID="7462480777FEDD07" TYPE="ntfs" PARTUUID="0a2f8b8a-5bcb-4d67-8f43-d517212167cb" /dev/sdc1: LABEL="ba" UUID="51b7923e-d01c-4c8a-92ba-3b0ca56001e8" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="cc453b20-f453-4af8-9517-eefe40c74576" /dev/mmcblk0p2: LABEL="dreambox-rootfs" UUID="967f7430-0755-4550-a13b-33cbaca50972" BLOCK_SIZE="4096" TYPE="ext4" /dev/mmcblk0p3: LABEL="dreambox-data" UUID="4d77179f-26a0-4776-9950-ee9a45cca82b" BLOCK_SIZE="4096" TYPE="ext4"

1

But If I want to format it again by plugin and after umount drive I can not get yellow button to format as Screenshot shown

2

And with trying Initialize drive I have got this error

3

and drive already not mounted

root@dm920:~# blkid /dev/sda1: LABEL="hdd" UUID="d4ba43ea-5e3a-ac39-1951-d2bfdc46778a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f2e1e5ad-29df-70c6-1d82-c1af1aaa35d1" /dev/sdc1: LABEL="ba" UUID="51b7923e-d01c-4c8a-92ba-3b0ca56001e8" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="cc453b20-f453-4af8-9517-eefe40c74576" /dev/mmcblk0p2: LABEL="dreambox-rootfs" UUID="967f7430-0755-4550-a13b-33cbaca50972" BLOCK_SIZE="4096" TYPE="ext4" /dev/mmcblk0p3: LABEL="dreambox-data" UUID="4d77179f-26a0-4776-9950-ee9a45cca82b" BLOCK_SIZE="4096" TYPE="ext4" /dev/sdd1: LABEL="RAED_60GB" BLOCK_SIZE="512" UUID="7462480777FEDD07" TYPE="ntfs" PARTUUID="0a2f8b8a-5bcb-4d67-8f43-d517212167cb"

fairbird commented 2 days ago

I have format drive by Openpli image feature and I have got this after open your plugin ..

1

After that try to format drive and I have got this

2

But I believe the format not correctly because drive does not have label just (Linux) same as screenshot in above should be like this

1

But any way . I have try to mount drive again ..

3

But same result no mounted found ...

root@dm920:~# cat /etc/fstab

rootfs / auto defaults 1 1

proc /proc proc defaults 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0 tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0 tmpfs /var/volatile tmpfs defaults 0 0

/dev/disk/by-label/dreambox-data /data auto defaults 0 0

UUID=4bd1a788-a949-463c-b2fe-e0a8bc360184 /media/video auto defaults 1 1

root@dm920:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 14.4G 4.8G 8.9G 35% / devtmpfs 491.6M 4.0K 491.6M 0% /dev /dev/sdc1 14.4G 4.8G 8.9G 35% /media/ba /dev/sdc1 14.4G 4.8G 8.9G 35% /media/ba /dev/sdc1 14.4G 4.8G 8.9G 35% / tmpfs 64.0K 0 64.0K 0% /media /dev/sdc1 14.4G 4.8G 8.9G 35% /media/ba tmpfs 499.6M 0 499.6M 0% /dev/shm tmpfs 499.6M 216.0K 499.4M 0% /run tmpfs 499.6M 152.0K 499.5M 0% /tmp tmpfs 499.6M 16.7M 483.0M 3% /var/volatile tmpfs 499.6M 0 499.6M 0% /sys/fs/cgroup /dev/sda1 147.1G 57.4G 82.2G 41% /media/hdd

root@dm920:~# blkid /dev/sda1: LABEL="hdd" UUID="d4ba43ea-5e3a-ac39-1951-d2bfdc46778a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f2e1e5ad-29df-70c6-1d82-c1af1aaa35d1" /dev/sdb1: UUID="4bd1a788-a949-463c-b2fe-e0a8bc360184" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="37727079-01" /dev/sdc1: LABEL="ba" UUID="51b7923e-d01c-4c8a-92ba-3b0ca56001e8" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="cc453b20-f453-4af8-9517-eefe40c74576" /dev/mmcblk0p2: LABEL="dreambox-rootfs" UUID="967f7430-0755-4550-a13b-33cbaca50972" BLOCK_SIZE="4096" TYPE="ext4" /dev/mmcblk0p3: LABEL="dreambox-data" UUID="4d77179f-26a0-4776-9950-ee9a45cca82b" BLOCK_SIZE="4096" TYPE="ext4"

root@dm920:~# sfdisk -l Disk /dev/mtdblock0: 2 MiB, 2097152 bytes, 4096 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock1: 128 KiB, 131072 bytes, 256 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock2: 128 KiB, 131072 bytes, 256 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock3: 13.75 MiB, 14417920 bytes, 28160 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock4: 32 MiB, 33554432 bytes, 65536 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 149.05 GiB, 160041885696 bytes, 312581808 sectors Disk model: TOSHIBA MK2565GS Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: F0D74FB1-2D96-4523-BE39-C4B1989ED03F

Device Start End Sectors Size Type /dev/sda1 2048 312580095 312578048 149G Microsoft basic data

Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sdb: 58.23 GiB, 62518853632 bytes, 122107136 sectors Disk model: Cruzer Blade
Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x37727079

Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 122105855 122103808 58.2G 83 Linux

Disk /dev/sdc: 14.84 GiB, 15931539456 bytes, 31116288 sectors Disk model: STORAGE DEVICE
Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 7BB2167B-4639-40EB-B7C1-3294A173B066

Device Start End Sectors Size Type /dev/sdc1 2048 31115263 31113216 14.8G Linux filesystem

Disk /dev/loop8: 16 MiB, 16777216 bytes, 32768 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

.......

As you see the Disklabel type of drive what I formated is (dos) other drives I mounted (Hdd and SSD) is (gpt) !!

Dima73 commented 2 days ago

`root@lunix3-4k:~# sfdisk -v sfdisk from util-linux 2.34 root@lunix3-4k:~# sfdisk -X sfdisk: option requires an argument -- 'X' Try 'sfdisk --help' for more information. root@lunix3-4k:~# sfdisk -l Disk /dev/mtdblock0: 2 MiB, 2097152 bytes, 4096 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock1: 64 KiB, 65536 bytes, 128 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock2: 64 KiB, 65536 bytes, 128 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock3: 64 KiB, 65536 bytes, 128 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock4: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mmcblk0: 3.66 GiB, 3909091328 bytes, 7634944 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: CF90C9D9-F26F-47F5-8E72-55CA39D25AE7

Device Start End Sectors Size Type /dev/mmcblk0p1 34 20513 20480 10M Linux filesystem /dev/mmcblk0p2 20514 53281 32768 16M Linux filesystem /dev/mmcblk0p3 53282 86049 32768 16M Linux filesystem /dev/mmcblk0p4 86050 7634910 7548861 3.6G Linux filesystem

Disk /dev/mmcblk0rpmb: 512 KiB, 524288 bytes, 1024 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 465.78 GiB, 500107862016 bytes, 976773168 sectors Disk model: Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xe1c0378a

Device Boot Start End Sectors Size Id Type /dev/sda1 2048 976773119 976771072 465.8G 83 Linux

Disk /dev/sdb: 960 MiB, 1006632960 bytes, 1966080 sectors Disk model: UDisk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x75adfa2f

Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 1966079 1964032 959M 7 HPFS/NTFS/exFAT root@lunix3-4k:~# sfdisk -X /dev/sdb sfdisk: no disk device specified root@lunix3-4k:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 3.5G 376.3M 2.9G 11% / devtmpfs 107.2M 4.0K 107.2M 0% /dev tmpfs 64.0K 0 64.0K 0% /media tmpfs 1007.3M 248.0K 1007.1M 0% /run tmpfs 1007.3M 84.0K 1007.2M 0% /var/volatile /dev/sda1 464.7G 257.1G 206.6G 55% /media/usb /dev/sdb1 959.0M 288.0K 958.7M 0% /media/sdb1 root@lunix3-4k:~# `

fairbird commented 2 days ago

root@dm920:~# sfdisk -v sfdisk from util-linux 2.39.3

If I format drive by pc work just fine .. format it with dreambox + plugin dos not work correctly !

root@dm920:~# blkid /dev/sda1: LABEL="hdd" UUID="d4ba43ea-5e3a-ac39-1951-d2bfdc46778a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f2e1e5ad-29df-70c6-1d82-c1af1aaa35d1" /dev/sdb1: UUID="4bd1a788-a949-463c-b2fe-e0a8bc360184" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="37727079-01" /dev/sdc1: LABEL="ba" UUID="51b7923e-d01c-4c8a-92ba-3b0ca56001e8" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="cc453b20-f453-4af8-9517-eefe40c74576" /dev/mmcblk0p2: LABEL="dreambox-rootfs" UUID="967f7430-0755-4550-a13b-33cbaca50972" BLOCK_SIZE="4096" TYPE="ext4" /dev/mmcblk0p3: LABEL="dreambox-data" UUID="4d77179f-26a0-4776-9950-ee9a45cca82b" BLOCK_SIZE="4096" TYPE="ext4" root@dm920:~# sfdisk -X /dev/sdb sfdisk: no disk device specified root@dm920:~# sfdisk -X /dev/sdb1 sfdisk: no disk device specified

Dima73 commented 2 days ago

I don't know what is causing the errors. As far as I know, a year ago the plugin worked correctly. What could have happened this year?

fairbird commented 2 days ago

Yes ... Plugin before work just fine. But after few months ago the issue happens !

fairbird commented 2 days ago

About format I have try to format drive manually from telnet without plugin and I have got same issue after format no (lost+found) folder. so I thing the problem from util-linux ?!

root@dm920:~# sfdisk -v sfdisk from util-linux 2.39.3

with DreamOS image have old version (util-linux) the formated done without problem by telnet commands !

root@dm920:~# sfdisk -v sfdisk from util-linux 2.27.1

root@dm920:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 14.4G 5.2G 8.5G 38% / devtmpfs 491.6M 4.0K 491.6M 0% /dev /dev/sdc1 14.4G 5.2G 8.5G 38% /media/ba /dev/sdc1 14.4G 5.2G 8.5G 38% /media/ba /dev/sdc1 14.4G 5.2G 8.5G 38% / tmpfs 64.0K 0 64.0K 0% /media /dev/sdc1 14.4G 5.2G 8.5G 38% /media/ba tmpfs 499.6M 0 499.6M 0% /dev/shm tmpfs 499.6M 216.0K 499.4M 0% /run tmpfs 499.6M 56.0K 499.6M 0% /tmp tmpfs 499.6M 16.7M 483.0M 3% /var/volatile tmpfs 499.6M 0 499.6M 0% /sys/fs/cgroup /dev/sdb1 57.2G 51.8M 54.2G 0% /media/personal /dev/mmcblk0p3 5.1G 143.1M 4.7G 3% /data /dev/sda1 147.1G 57.6G 82.0G 41% /media/hdd

root@dm920:~# ls /media/personal lost+found

Dima73 commented 2 days ago

with DreamOS image have old version (util-linux) the formated done without problem by telnet commands ! Please see this comand and attach sfdisk from util-linux 2.39.3

fairbird commented 2 days ago

What command exactly ?!

Dima73 commented 2 days ago

What command exactly ?!

the formated done without problem by telnet commands

fairbird commented 1 day ago

From DreamOS

root@dm920:~# blkid /dev/mmcblk0p2: LABEL="dreambox-rootfs" UUID="967f7430-0755-4550-a13b-33cbaca50972" TYPE="ext4" /dev/mmcblk0p3: LABEL="dreambox-data" UUID="4d77179f-26a0-4776-9950-ee9a45cca82b" TYPE="ext4" /dev/sda1: LABEL="hdd" UUID="d4ba43ea-5e3a-ac39-1951-d2bfdc46778a" TYPE="ext4" PARTUUID="f2e1e5ad-29df-70c6-1d82-c1af1aaa35d1" /dev/sdb1: UUID="1d48be16-9a93-4b6a-9d59-78506d19315f" TYPE="ext4" PARTUUID="37727079-01" /dev/sdc1: LABEL="ba" UUID="51b7923e-d01c-4c8a-92ba-3b0ca56001e8" TYPE="ext4" PARTUUID="cc453b20-f453-4af8-9517-eefe40c74576" root@dm920:~# root@dm920:~# root@dm920:~# sfdisk -v sfdisk from util-linux 2.27.1 root@dm920:~# mkfs.ext4 /dev/sdb1 mke2fs 1.43-WIP (18-May-2015) /dev/sdb1 contains a ext4 file system last mounted on Thu Jan 1 01:00:39 1970 Proceed anyway? (y,n) y Creating filesystem with 15263228 4k blocks and 3817472 inodes Filesystem UUID: 2dc5c97a-94f9-4972-973b-a65a1e44e211 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done

root@dm920:~#

From my image Openpli

root@dm920:~# blkid /dev/sda1: LABEL="hdd" UUID="d4ba43ea-5e3a-ac39-1951-d2bfdc46778a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f2e1e5ad-29df-70c6-1d82-c1af1aaa35d1" /dev/sdb1: UUID="2dc5c97a-94f9-4972-973b-a65a1e44e211" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="37727079-01" /dev/sdc1: LABEL="ba" UUID="51b7923e-d01c-4c8a-92ba-3b0ca56001e8" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="cc453b20-f453-4af8-9517-eefe40c74576" /dev/mmcblk0p2: LABEL="dreambox-rootfs" UUID="967f7430-0755-4550-a13b-33cbaca50972" BLOCK_SIZE="4096" TYPE="ext4" /dev/mmcblk0p3: LABEL="dreambox-data" UUID="4d77179f-26a0-4776-9950-ee9a45cca82b" BLOCK_SIZE="4096" TYPE="ext4" root@dm920:~# root@dm920:~# sfdisk -v sfdisk from util-linux 2.39.3 root@dm920:~# mkfs.ext4 /dev/sdb1 mke2fs 1.47.0 (5-Feb-2023) /dev/sdb1 is mounted; will not make a filesystem here! root@dm920:~# umount /dev/sdb1 root@dm920:~# mkfs.ext4 /dev/sdb1 mke2fs 1.47.0 (5-Feb-2023) /dev/sdb1 contains a ext4 file system last mounted on Fri Jul 5 13:03:21 2024 Proceed anyway? (y,N) y Creating filesystem with 15263228 4k blocks and 3817472 inodes Filesystem UUID: 02e3ceb3-611b-4aa8-905f-fa81ba0c96ab Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424

Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done Writing superblocks and filesystem accounting information: done

root@dm920:~#

P.s: If I use dreamOS ( util-linux 2.27.1) to format drive I have got inside drive (lost+found) folder That means the format correctly done. But with openpli (util-linux 2.39.3) I can not find (lost+found) folder !