It seems "resolved" now.
OK, after many attempts and boot freezes I got it to work.
It now boots fine (if slowly) with all 7 disks pre powered up.
It seems nothing to do with 'power' per se, nor unpowered hubs.
It appears to be one or more system settings, along with the 'automounter' getting itself in a knot.
And a need to have successful mounts followed by graceful system shutdowns before powering on again.
Perhaps the system "remembers" some things ?
Below is what I did to get it to work. Yes there are multiple graceful shutdowns (not reboots).
I'm not saying all of it is required (where something is, I'll flag it), however it is what led to it working fine.
You may choose to flag which bits are unnecessary if you're confident about it.
Ensure all of the disks are switched OFF but plugged into the hubs which are plugged into the Pi 5.
Assuming you've already booted your Pi 5 and configured it with language and updates and whatnot.
Enable usb_max_current_enable.
sudo nano /boot/firmware/config.txt
add this line to the end of the file
usb_max_current_enable=1
Disable USB Autosuspend.
Saw posts "Autosuspend might cause issues with certain USB devices."
We can disable it by adding usbcore.autosuspend=-1 to the file /boot/firmware/cmdline.txt
sudo nano /boot/firmware/cmdline.txt
and add a space and then this 'usbcore.autosuspend=-1' at very end of the single line.
This bit ** seems to be crucial ** to setting up the disks one by one without it freezing:
In the Desktop start 'File Manager'
menu Edit -> Preferences
click Volume Management
UNTICK these 3:
- Mount mountable volumes automatically on program startup (this is the automounter, not fstab processing)
- Mount removable media automatically when they are inserted
- Show available options for removable media when they are inserted
Reboot for all that to take effect.
Create the mount points, I've done it here the long-winded way:
sudo mkdir -v -m a=rwx /mnt/shared
sudo chmod -R -v a+rwx /mnt/shared
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk1
sudo chmod -R -v a+rwx /mnt/shared/usb3disk1
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk2
sudo chmod -R -v a+rwx /mnt/shared/usb3disk2
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk3
sudo chmod -R -v a+rwx /mnt/shared/usb3disk3
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk4
sudo chmod -R -v a+rwx /mnt/shared/usb3disk4
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk5
sudo chmod -R -v a+rwx /mnt/shared/usb3disk5
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk6
sudo chmod -R -v a+rwx /mnt/shared/usb3disk6
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk7
sudo chmod -R -v a+rwx /mnt/shared/usb3disk7
You may need 2 Terminal's open, one for editing fstab and the other for doing commands.
Start editing fstab: 'sudo nano /etc/fstab'
This does not seem to work yet, if you try to spin up and mount everything at once, so do it one by one.
One by one, for each of the 7 disks:
- Turn a disk on and wait say 10 to 30 secs for it to talk to the Pi
- Keep doing 'sudo blkid' until you see it appear(now without freezing issues after setting the 'File Manager preferences' above)
- Copy the PARTUUID string (eg 2d5599a2-aa11-4aad-9f75-7fca2078b38b) and note which disk it's for (eg LABEL="DISK1-5TB")
- Add a commented-out entry at the end of fstab for this disk (ntfs3 causes booting to freeze, so use 'ntfs'), eg
#PARTUUID=2d5599a2-aa11-4aad-9f75-7fca2078b38b /mnt/shared/usb3disk1 ntfs defaults,auto,nofail,users,rw,exec,umask=000,dmask=000,fmask=000,uid=pi,gid=pi,noatime,nodiratime,nofail 0 0
- save the edit in nano
- ** this seems to be important ** do a MANUAL mount for that disk to ensure it works successfully and the system knows it mounts successfully, eg
sudo mount -t ntfs -o defaults,auto,nofail,users,rw,exec,umask=000,dmask=000,fmask=000,uid=pi,gid=pi,noatime,nodiratime /dev/disk/by-partuuid/2d5599a2-aa11-4aad-9f75-7fca2078b38b /mnt/shared/usb3disk1
- wait up to 30 secs
- if you have a successful mount, that's beaut
Exit nano with all the changes to fstab saved.
Leave the disks powered ON.
Do a graceful shutdown (not a reboot) to save settings and whatnot 'sudo shutdown'.
Power all of the disks OFF.
Once the Pi 5 has finished its shutdown process and powered off, power it back on.
You may need 2 Terminal's open, one for editing fstab and the other for doing commands.
Start editing fstab: 'sudo nano /etc/fstab'
This does not seem to work yet, if you try to spin up and mount everything at once, so do it one by one.
Again one by one, for each of the 7 disks:
- Turn a disk on and wait say 10 to 30 secs for it to talk to the Pi
- Keep doing 'sudo blkid' until you see it appear(now without freezing issues after setting the 'File Manager preferences' above)
- Note the PARTUUID string (eg 2d5599a2-aa11-4aad-9f75-7fca2078b38b) and note which disk it's for (eg LABEL="DISK1-5TB")
- Locate the mount line in fstab for that partuuid and un-comment it, then save fstab but stay in nano
- do a 'sudo systemctl daemon-reload' for the system to notice changes in fstab
- tell the system to mount anything new, using fstab entries. if the disk isn't ready don't worry, just keep doing it until it mounts:
'sudo mount -a -v'
- eventually it will tell you it mounted (if you made the fstab entries right)
Once everything is mounted, do a graceful shutdown (not a reboot) to save settings and whatnot 'sudo shutdown'.
Switch OFF all of the disks.
Boot the Pi 5 to the desktop.
Switch ON all of the disks together and wait a minute or three for then to get recognised by the Pi 5, use 'sudo blkid'.
Try to mount all of the disks via fstab with 'sudo mount -a -v'.
They should all (eventually) mount.
One everything seems mounted, check by doign a few 'sudo lsblk -o UUID,PARTUUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL'
When all mounted do a final graceful sgraceful shutdown (not a reboot) to save settings and whatnot 'sudo shutdown'.
With all of the disks pre-powered on, power on the Pi 5.
It should now boot, fairly slowly, straight to the desktop with all disks mounted OK.
Check with 'sudo lsblk -o UUID,PARTUUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL'
It took a LOT of boot freezes (no good leaving it to see if it recovers, it never does) to get this far.
I do not know, but mildly suspect, that once the automounter (which we turned off in Preferences) sees a disk and fails,
which it did OFTEN, then that's the end of the show for mounting that disk at boot - I had to re-image the SD card.
Feel free to criticise, but it did work![Smile :)]()
OK, after many attempts and boot freezes I got it to work.
It now boots fine (if slowly) with all 7 disks pre powered up.
It seems nothing to do with 'power' per se, nor unpowered hubs.
It appears to be one or more system settings, along with the 'automounter' getting itself in a knot.
And a need to have successful mounts followed by graceful system shutdowns before powering on again.
Perhaps the system "remembers" some things ?
Below is what I did to get it to work. Yes there are multiple graceful shutdowns (not reboots).
I'm not saying all of it is required (where something is, I'll flag it), however it is what led to it working fine.
You may choose to flag which bits are unnecessary if you're confident about it.
Ensure all of the disks are switched OFF but plugged into the hubs which are plugged into the Pi 5.
Assuming you've already booted your Pi 5 and configured it with language and updates and whatnot.
Enable usb_max_current_enable.
sudo nano /boot/firmware/config.txt
add this line to the end of the file
usb_max_current_enable=1
Disable USB Autosuspend.
Saw posts "Autosuspend might cause issues with certain USB devices."
We can disable it by adding usbcore.autosuspend=-1 to the file /boot/firmware/cmdline.txt
sudo nano /boot/firmware/cmdline.txt
and add a space and then this 'usbcore.autosuspend=-1' at very end of the single line.
This bit ** seems to be crucial ** to setting up the disks one by one without it freezing:
In the Desktop start 'File Manager'
menu Edit -> Preferences
click Volume Management
UNTICK these 3:
- Mount mountable volumes automatically on program startup (this is the automounter, not fstab processing)
- Mount removable media automatically when they are inserted
- Show available options for removable media when they are inserted
Reboot for all that to take effect.
Create the mount points, I've done it here the long-winded way:
sudo mkdir -v -m a=rwx /mnt/shared
sudo chmod -R -v a+rwx /mnt/shared
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk1
sudo chmod -R -v a+rwx /mnt/shared/usb3disk1
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk2
sudo chmod -R -v a+rwx /mnt/shared/usb3disk2
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk3
sudo chmod -R -v a+rwx /mnt/shared/usb3disk3
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk4
sudo chmod -R -v a+rwx /mnt/shared/usb3disk4
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk5
sudo chmod -R -v a+rwx /mnt/shared/usb3disk5
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk6
sudo chmod -R -v a+rwx /mnt/shared/usb3disk6
sudo mkdir -v -m a=rwx /mnt/shared/usb3disk7
sudo chmod -R -v a+rwx /mnt/shared/usb3disk7
You may need 2 Terminal's open, one for editing fstab and the other for doing commands.
Start editing fstab: 'sudo nano /etc/fstab'
This does not seem to work yet, if you try to spin up and mount everything at once, so do it one by one.
One by one, for each of the 7 disks:
- Turn a disk on and wait say 10 to 30 secs for it to talk to the Pi
- Keep doing 'sudo blkid' until you see it appear(now without freezing issues after setting the 'File Manager preferences' above)
- Copy the PARTUUID string (eg 2d5599a2-aa11-4aad-9f75-7fca2078b38b) and note which disk it's for (eg LABEL="DISK1-5TB")
- Add a commented-out entry at the end of fstab for this disk (ntfs3 causes booting to freeze, so use 'ntfs'), eg
#PARTUUID=2d5599a2-aa11-4aad-9f75-7fca2078b38b /mnt/shared/usb3disk1 ntfs defaults,auto,nofail,users,rw,exec,umask=000,dmask=000,fmask=000,uid=pi,gid=pi,noatime,nodiratime,nofail 0 0
- save the edit in nano
- ** this seems to be important ** do a MANUAL mount for that disk to ensure it works successfully and the system knows it mounts successfully, eg
sudo mount -t ntfs -o defaults,auto,nofail,users,rw,exec,umask=000,dmask=000,fmask=000,uid=pi,gid=pi,noatime,nodiratime /dev/disk/by-partuuid/2d5599a2-aa11-4aad-9f75-7fca2078b38b /mnt/shared/usb3disk1
- wait up to 30 secs
- if you have a successful mount, that's beaut
Exit nano with all the changes to fstab saved.
Leave the disks powered ON.
Do a graceful shutdown (not a reboot) to save settings and whatnot 'sudo shutdown'.
Power all of the disks OFF.
Once the Pi 5 has finished its shutdown process and powered off, power it back on.
You may need 2 Terminal's open, one for editing fstab and the other for doing commands.
Start editing fstab: 'sudo nano /etc/fstab'
This does not seem to work yet, if you try to spin up and mount everything at once, so do it one by one.
Again one by one, for each of the 7 disks:
- Turn a disk on and wait say 10 to 30 secs for it to talk to the Pi
- Keep doing 'sudo blkid' until you see it appear(now without freezing issues after setting the 'File Manager preferences' above)
- Note the PARTUUID string (eg 2d5599a2-aa11-4aad-9f75-7fca2078b38b) and note which disk it's for (eg LABEL="DISK1-5TB")
- Locate the mount line in fstab for that partuuid and un-comment it, then save fstab but stay in nano
- do a 'sudo systemctl daemon-reload' for the system to notice changes in fstab
- tell the system to mount anything new, using fstab entries. if the disk isn't ready don't worry, just keep doing it until it mounts:
'sudo mount -a -v'
- eventually it will tell you it mounted (if you made the fstab entries right)
Once everything is mounted, do a graceful shutdown (not a reboot) to save settings and whatnot 'sudo shutdown'.
Switch OFF all of the disks.
Boot the Pi 5 to the desktop.
Switch ON all of the disks together and wait a minute or three for then to get recognised by the Pi 5, use 'sudo blkid'.
Try to mount all of the disks via fstab with 'sudo mount -a -v'.
They should all (eventually) mount.
One everything seems mounted, check by doign a few 'sudo lsblk -o UUID,PARTUUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL'
When all mounted do a final graceful sgraceful shutdown (not a reboot) to save settings and whatnot 'sudo shutdown'.
With all of the disks pre-powered on, power on the Pi 5.
It should now boot, fairly slowly, straight to the desktop with all disks mounted OK.
Check with 'sudo lsblk -o UUID,PARTUUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL'
It took a LOT of boot freezes (no good leaving it to see if it recovers, it never does) to get this far.
I do not know, but mildly suspect, that once the automounter (which we turned off in Preferences) sees a disk and fails,
which it did OFTEN, then that's the end of the show for mounting that disk at boot - I had to re-image the SD card.
Feel free to criticise, but it did work

Statistics: Posted by hydra3333 — Mon Jul 29, 2024 6:11 pm