using lsblk, still cant find the drive
- User
using lsblk, still cant find the drive
Assistant
If
lsblkdoesn’t show your 20TB USB drive, there could be several reasons why it’s not being detected. Let’s troubleshoot step by step.
1. Check if the Drive is Detected at All
Run the following commands to see if the system recognizes the USB drive:
Check
dmesg(kernel logs) for USB detection:sudo dmesg | tail -20Look for lines like:
usb-storage: device found at ...Attached SCSI disksdb: sdb1(or similar)
Check
lsusb(USB device list):lsusbIf the drive is listed here, the USB controller detects it, but the disk may not be properly initialized.
Check
journalctl(system logs):sudo journalctl -b | grep -i usbThis may show errors related to USB storage.
2. Force Rescan for New Disks
If the drive was plugged in after boot, the kernel might not have detected it. Try forcing a rescan:
Rescan SCSI devices:
echo 1 | sudo tee /sys/bus/scsi/devices/rescanor
sudo sh -c "echo '- - -' > /sys/class/scsi_host/host*/scan"Check again with
lsblkorfdisk:sudo lsblk sudo fdisk -l
3. Check if the Drive is Powered Properly
- Issue: Large drives (20TB) may require more power than USB can provide.
- Solution:
- Use a powered USB hub (if the drive doesn’t have its own power supply).
- Try a different USB port (preferably USB 3.0/3.1).
- If using an external enclosure, ensure it supports 20TB drives.
4. Check if the Drive Has a Valid Partition Table
If the drive is new or corrupted, it might not have a partition table. Use
gdiskorfdiskto check:Check with
gdisk(for GPT disks):sudo gdisk -l /dev/sdX(Replace
sdXwith the correct device, e.g.,sdb)If the partition table is missing or corrupted:
You may need to create a new partition table (this will erase data!):
sudo fdisk /dev/sdX- Press
gto create a new GPT partition table. - Press
nto create a new partition. - Press
wto write changes.
Then format it (e.g., as ext4):
sudo mkfs.ext4 /dev/sdX1
5. Check for Filesystem Errors
If the drive has a filesystem but isn’t mounting, try repairing it:
For NTFS:
sudo ntfsfix /dev/sdX1For ext4:
sudo fsck /dev/sdX1
6. Check if the Drive is Being Blocked (e.g., LUKS Encryption)
If the drive is encrypted (e.g., LUKS), you’ll need to unlock it first:
Check for LUKS:
sudo cryptsetup isLuks /dev/sdXIf yes, unlock it:
sudo cryptsetup open /dev/sdX mydriveThen mount:
sudo mount /dev/mapper/mydrive /mnt/usbdisk
7. Check if the Drive is Faulty
If none of the above works:
- Try the drive on another computer (Windows/macOS/Linux).
- If it doesn’t work there, the drive may be failing or dead.
- If it works elsewhere, the issue is with your Ubuntu system (possibly a driver or USB controller problem).
Summary of Commands to Try
Command Purpose `sudo dmesg tail -20` lsusbList USB devices sudo lsblkList block devices sudo fdisk -lList disks and partitions sudo gdisk -l /dev/sdXCheck GPT partition table sudo ntfsfix /dev/sdX1Fix NTFS errors sudo fsck /dev/sdX1Check/repair ext4 filesystem sudo cryptsetup isLuks /dev/sdXCheck for LUKS encryption
Final Steps
- If the drive is detected but not mounting, manually mount it:
sudo mount /dev/sdX1 /mnt/usbdisk - If the drive is not detected at all, try:
- A different USB port/cable.
- A powered USB hub.
- Testing on another machine.
If it still doesn’t work, the drive may be faulty or incompatible with your system. Let me know what you find!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.