0

So i have recently installed Ubuntu server on a machine. Which has all gone great the box is up and running and working as expected. The issue i face is that i have A 4tb external HDD that i wish to use with the ubuntu box.

I am new to Linux and have tried my best to figure this out, but i am really quite stuck. Hoping to catch some help from an experienced Linux user.

I have the following outputs that i have generated which may be of assistance.

Installed webmin and viewed drives. this shows the following output

SATA device A 1.86 TiB ATA TOSHIBA MQ03ABB22 IDE parameters Identify drive
SCSI device B 3.72 TiB Seagate Expansion Desk0 Identify drive

The drive works perfectly when i connect it to a Windows machine.

I have used diskpart in windows to completely clean the drive.

reconnected to Linux box. I am now seeing the following output.

    curtis@plex:~$ sudo fdisk -l
    Disk /dev/loop0: 89.1 MiB, 93417472 bytes, 182456 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

    Disk /dev/loop1: 93.8 MiB, 98336768 bytes, 192064 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

    Disk /dev/loop2: 64.1 MiB, 67239936 bytes, 131328 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

    Disk /dev/loop3: 55 MiB, 57614336 bytes, 112528 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

    Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: DEF5BDE2-8B0C-46EE-A896-68CF8C794AD1
    Device Start End Sectors Size Type
    /dev/sda1 2048 1050623 1048576 512M EFI System
    /dev/sda2 1050624 3907026943 3905976320 1.8T Linux filesystem
    curtis@plex:~$ lsusb
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 005: ID 0bc2:331a Seagate RSS LLC
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    curtis@plex:~$ lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    loop0 7:0 0 89.1M 1 loop /snap/core/8268
    loop1 7:1 0 93.8M 1 loop /snap/core/8935
    loop2 7:2 0 64.1M 1 loop /snap/powershell/104
    loop3 7:3 0 55M 1 loop /snap/core18/1705
    sda 8:0 0 1.8T 0 disk
    ├─sda1 8:1 0 512M 0 part /boot/efi
    └─sda2 8:2 0 1.8T 0 part /
    sdb 8:16 0 3.7T 0 disk
    curtis@plex:~$

any help would be greatly appreciated. 
The external drive is the 4TB disk. 
Please let me know if you require any further information. 
3
  • Add the messages generated in /var/log/messages at the moment you connect the drive ?
    – steve
    Commented Apr 18, 2020 at 14:20
  • Hi, the path does not exist. I am able to get to /var/log. located in here are is only the following curtis@plex:~$ ls /var/log alternatives.log cloud-init.log journal syslog apt dist-upgrade kern.log syslog.1 auth.log dpkg.log landscape tallylog bootstrap.log faillog lastlog unattended-upgrades btmp fontconfig.log lxd wtmp cloud-init-output.log installer samba
    – Curtis
    Commented Apr 18, 2020 at 14:37
  • Thanks for that, i have the output, what would be the best way for me to share this? It exceeds the maximum length for a comment.
    – Curtis
    Commented Apr 18, 2020 at 20:02

1 Answer 1

0

If I read you lsblk-output correctly /dev/sdb does not have any partitions. You should pick a partitioning tool of your choice and create at least one with a file system. Since I don't know your preferences for the external drive, e.g. if you want to use them with Windows and Linux, I can't recommend the perfect choice.

Using with Windows and Linux: format on Windows with NTFS or FAT32. Using Linux only: format it as ext4, for example with gparted (GUI), fdisk or parted (command line), after partitioning use mkfs.ext4 on the partition to init the file system.

Then preferrably use udisksctl (command line) to mount and unmount the drive as non-root user when needed. (I assume your server has no monitor/ UI/ X-Server, thus no gvfs/ desktop-based mount/ unmount with simple clicking.)

You could also set up user mount through /etc/fstab, but your intention is not clear to me.

3
  • so i have tried to partition and format the disk using parted, however when executing $ sudo parted the console seems to hang and not do anything. I have reconnected the drive to Windows and can verify that i can format/partition the drive to NTFS using diskpart, however then when connecting it back to the Linux box the same occurs.
    – Curtis
    Commented Apr 18, 2020 at 19:52
  • Sounds interesting and is maybe hardware/ kernel related. On the server run sudo dmesg --clear once, to clear all kernel log messages. Then plug in the drive, wait 1-2s and run dmesg (without --clear) to display kernel messages. Maybe there are some error codes pointing to negotiation errors (usb <-> Kernel) or hardware issues (device <-> Kernel).
    – motzmann
    Commented Apr 19, 2020 at 8:42
  • Hi, This is the information from dmesg I have excluded some of the data as it would make this too long. [258626.943660] sd 2:0:0:0: [sdb] 7814037167 512-byte logical blocks: (4.00 TB/3.64 TiB) [258626.943668] sd 2:0:0:0: [sdb] 4096-byte physical blocks [258626.943844] sd 2:0:0:0: [sdb] Write Protect is off [258626.943851] sd 2:0:0:0: [sdb] Mode Sense: 53 00 00 08 [258626.944189] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [258626.944484] sd 2:0:0:0: [sdb] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
    – Curtis
    Commented Apr 20, 2020 at 17:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .