Raspberry 4 don’t read my hard disk

December 29, 2023, 14:02

navadix

I have a USB hard disk and when I plug it in every port, the LED on the disk didn’t turn on And on WEBGUI OMV, it does not appear A solution ?

jannik44

you should check the power requirements of your HDD

navadix

I have the same problem for a usb key

jannik44

do you have the official charger?

navadix

no, in the p4 box there was only the raspberry

navadix

the first time I plugged in the HDD it turned on, but was not recognized on OMV, so I tried another port, and nothing since

jannik44

connect a display and see whats going on

navadix

I connect a display

navadix

the raspberry ask me to login to OMV

navadix

but when I plug my keyboard

navadix

he doesn't recognize him

navadix

?

navadix

Well, I restart the p4

navadix

Hard disk started but

navadix

I have a new error message on OMV : 500 -
Internal Server Error
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; blockdev --getsize64 '/dev/sda' 2>&1' with exit code '1': blockdev: cannot open /dev/sda: No such device or address

oops.se

What power supply do you have ? Specifications?

navadix

Is it still a power problem? even though the disc now turns on?

navadix

input : 100-240V - 50/60Hz - 0.5A MAX output : 5.1V --- 3.0A - 15.3W

oops.se

Sorry I didn't see the complete discussion

oops.se

Your good

navadix

np, ty a idea for : Internal Server Error Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; blockdev --getsize64 '/dev/sda' 2>&1' with exit code '1': blockdev: cannot open /dev/sda: No such device or address

oops.se

WHats the output from lsblk ?

oops.se

And the HDD is a rotating disk?

navadix


navadix

yes

oops.se

In the error you have /dev/sda2 but lsblk doesn't show a /dev/sda2. And I have seen that rotating disks sometimes needs "delays" added and I don't remember where, but a search for it should give you some hints.

navadix

I will look at it but the error also says that there is no sda file:

navadix


navadix

there is a sda and sda1 in dev

oops.se

sda is the disk and 1, 2, 3 is partitions on the disk. You can divide a physical disk into logical parts (aka partitions)

oops.se

And it complains that /dev/sda2doesn't exist on /dev/sda, or as I would translate it to: partition 2 don't exists on the harddrive

navadix

Ummmh okkk thank you it's clearer now, well now I'm going to try to do this second partition manually

oops.se

Well sda1 is taking up the whole space

oops.se

So either you need to delete or resize the sda1partition

navadix

Okay, I'll try to tinker to have 2 partitions

oops.se

Just replace /dev/vdb1 with /dev/sda1

navadix

in my fdisk -l, my SD and my USB key are recognized but not the SDA, while in lsblk the SDA is recognized So I can't use 'sudo cfdisk /dev/sda' to delete the partitions and create 2 new ones

oops.se

Have you run sudo fdisk -l?

navadix

yes, there is the SD and the usb key, but not the sda

oops.se

Sorry the URL assume that you are a super user

navadix

what ?

oops.se

The user you have logged in with has no admin rights

oops.se

So by adding sudo before the command you wan't to execute you run that command as a admin

oops.se

And I forgot that the URL I sent is implying that you run the commands as a admin

navadix

But I don't know why i'm not the admin xD

navadix

I use logs who I defined in "imager"

oops.se

In Raspberry Pi OS a normal user is NOT a admin. If you know windows the sudo eq. is runas = Run the command as a admin.

navadix

yes yes know what is sudo

navadix

so, how to do it?

oops.se

So the user you have logged in with is a member of the group "sudo" and there fore can execute commands as a admin.

oops.se

But you need to tell the Pi to execute the command as admin! And that you do by adding sudo to the start of the command you wan't to execute as admin.

navadix

but I already use sudo every time for fdisk commands but that doesn't solve the fact that he doesn't have the sda in the fdisk -l while in the lsblk yes

oops.se

Ok, sorry

oops.se

Do you have another computer?

oops.se

Wwindows/MAC?

navadix

Euuh no, only my laptop

oops.se

Can you move the USB drive to the laptop and check it?

navadix

the usb key has nothing, it works, I successfully configured it as a NAS, I just plugged the HDD into my laptop, and it works correctly

oops.se

And you ran chkdsk on the USD drive?

navadix

He tells me there is no error

oops.se

Ok, then Im out of ideas

navadix

what if I try to partition it on my window? I will no longer have errors on my OMV?