Re: Inhibiting device startup at boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2020-12-01 at 14:52 +0100, Roberto Ragusa wrote:
> On 12/1/20 2:15 PM, Patrick O'Callaghan wrote:
> > I have a couple of SATA drives connected via a USB dock that I use only
> > for backups. Normally they are powered down and only come on at night
> > during the backup run. However they also power on any time I reboot the
> > system and have to be powered down again manually. I'd prefer not to
> > power them on at all until they're needed.
> > 
> > Is there some magic that would inhibit the boot process from powering
> > up these devices? Note that the /etc/fstab entry already has 'noauto'
> > but that just prevents them from being mounted.
> 
> How do you power them down?

Extract from my script ($SLOT is sd[de]):

        smartctl --smart=off /dev/$SLOT1 -q errorsonly >> $LOG 2>&1
        smartctl --smart=off /dev/$SLOT2 -q errorsonly >> $LOG 2>&1
        echo 1 > /sys/block/$SLOT1/device/delete                        # Can't use udisksctl because it removes the
        echo 1 > /sys/block/$SLOT2/device/delete                        # bus, which can't be powered on again

poc
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux