How to make SATA hot plug work? #4

Open
opened 2024-03-02 17:51:59 +01:00 by Benjamin_Loison · 4 comments

It is not mounted automatically, according to df -h.

It is neither listed in fdisk -l.

I do not notice a different number of entries in /sys/class/scsi_host/ after unplugging the SATA data cable.

Note that I notice that the connected HDD is rotating.

BIOS:

image

image

Why Hot Plug disabled by default? For security?

I switched to Enabled for all slots.

+6

It is not mounted automatically, according to `df -h`. It is neither listed in `fdisk -l`. I do not notice a different number of entries in `/sys/class/scsi_host/` after unplugging the SATA data cable. Note that I notice that the connected HDD is rotating. BIOS: ![image](/attachments/400ebe36-e7b4-45df-92b3-e3bf8a1d70c9) ![image](/attachments/5ca3139c-d7f0-4512-8471-ff2ccbab0152) Why `Hot Plug` disabled by default? For security? I switched to `Enabled` for all slots. +6
Author
Owner

After hot plugging:

sudo fdisk -l
Output:
Disk /dev/sda: 5,46 TiB, 6001175126016 bytes, 11721045168 sectors
Disk model: TOSHIBA HDWD260 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

nautilus and df -h do not show anything more.

umount works as expected.

After hot plugging: ```bash sudo fdisk -l ``` <details> <summary>Output:</summary> ``` Disk /dev/sda: 5,46 TiB, 6001175126016 bytes, 11721045168 sectors Disk model: TOSHIBA HDWD260 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes ``` </details> `nautilus` and `df -h` do not show anything more. `umount` works as expected.
Author
Owner
Related to [Benjamin_Loison/virt-manager/issues/25](https://codeberg.org/Benjamin_Loison/virt-manager/issues/25).
Author
Owner
Would help [Benjamin_Loison/virt-manager/issues/109](https://codeberg.org/Benjamin_Loison/virt-manager/issues/109).
Author
Owner

Hot plug Virtual Machine Manager Storage > Device type Disk device: and Bus type: VirtIO on my Debian 13 GNOME laptop Debian (trust) virtual machine works fine:

sudo fdisk -l
Output:
Disk /dev/vda: 128 GiB, 137438953472 bytes, 268435456 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: dos
Disk identifier: 0x460f1185

Device     Boot Start       End   Sectors  Size Id Type
/dev/vda1  *     2048 268435455 268433408  128G 83 Linux

Once add storage:

sudo fdisk -l
Output:
Disk /dev/vda: 128 GiB, 137438953472 bytes, 268435456 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: dos
Disk identifier: 0x460f1185

Device     Boot Start       End   Sectors  Size Id Type
/dev/vda1  *     2048 268435455 268433408  128G 83 Linux


Disk /dev/vdb: 20 GiB, 21474836480 bytes, 41943040 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
I shared this fact with the person:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdAYYL+NVq2gV/jQa2FTmVADYi+RxZcPzDP5yV2Q7+SITIw
bR/7TSGjymaFIC109FhEyfhI1NE6XbQ+hvVp1J5ZCsDTWV2YkDZa6lGiWxQ59w7I
0kEBFkaiN3sWQlnJHq53AzS7di1AW08EjrXdtug3s2j3J1S7jEoA/SVvA+lLazK+
ez/D54Mc5BshzZrT223aJMXASg==
=Radz
-----END PGP MESSAGE-----

on Signal at 1766623768407.

Hot plug Virtual Machine Manager *Storage* > *Device type* *Disk device:* and *Bus type:* *VirtIO* on my Debian 13 GNOME laptop *Debian (trust)* virtual machine works fine: ``` sudo fdisk -l ``` <details> <summary>Output:</summary> ``` Disk /dev/vda: 128 GiB, 137438953472 bytes, 268435456 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: dos Disk identifier: 0x460f1185 Device Boot Start End Sectors Size Id Type /dev/vda1 * 2048 268435455 268433408 128G 83 Linux ``` </details> Once add storage: ``` sudo fdisk -l ``` <details> <summary>Output:</summary> ``` Disk /dev/vda: 128 GiB, 137438953472 bytes, 268435456 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: dos Disk identifier: 0x460f1185 Device Boot Start End Sectors Size Id Type /dev/vda1 * 2048 268435455 268433408 128G 83 Linux Disk /dev/vdb: 20 GiB, 21474836480 bytes, 41943040 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 ``` </details> <details> <summary>I shared this fact with the person:</summary> ``` -----BEGIN PGP MESSAGE----- hF4DTQa9Wom5MBgSAQdAYYL+NVq2gV/jQa2FTmVADYi+RxZcPzDP5yV2Q7+SITIw bR/7TSGjymaFIC109FhEyfhI1NE6XbQ+hvVp1J5ZCsDTWV2YkDZa6lGiWxQ59w7I 0kEBFkaiN3sWQlnJHq53AzS7di1AW08EjrXdtug3s2j3J1S7jEoA/SVvA+lLazK+ ez/D54Mc5BshzZrT223aJMXASg== =Radz -----END PGP MESSAGE----- ``` </details> on Signal at 1766623768407.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Benjamin_Loison/linux#4