Micro-Star International motherboard with AMD Phenom II 4-core processor.

External Multi-Terabyte Disks and Linux

Using a Seagate External Disk with Linux

I bought a 4 TB external disk when it was marked down to a very good price. It's a SATA disk with a USB 3.0 cable, replacing a 1 TB PATA disk in an external case with a USB 2.0 connection. It's a 4:1 upgrade in storage capacity, and an even greater advantages in speed. USB 3.0 provides 5 Gbps or 625 MB/s, over ten times faster than USB 2.0 at just 480 Mbps or 60 MB/s. SATA 2.0 does 3 Gbps or 300 MB/s, SATA 3.0 does 6 Gbps or 600 MB/s, and SATA 3.2 does 16 Gbps or 1969 MB/s. PATA had a maximum of 167 MB/s.

My problem was that it did not appear at all as a disk device under Linux!

The output of ls -l /dev/sd* showed the same set of devices both before and after I plugged it in.

The short answer is that I deleted the existing partitions and created a new partition under Windows. That allowed it to show up as a USB-connected disk on both Linux and OpenBSD.

Then I used parted on Linux to initialize a GPT or GUID Partition Table, create one partition spanning the disk, and create a file system.

The details follow. First, however, a picture of the disk itself.

Seagate 4 TB external disk with USB 3 superspeed cable.

Linux Kernel Errors

I expected Linux to recognize the disk as a USB-connected mass storage device. The kernel should automatically create a new device /dev/sd[a-z]. Since I already have six fixed disks inside the system, and haven't yet connected any other USB devices, this should appear as a new /dev/sdg. But when I plugged it in, I still had just the existing disks sda through sdf.

I watched the kernel log output while I plugged it in again, and noticed that it was causing kernel error messages! Here is the relevant output:

% tail -f /var/log/messages
[... earlier output deleted, now I plug it in to a USB 3.0 port ...]
Mar 22 15:36:14 hostname kernel: [93670.073707] usb 4-4: new high-speed USB device number 8 using ehci-pci
Mar 22 15:36:14 hostname kernel: usb 4-4: new high-speed USB device number 8 using ehci-pci
Mar 22 15:36:14 hostname kernel: [93670.191369] usb 4-4: New USB device found, idVendor=0bc2, idProduct=ab28
Mar 22 15:36:14 hostname kernel: [93670.191372] usb 4-4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Mar 22 15:36:14 hostname kernel: [93670.191374] usb 4-4: Product: BUP BK
Mar 22 15:36:14 hostname kernel: [93670.191375] usb 4-4: Manufacturer: Seagate
Mar 22 15:36:14 hostname kernel: [93670.191377] usb 4-4: SerialNumber: NA7P7JBZ
Mar 22 15:36:14 hostname kernel: usb 4-4: New USB device found, idVendor=0bc2, idProduct=ab28
Mar 22 15:36:14 hostname kernel: usb 4-4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Mar 22 15:36:14 hostname kernel: usb 4-4: Product: BUP BK
Mar 22 15:36:14 hostname kernel: usb 4-4: Manufacturer: Seagate
Mar 22 15:36:14 hostname kernel: usb 4-4: SerialNumber: NA7P7JBZ
Mar 22 15:36:14 hostname kernel: [93670.201696] scsi host16: uas
Mar 22 15:36:14 hostname kernel: [93670.201705] kworker/3:0: page allocation failure: order:7, mode:0x208c020
Mar 22 15:36:14 hostname kernel: [93670.201708] CPU: 3 PID: 1526 Comm: kworker/3:0 Not tainted 4.5.0 #1
Mar 22 15:36:14 hostname kernel: [93670.201710] Hardware name: To be filled by O.E.M. To be filled by O.E.M./M5A99FX PRO R2.0, BIOS 2501 04/07/2014
Mar 22 15:36:14 hostname kernel: [93670.201723] Workqueue: usb_hub_wq hub_event [usbcore]
Mar 22 15:36:14 hostname kernel: [93670.201725]  0000000000000000 ffff880202a574f0 ffffffff8141199e 000000000208c020
Mar 22 15:36:14 hostname kernel: [93670.201727]  0000000000000007 ffff880202a57578 ffffffff81169bdb ffff88023fff8e30
Mar 22 15:36:14 hostname kernel: [93670.201729]  ffff880202a57540 ffffffff00000030 ffff88023fff7f00 0000000000002000
Mar 22 15:36:14 hostname kernel: [93670.201730] Call Trace:
Mar 22 15:36:14 hostname kernel: [93670.201735]  [<ffffffff8141199e>] dump_stack+0x63/0x85
Mar 22 15:36:14 hostname kernel: [93670.201738]  [<ffffffff81169bdb>] warn_alloc_failed+0xdb/0x130
Mar 22 15:36:14 hostname kernel: [93670.201740]  [<ffffffff8116d500>] __alloc_pages_nodemask+0x2c0/0xc00
Mar 22 15:36:14 hostname kernel: [93670.201743]  [<ffffffff811b7b02>] alloc_pages_current+0x92/0x120
Mar 22 15:36:14 hostname kernel: [93670.201745]  [<ffffffff8116bb69>] alloc_kmem_pages+0x19/0x90
Mar 22 15:36:14 hostname kernel: [93670.201747]  [<ffffffff81189408>] kmalloc_order+0x18/0x50
Mar 22 15:36:14 hostname kernel: [93670.201749]  [<ffffffff81189464>] kmalloc_order_trace+0x24/0xa0
Mar 22 15:36:14 hostname kernel: [93670.201751]  [<ffffffff811c3713>] __kmalloc+0x1d3/0x250
Mar 22 15:36:14 hostname kernel: [93670.201753]  [<ffffffff813e738e>] init_tag_map+0x3e/0xc0
Mar 22 15:36:14 hostname kernel: [93670.201754]  [<ffffffff813e7455>] __blk_queue_init_tags+0x45/0x80
Mar 22 15:36:14 hostname kernel: [93670.201755]  [<ffffffff813e74a4>] blk_init_tags+0x14/0x20
Mar 22 15:36:14 hostname kernel: [93670.201758]  [<ffffffff8158d832>] scsi_add_host_with_dma+0x82/0x300
Mar 22 15:36:14 hostname kernel: [93670.201761]  [<ffffffffa062642e>] uas_probe+0x3ce/0x510 [uas]
Mar 22 15:36:14 hostname kernel: [93670.201769]  [<ffffffffa029b36f>] usb_probe_interface+0x1bf/0x310 [usbcore]
Mar 22 15:36:14 hostname kernel: [93670.201771]  [<ffffffff8154b89e>] driver_probe_device+0x22e/0x450
Mar 22 15:36:14 hostname kernel: [93670.201773]  [<ffffffff8154bbf2>] __device_attach_driver+0x72/0x80
Mar 22 15:36:14 hostname kernel: [93670.201775]  [<ffffffff8154bb80>] ? driver_allows_async_probing+0x30/0x30
Mar 22 15:36:14 hostname kernel: [93670.201776]  [<ffffffff815494cb>] bus_for_each_drv+0x5b/0x90
Mar 22 15:36:14 hostname kernel: [93670.201777]  [<ffffffff8154b4fb>] __device_attach+0xbb/0x140
Mar 22 15:36:14 hostname kernel: [93670.201779]  [<ffffffff8154bd83>] device_initial_probe+0x13/0x20
Mar 22 15:36:14 hostname kernel: [93670.201781]  [<ffffffff8154a892>] bus_probe_device+0x92/0xa0
Mar 22 15:36:14 hostname kernel: [93670.201782]  [<ffffffff81548665>] device_add+0x495/0x670
Mar 22 15:36:14 hostname kernel: [93670.201784]  [<ffffffff817166a2>] ? mutex_lock+0x12/0x30
Mar 22 15:36:14 hostname kernel: [93670.201791]  [<ffffffffa02991fb>] usb_set_configuration+0x52b/0x900 [usbcore]
Mar 22 15:36:14 hostname kernel: [93670.201798]  [<ffffffffa02a399e>] generic_probe+0x2e/0x90 [usbcore]
Mar 22 15:36:14 hostname kernel: [93670.201804]  [<ffffffffa029b172>] usb_probe_device+0x32/0x70 [usbcore]
Mar 22 15:36:14 hostname kernel: [93670.201806]  [<ffffffff8154b89e>] driver_probe_device+0x22e/0x450
Mar 22 15:36:14 hostname kernel: [93670.201808]  [<ffffffff8154bbf2>] __device_attach_driver+0x72/0x80
Mar 22 15:36:14 hostname kernel: [93670.201809]  [<ffffffff8154bb80>] ? driver_allows_async_probing+0x30/0x30
Mar 22 15:36:14 hostname kernel: [93670.201810]  [<ffffffff815494cb>] bus_for_each_drv+0x5b/0x90
Mar 22 15:36:14 hostname kernel: [93670.201812]  [<ffffffff8154b4fb>] __device_attach+0xbb/0x140
Mar 22 15:36:14 hostname kernel: [93670.201813]  [<ffffffff8154bd83>] device_initial_probe+0x13/0x20
Mar 22 15:36:14 hostname kernel: [93670.201815]  [<ffffffff8154a892>] bus_probe_device+0x92/0xa0
Mar 22 15:36:14 hostname kernel: [93670.201816]  [<ffffffff81548665>] device_add+0x495/0x670
Mar 22 15:36:14 hostname kernel: [93670.201818]  [<ffffffff81520300>] ? trace_raw_output_urandom_read+0x70/0x70
Mar 22 15:36:14 hostname kernel: [93670.201824]  [<ffffffffa028e75b>] usb_new_device+0x28b/0x650 [usbcore]
Mar 22 15:36:14 hostname kernel: [93670.201830]  [<ffffffffa0290a75>] hub_event+0xff5/0x1540 [usbcore]
Mar 22 15:36:14 hostname kernel: [93670.201833]  [<ffffffff8108dc7e>] process_one_work+0x14e/0x410
Mar 22 15:36:14 hostname kernel: [93670.201834]  [<ffffffff8108eb89>] worker_thread+0x69/0x4b0
Mar 22 15:36:14 hostname kernel: [93670.201836]  [<ffffffff817142d0>] ? __schedule+0x350/0xa20
Mar 22 15:36:14 hostname kernel: [93670.201837]  [<ffffffff8108eb20>] ? rescuer_thread+0x340/0x340
Mar 22 15:36:14 hostname kernel: [93670.201838]  [<ffffffff8108eb20>] ? rescuer_thread+0x340/0x340
Mar 22 15:36:14 hostname kernel: [93670.201840]  [<ffffffff81093b9b>] kthread+0xdb/0x100
Mar 22 15:36:14 hostname kernel: [93670.201842]  [<ffffffff81093ac0>] ? kthread_park+0x60/0x60
Mar 22 15:36:14 hostname kernel: [93670.201844]  [<ffffffff81718c4f>] ret_from_fork+0x3f/0x70
Mar 22 15:36:14 hostname kernel: [93670.201846]  [<ffffffff81093ac0>] ? kthread_park+0x60/0x60
Mar 22 15:36:14 hostname kernel: [93670.201847] Mem-Info:
Mar 22 15:36:14 hostname kernel: [93670.201850] active_anon:590016 inactive_anon:54472 isolated_anon:0
Mar 22 15:36:14 hostname kernel: [93670.201850]  active_file:527114 inactive_file:525835 isolated_file:0
Mar 22 15:36:14 hostname kernel: [93670.201850]  unevictable:8 dirty:801 writeback:0 unstable:0
Mar 22 15:36:14 hostname kernel: [93670.201850]  slab_reclaimable:173148 slab_unreclaimable:16145
Mar 22 15:36:14 hostname kernel: [93670.201850]  mapped:133299 shmem:61237 pagetables:13740 bounce:0
Mar 22 15:36:14 hostname kernel: [93670.201850]  free:76369 free_pcp:1204 free_cma:0
Mar 22 15:36:14 hostname kernel: [93670.201853] Node 0 DMA free:15348kB min:20kB low:24kB high:28kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15996kB managed:15896kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:4kB slab_unreclaimable:32kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
Mar 22 15:36:14 hostname kernel: [93670.201857] lowmem_reserve[]: 0 2892 7883 7883
Mar 22 15:36:14 hostname kernel: [93670.201859] Node 0 DMA32 free:228576kB min:4136kB low:5168kB high:6204kB active_anon:790476kB inactive_anon:71536kB active_file:856764kB inactive_file:854772kB unevictable:32kB isolated(anon):0kB isolated(file):0kB present:3043120kB managed:2964652kB mlocked:32kB dirty:1120kB writeback:0kB mapped:236700kB shmem:79752kB slab_reclaimable:87280kB slab_unreclaimable:17800kB kernel_stack:2608kB pagetables:19020kB unstable:0kB bounce:0kB free_pcp:2284kB local_pcp:524kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
Mar 22 15:36:14 hostname kernel: [93670.201863] lowmem_reserve[]: 0 0 4991 4991
Mar 22 15:36:14 hostname kernel: [93670.201864] Node 0 Normal free:61552kB min:7140kB low:8924kB high:10708kB active_anon:1569588kB inactive_anon:146352kB active_file:1251692kB inactive_file:1248568kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:5242876kB managed:5110888kB mlocked:0kB dirty:2084kB writeback:0kB mapped:296496kB shmem:165196kB slab_reclaimable:605308kB slab_unreclaimable:46748kB kernel_stack:7328kB pagetables:35940kB unstable:0kB bounce:0kB free_pcp:2532kB local_pcp:528kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
Mar 22 15:36:14 hostname kernel: [93670.201868] lowmem_reserve[]: 0 0 0 0
Mar 22 15:36:14 hostname kernel: [93670.201870] Node 0 DMA: 1*4kB (E) 2*8kB (UE) 2*16kB (UE) 2*32kB (UE) 4*64kB (UE) 1*128kB (E) 2*256kB (UE) 2*512kB (UE) 1*1024kB (E) 2*2048kB (ME) 2*4096kB (M) = 15348kB
Mar 22 15:36:14 hostname kernel: [93670.201877] Node 0 DMA32: 30740*4kB (UME) 13167*8kB (UM) 1*16kB (M) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 228312kB
Mar 22 15:36:14 hostname kernel: [93670.201882] Node 0 Normal: 10121*4kB (UME) 2637*8kB (UM) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 61580kB
Mar 22 15:36:14 hostname kernel: [93670.201887] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
Mar 22 15:36:14 hostname kernel: [93670.201888] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
Mar 22 15:36:14 hostname kernel: [93670.201889] 1114183 total pagecache pages
Mar 22 15:36:14 hostname kernel: [93670.201891] 0 pages in swap cache
Mar 22 15:36:14 hostname kernel: [93670.201892] Swap cache stats: add 0, delete 0, find 0/0
Mar 22 15:36:14 hostname kernel: [93670.201892] Free swap  = 0kB
Mar 22 15:36:14 hostname kernel: [93670.201893] Total swap = 0kB
Mar 22 15:36:14 hostname kernel: [93670.201894] 2075498 pages RAM
Mar 22 15:36:14 hostname kernel: [93670.201894] 0 pages HighMem/MovableOnly
Mar 22 15:36:14 hostname kernel: [93670.201895] 52639 pages reserved
Mar 22 15:36:14 hostname kernel: [93670.201896] 0 pages cma reserved
Mar 22 15:36:14 hostname kernel: [93670.201896] 0 pages hwpoisoned
Mar 22 15:36:14 hostname kernel: [93670.202598] uas: probe of 4-4:1.0 failed with error -12
Mar 22 15:36:14 hostname mtp-probe: checking bus 4, device 8: "/sys/devices/pci0000:00/0000:00:13.2/usb4/4-4"
Mar 22 15:36:14 hostname mtp-probe: bus: 4, device: 8 was not an MTP device
Mar 22 15:36:14 hostname kernel: scsi host16: uas
Mar 22 15:36:14 hostname kernel: kworker/3:0: page allocation failure: order:7, mode:0x208c020
Mar 22 15:36:14 hostname kernel: CPU: 3 PID: 1526 Comm: kworker/3:0 Not tainted 4.5.0 #1
Mar 22 15:36:14 hostname kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./M5A99FX PRO R2.0, BIOS 2501 04/07/2014
Mar 22 15:36:14 hostname kernel: Workqueue: usb_hub_wq hub_event [usbcore]
Mar 22 15:36:14 hostname kernel: 0000000000000000 ffff880202a574f0 ffffffff8141199e 000000000208c020
Mar 22 15:36:14 hostname kernel: 0000000000000007 ffff880202a57578 ffffffff81169bdb ffff88023fff8e30
Mar 22 15:36:14 hostname kernel: ffff880202a57540 ffffffff00000030 ffff88023fff7f00 0000000000002000
Mar 22 15:36:14 hostname kernel: Call Trace:
Mar 22 15:36:14 hostname kernel: [<ffffffff8141199e>] dump_stack+0x63/0x85
Mar 22 15:36:14 hostname kernel: [<ffffffff81169bdb>] warn_alloc_failed+0xdb/0x130
Mar 22 15:36:14 hostname kernel: [<ffffffff8116d500>] __alloc_pages_nodemask+0x2c0/0xc00
Mar 22 15:36:14 hostname kernel: [<ffffffff811b7b02>] alloc_pages_current+0x92/0x120
Mar 22 15:36:14 hostname kernel: [<ffffffff8116bb69>] alloc_kmem_pages+0x19/0x90
Mar 22 15:36:14 hostname kernel: [<ffffffff81189408>] kmalloc_order+0x18/0x50
Mar 22 15:36:14 hostname kernel: [<ffffffff81189464>] kmalloc_order_trace+0x24/0xa0
Mar 22 15:36:14 hostname kernel: [<ffffffff811c3713>] __kmalloc+0x1d3/0x250
Mar 22 15:36:14 hostname kernel: [<ffffffff813e738e>] init_tag_map+0x3e/0xc0
Mar 22 15:36:14 hostname kernel: [<ffffffff813e7455>] __blk_queue_init_tags+0x45/0x80
Mar 22 15:36:14 hostname kernel: [<ffffffff813e74a4>] blk_init_tags+0x14/0x20
Mar 22 15:36:14 hostname kernel: [<ffffffff8158d832>] scsi_add_host_with_dma+0x82/0x300
Mar 22 15:36:14 hostname kernel: [<ffffffffa062642e>] uas_probe+0x3ce/0x510 [uas]
Mar 22 15:36:14 hostname kernel: [<ffffffffa029b36f>] usb_probe_interface+0x1bf/0x310 [usbcore]
Mar 22 15:36:14 hostname kernel: [<ffffffff8154b89e>] driver_probe_device+0x22e/0x450
Mar 22 15:36:14 hostname kernel: [<ffffffff8154bbf2>] __device_attach_driver+0x72/0x80
Mar 22 15:36:14 hostname kernel: [<ffffffff8154bb80>] ? driver_allows_async_probing+0x30/0x30
Mar 22 15:36:14 hostname kernel: [<ffffffff815494cb>] bus_for_each_drv+0x5b/0x90
Mar 22 15:36:14 hostname kernel: [<ffffffff8154b4fb>] __device_attach+0xbb/0x140
Mar 22 15:36:14 hostname kernel: [<ffffffff8154bd83>] device_initial_probe+0x13/0x20
Mar 22 15:36:14 hostname kernel: [<ffffffff8154a892>] bus_probe_device+0x92/0xa0
Mar 22 15:36:14 hostname kernel: [<ffffffff81548665>] device_add+0x495/0x670
Mar 22 15:36:14 hostname kernel: [<ffffffff817166a2>] ? mutex_lock+0x12/0x30
Mar 22 15:36:14 hostname kernel: [<ffffffffa02991fb>] usb_set_configuration+0x52b/0x900 [usbcore]
Mar 22 15:36:14 hostname kernel: [<ffffffffa02a399e>] generic_probe+0x2e/0x90 [usbcore]
Mar 22 15:36:14 hostname kernel: [<ffffffffa029b172>] usb_probe_device+0x32/0x70 [usbcore]
Mar 22 15:36:14 hostname kernel: [<ffffffff8154b89e>] driver_probe_device+0x22e/0x450
Mar 22 15:36:14 hostname kernel: [<ffffffff8154bbf2>] __device_attach_driver+0x72/0x80
Mar 22 15:36:14 hostname kernel: [<ffffffff8154bb80>] ? driver_allows_async_probing+0x30/0x30
Mar 22 15:36:14 hostname kernel: [<ffffffff815494cb>] bus_for_each_drv+0x5b/0x90
Mar 22 15:36:14 hostname kernel: [<ffffffff8154b4fb>] __device_attach+0xbb/0x140
Mar 22 15:36:14 hostname kernel: [<ffffffff8154bd83>] device_initial_probe+0x13/0x20
Mar 22 15:36:14 hostname kernel: [<ffffffff8154a892>] bus_probe_device+0x92/0xa0
Mar 22 15:36:14 hostname kernel: [<ffffffff81548665>] device_add+0x495/0x670
Mar 22 15:36:14 hostname kernel: [<ffffffff81520300>] ? trace_raw_output_urandom_read+0x70/0x70
Mar 22 15:36:14 hostname kernel: [<ffffffffa028e75b>] usb_new_device+0x28b/0x650 [usbcore]
Mar 22 15:36:14 hostname kernel: [<ffffffffa0290a75>] hub_event+0xff5/0x1540 [usbcore]
Mar 22 15:36:14 hostname kernel: [<ffffffff8108dc7e>] process_one_work+0x14e/0x410
Mar 22 15:36:14 hostname kernel: [<ffffffff8108eb89>] worker_thread+0x69/0x4b0
Mar 22 15:36:14 hostname kernel: [<ffffffff817142d0>] ? __schedule+0x350/0xa20
Mar 22 15:36:14 hostname kernel: [<ffffffff8108eb20>] ? rescuer_thread+0x340/0x340
Mar 22 15:36:14 hostname kernel: [<ffffffff8108eb20>] ? rescuer_thread+0x340/0x340
Mar 22 15:36:14 hostname kernel: [<ffffffff81093b9b>] kthread+0xdb/0x100
Mar 22 15:36:14 hostname kernel: [<ffffffff81093ac0>] ? kthread_park+0x60/0x60
Mar 22 15:36:14 hostname kernel: [<ffffffff81718c4f>] ret_from_fork+0x3f/0x70
Mar 22 15:36:14 hostname kernel: [<ffffffff81093ac0>] ? kthread_park+0x60/0x60
Mar 22 15:36:14 hostname kernel: Mem-Info:
Mar 22 15:36:14 hostname kernel: active_anon:590016 inactive_anon:54472 isolated_anon:0
Mar 22 15:36:14 hostname kernel: Node 0 DMA free:15348kB min:20kB low:24kB high:28kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15996kB managed:15896kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:4kB slab_unreclaimable:32kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
Mar 22 15:36:14 hostname kernel: lowmem_reserve[]: 0 2892 7883 7883
Mar 22 15:36:14 hostname kernel: Node 0 DMA32 free:228576kB min:4136kB low:5168kB high:6204kB active_anon:790476kB inactive_anon:71536kB active_file:856764kB inactive_file:854772kB unevictable:32kB isolated(anon):0kB isolated(file):0kB present:3043120kB managed:2964652kB mlocked:32kB dirty:1120kB writeback:0kB mapped:236700kB shmem:79752kB slab_reclaimable:87280kB slab_unreclaimable:17800kB kernel_stack:2608kB pagetables:19020kB unstable:0kB bounce:0kB free_pcp:2284kB local_pcp:524kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
Mar 22 15:36:14 hostname kernel: lowmem_reserve[]: 0 0 4991 4991
Mar 22 15:36:14 hostname kernel: Node 0 Normal free:61552kB min:7140kB low:8924kB high:10708kB active_anon:1569588kB inactive_anon:146352kB active_file:1251692kB inactive_file:1248568kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:5242876kB managed:5110888kB mlocked:0kB dirty:2084kB writeback:0kB mapped:296496kB shmem:165196kB slab_reclaimable:605308kB slab_unreclaimable:46748kB kernel_stack:7328kB pagetables:35940kB unstable:0kB bounce:0kB free_pcp:2532kB local_pcp:528kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
Mar 22 15:36:14 hostname kernel: lowmem_reserve[]: 0 0 0 0
Mar 22 15:36:14 hostname kernel: Node 0 DMA: 1*4kB (E) 2*8kB (UE) 2*16kB (UE) 2*32kB (UE) 4*64kB (UE) 1*128kB (E) 2*256kB (UE) 2*512kB (UE) 1*1024kB (E) 2*2048kB (ME) 2*4096kB (M) = 15348kB
Mar 22 15:36:14 hostname kernel: Node 0 DMA32: 30740*4kB (UME) 13167*8kB (UM) 1*16kB (M) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 228312kB
Mar 22 15:36:14 hostname kernel: Node 0 Normal: 10121*4kB (UME) 2637*8kB (UM) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 61580kB
Mar 22 15:36:14 hostname kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
Mar 22 15:36:14 hostname kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
Mar 22 15:36:14 hostname kernel: 1114183 total pagecache pages
Mar 22 15:36:14 hostname kernel: 0 pages in swap cache
Mar 22 15:36:14 hostname kernel: Swap cache stats: add 0, delete 0, find 0/0
Mar 22 15:36:14 hostname kernel: Free swap  = 0kB
Mar 22 15:36:14 hostname kernel: Total swap = 0kB
Mar 22 15:36:14 hostname kernel: 2075498 pages RAM
Mar 22 15:36:14 hostname kernel: 0 pages HighMem/MovableOnly
Mar 22 15:36:14 hostname kernel: 52639 pages reserved
Mar 22 15:36:14 hostname kernel: 0 pages cma reserved
Mar 22 15:36:14 hostname kernel: 0 pages hwpoisoned
Mar 22 15:36:14 hostname kernel: uas: probe of 4-4:1.0 failed with error -12
Mar 22 15:36:14 hostname mtp-probe: checking bus 4, device 8: "/sys/devices/pci0000:00/0000:00:13.2/usb4/4-4"
Mar 22 15:36:14 hostname mtp-probe: bus: 4, device: 8 was not an MTP device

What's on the Device?

I plugged it into an OpenBSD system. That system has one internal disk, /dev/sd0 to the OpenBSD kernel, so the first USB-connected disk will be /dev/sd1. I can look at the partition table there:

bash-4.3# fdisk /dev/rsd1c
fdisk: disk too large (7814037167 sectors). size truncated.
Disk: /dev/rsd1c        geometry: 267349/255/63 [4294961685 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: EE      0   0   2 - 267349  89   4 [           1:  4294967295 ] EFI GPT
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused

There it is! It's strange that Linux couldn't make sense of it...

Deleting and Recreating the Volume on Windows

I followed Microsoft's directions for creating and formatting a hard disk partition. I rebooted my laptop which runs OpenBSD most of the time, and selected Windows from the boot menu. Let's plug in the disk and make sure that Windows can find it:

Windows detects the Seagate 4 TB external disk.

The disk has a few files on it, nothing I want to keep:

Files that Seagate stored on the 4 TB external disk.

I need to start the Computer Management tool. I do this by clicking through this somewhat unobvious sequence:
StartControl PanelSystem and SecurityAdministrative ToolsComputer Management

Windows Computer Management tool.

I click Disk Management in the tree within the left pane.

Multibooting
OpenBSD and
Windows

Disk 0 appears as it does here because it contains first a 100 MB boot partition, the ESP or EFI System Partition containing the boot loader itself. The second partition of Disk 0 is what Windows see as its 100 GB C: drive. The majority of Disk 0, the 840 GB third partition, is a mystery to Windows. This is what OpenBSD sees as its /dev/sd0. See my OpenBSD and Windows multibooting page for details on how to set up Disk 0.

Disk 1 is what I will modify here.

Windows Computer Management tool, Disk Management option.

I right-click Disk 1 and select Delete Volume.

Deleting the volume D: on Disk 1.

Now I can right-click the unallocated Disk 1 and select New Simple Volume.

Creating a new simple volume on Disk 1.

This starts the New Simple Volume Wizard. I will simply accept the defaults.

New volume wizard screen #1: starting.
New volume wizard screen #2: size.
New volume wizard screen #3: drive letter D.
New volume wizard screen #4: formatting as NTFS.
New volume wizard screen #5: Finished.

I have completed the five panels of the New Simple Volume Wizard by simply clicking Next and agreeing to the defaults, and finally clicking Finish.

I could have selected Do not format this volume in the fourth screen and saved a few minutes. I plan to re-partition and then re-format the disk under Linux.

The Wizard disappears, and I'm back to the Computer Management screen.

Once the Wizard is gone, notice that it now says "Formatting" for Disk 1. This goes on for a while...

Formatting operation is underway.

When the formatting is finished it now reports the new volume labeled "D:" with an NTFS file system.

Formatting operation is complete.

I exit the Computer Management tool and look at the properties of the D: volume.

Drive D after the volume deletion and recreation.

Checking the Results

I rebooted my laptop into OpenBSD, and then plugged in the disk. The kernel ring buffer shows that the kernel detects it correctly:

% dmesg | tail
umass0 at uhub0 port 3 configuration 1 interface 0 "Seagate BUP BK" rev 2.10/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus4 at umass0: 2 targets, initiator 0
sd1 at scsibus4 targ 1 lun 0: <Seagate, BUP BK, 0304> SCSI4 0/direct fixed

The apparent geometry of the disk has changed. Compare the partition table details before and after the above changes made under Windows:

Before:

bash-4.3# fdisk /dev/rsd1c
fdisk: disk too large (7814037167 sectors). size truncated.
Disk: /dev/rsd1c        geometry: 267349/255/63 [4294961685 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: EE      0   0   2 - 267349  89   4 [           1:  4294967295 ] EFI GPT
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused

After:

bash-4.3# fdisk /dev/rsd1c
fdisk: disk too large (7814037167 sectors). size truncated.
Disk: /dev/rsd1c        geometry: 32960/511/255 [4294852800 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: EE      0   0   2 -  32960 449   1 [           1:  4294967295 ] EFI GPT
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused

Repartitioning

Now I move the disk to my Linux system. There is a 134 MB Microsoft Reserved Partition (or MRP) and a 4 TB NTFS partition. The MRP is created by Windows to support programs that otherwise would have used hidden sectors on a disk using the old MBR partition table format.

# parted /dev/sdg
GNU Parted 3.2
Using /dev/sdg
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Seagate BUP BK (scsi)
Disk /dev/sdg: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  134MB   134MB                Microsoft reserved partition  msftres
 2      135MB   4001GB  4001GB  ntfs         Basic data partition          msftdata

I will delete those two partition definitions:

(parted) rm 2
Error: Partition(s) 2 on /dev/sdg have been written, but we have been unable to
inform the kernel of the change, probably because it/they are in use.  As a
result, the old partition(s) will remain in use.  You should reboot now before
making further changes.
Ignore/Cancel? ignore
(parted) rm 1
Error: Partition(s) 1, 2 on /dev/sdg have been written, but we have been unable
to inform the kernel of the change, probably because it/they are in use.  As a
result, the old partition(s) will remain in use.  You should reboot now before
making further changes.
Ignore/Cancel? ignore
(parted) print
Model: Seagate BUP BK (scsi)
Disk /dev/sdg: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start  End  Size  File system  Name  Flags

(parted) quit

That didn't go as expected, and things are a bit strange after I exit the parted session. The partprobe command doesn't help, so I reboot.

Partitioning and Creating a File System

Now I find that it has a GUID partition table, also called a GPT disk label. I will make one partition spanning most of the disk. Trying to manually specify where to start the disk leads to warning messages about non-aligned storage. The simple solution is to simply let parted handle this for me. Tell it that you want to the entire disk, and it will automatically set aside an initial block for the disk label itself:

# parted /dev/sdg 
GNU Parted 3.2
Using /dev/sdg
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Seagate BUP BK (scsi)
Disk /dev/sdg: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start  End  Size  File system  Name  Flags

(parted) mkpart primary ext4 0% 100%
(parted) print
Model: Seagate BUP BK (scsi)
Disk /dev/sdg: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  4001GB  4001GB  ext4         primary

(parted) quit
# ls -l /dev/sdg*
brw-rw---- 1 root disk 8, 96 Mar 22 17:38 /dev/sdg
brw-rw---- 1 root disk 8, 97 Mar 22 17:38 /dev/sdg1
# UUID=$( uuidgen )
# echo $UUID
a63ec318-018b-4364-94c7-1c3e9b14baa3 /dev/sdg1
# mkfs.ext4 -L Seagate4TB -U $UUID /dev/sdg1
mke2fs 1.42.12 (29-Aug-2014)
Creating filesystem with 976754176 4k blocks and 244195328 inodes
Filesystem UUID: a63ec318-018b-4364-94c7-1c3e9b14baa3
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
	102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

If I planned to use this disk only on Linux, I could have created an XFS, Btrfs, or other file system.

OpenBSD includes Ext2 family tools in the e2fsprogs package, so I made it an Ext4 file system. OpenBSD can mount it with mount_ext2fs, without the journaling features or SELinux labeling.

I also could have created an NTFS file system, which Linux can mount read/write with mount.fuse and OpenBSD can mount with mount_ntfs. Then it could be used with Windows and with DVD and Blu-ray players

Linux Kernel Device Detection

Now I get reasonable results in the Linux kernel ring buffer, and desktop environments can automatically mount it for the logged-in user:

% tail -f /var/log/messages
[... earlier output deleted, now I plug it in to a USB 3.0 port ...]
Mar 22 18:10:42 hostname kernel: [ 2517.535687] usb 3-2: new SuperSpeed USB device number 2 using xhci_hcd
Mar 22 18:10:42 hostname kernel: usb 3-2: new SuperSpeed USB device number 2 using xhci_hcd
Mar 22 18:10:42 hostname kernel: [ 2517.548837] usb 3-2: New USB device found, idVendor=0bc2, idProduct=ab28
Mar 22 18:10:42 hostname kernel: [ 2517.548840] usb 3-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Mar 22 18:10:42 hostname kernel: [ 2517.548842] usb 3-2: Product: BUP BK
Mar 22 18:10:42 hostname kernel: [ 2517.548843] usb 3-2: Manufacturer: Seagate
Mar 22 18:10:42 hostname kernel: [ 2517.548845] usb 3-2: SerialNumber: NA7P7JBZ
Mar 22 18:10:42 hostname kernel: usb 3-2: New USB device found, idVendor=0bc2, idProduct=ab28
Mar 22 18:10:42 hostname kernel: usb 3-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Mar 22 18:10:42 hostname kernel: usb 3-2: Product: BUP BK
Mar 22 18:10:42 hostname kernel: usb 3-2: Manufacturer: Seagate
Mar 22 18:10:42 hostname kernel: usb 3-2: SerialNumber: NA7P7JBZ
Mar 22 18:10:42 hostname kernel: [ 2517.556073] scsi host11: uas
Mar 22 18:10:42 hostname kernel: scsi host11: uas
Mar 22 18:10:42 hostname kernel: [ 2517.556599] scsi 11:0:0:0: Direct-Access     Seagate  BUP BK           0304 PQ: 0 ANSI: 6
Mar 22 18:10:42 hostname kernel: scsi 11:0:0:0: Direct-Access     Seagate  BUP BK           0304 PQ: 0 ANSI: 6
Mar 22 18:10:42 hostname kernel: [ 2517.569592] sd 11:0:0:0: [sdg] Spinning up disk...
Mar 22 18:10:42 hostname kernel: sd 11:0:0:0: [sdg] Spinning up disk...
Mar 22 18:10:42 hostname mtp-probe: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:15.1/0000:0a:00.0/usb3/3-2"
Mar 22 18:10:42 hostname mtp-probe: bus: 3, device: 2 was not an MTP device
Mar 22 18:10:42 hostname mtp-probe: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:15.1/0000:0a:00.0/usb3/3-2"
Mar 22 18:10:42 hostname mtp-probe: bus: 3, device: 2 was not an MTP device
Mar 22 18:10:50 hostname kernel: [ 2518.570193] ........ready
Mar 22 18:10:50 hostname kernel: [ 2525.576968] sd 11:0:0:0: [sdg] 7814037167 512-byte logical blocks: (4.00 TB/3.64 TiB)
Mar 22 18:10:50 hostname kernel: [ 2525.576971] sd 11:0:0:0: [sdg] 2048-byte physical blocks
Mar 22 18:10:50 hostname kernel: ........ready
Mar 22 18:10:50 hostname kernel: sd 11:0:0:0: [sdg] 7814037167 512-byte logical blocks: (4.00 TB/3.64 TiB)
Mar 22 18:10:50 hostname kernel: sd 11:0:0:0: [sdg] 2048-byte physical blocks
Mar 22 18:10:51 hostname kernel: [ 2526.118581] sd 11:0:0:0: [sdg] Write Protect is off
Mar 22 18:10:51 hostname kernel: [ 2526.118762] sd 11:0:0:0: [sdg] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Mar 22 18:10:51 hostname kernel: sd 11:0:0:0: [sdg] Write Protect is off
Mar 22 18:10:51 hostname kernel: sd 11:0:0:0: [sdg] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Mar 22 18:11:21 hostname kernel: [ 2556.954142] sd 11:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
Mar 22 18:11:21 hostname kernel: [ 2556.954147] sd 11:0:0:0: tag#0 CDB: Inquiry 12 01 00 00 40 00
Mar 22 18:11:21 hostname kernel: [ 2556.954583] scsi host11: uas_eh_bus_reset_handler start
Mar 22 18:11:21 hostname kernel: sd 11:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
Mar 22 18:11:21 hostname kernel: sd 11:0:0:0: tag#0 CDB: Inquiry 12 01 00 00 40 00
Mar 22 18:11:21 hostname kernel: scsi host11: uas_eh_bus_reset_handler start
Mar 22 18:11:21 hostname kernel: [ 2557.061137] usb 3-2: reset SuperSpeed USB device number 2 using xhci_hcd
Mar 22 18:11:21 hostname kernel: usb 3-2: reset SuperSpeed USB device number 2 using xhci_hcd
Mar 22 18:11:21 hostname kernel: [ 2557.082118] scsi host11: uas_eh_bus_reset_handler success
Mar 22 18:11:21 hostname kernel: scsi host11: uas_eh_bus_reset_handler success
Mar 22 18:11:22 hostname kernel: [ 2557.486404]  sdg: sdg1
Mar 22 18:11:22 hostname kernel: sdg: sdg1
Mar 22 18:11:22 hostname kernel: [ 2557.487743] sd 11:0:0:0: [sdg] Attached SCSI disk
Mar 22 18:11:22 hostname kernel: sd 11:0:0:0: [sdg] Attached SCSI disk
Mar 22 18:11:26 hostname udisksd[3884]: Mounted /dev/sdg1 at /run/media/cromwell/Seagate4TB on behalf of uid 1000
Mar 22 18:11:26 hostname kernel: [ 2561.468523] EXT4-fs (sdg1): mounted filesystem with ordered data mode. Opts: (null)
Mar 22 18:11:26 hostname kernel: EXT4-fs (sdg1): mounted filesystem with ordered data mode. Opts: (null)
Mar 22 18:11:26 hostname udisksd[3884]: Mounted /dev/sdg1 at /run/media/cromwell/Seagate4TB on behalf of uid 1000
Mar 22 18:11:27 hostname kernel: [ 2562.484603] xhci_hcd 0000:0a:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 3 comp_code 1
Mar 22 18:11:27 hostname kernel: [ 2562.484609] xhci_hcd 0000:0a:00.0: Looking for event-dma 000000007410e010 trb-start 000000007410e020 trb-end 000000007410e810 seg-start 000000007410e000 seg-end 000000007410eff0
Mar 22 18:11:27 hostname kernel: xhci_hcd 0000:0a:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 3 comp_code 1
Mar 22 18:11:27 hostname kernel: xhci_hcd 0000:0a:00.0: Looking for event-dma 000000007410e010 trb-start 000000007410e020 trb-end 000000007410e810 seg-start 000000007410e000 seg-end 000000007410eff0
Mar 22 18:11:59 hostname kernel: [ 2594.968146] sd 11:0:0:0: [sdg] tag#3 uas_eh_abort_handler 0 uas-tag 4 inflight: OUT
Mar 22 18:11:59 hostname kernel: [ 2594.968152] sd 11:0:0:0: [sdg] tag#3 CDB: Write(16) 8a 00 00 00 00 00 12 80 c5 00 00 00 04 00 00 00
Mar 22 18:11:59 hostname kernel: [ 2594.968602] scsi host11: uas_eh_bus_reset_handler start
Mar 22 18:11:59 hostname kernel: sd 11:0:0:0: [sdg] tag#3 uas_eh_abort_handler 0 uas-tag 4 inflight: OUT
Mar 22 18:11:59 hostname kernel: sd 11:0:0:0: [sdg] tag#3 CDB: Write(16) 8a 00 00 00 00 00 12 80 c5 00 00 00 04 00 00 00
Mar 22 18:11:59 hostname kernel: scsi host11: uas_eh_bus_reset_handler start
Mar 22 18:11:59 hostname kernel: [ 2595.075177] usb 3-2: reset SuperSpeed USB device number 2 using xhci_hcd
Mar 22 18:11:59 hostname kernel: usb 3-2: reset SuperSpeed USB device number 2 using xhci_hcd
Mar 22 18:12:00 hostname kernel: [ 2595.096133] scsi host11: uas_eh_bus_reset_handler success
Mar 22 18:12:00 hostname kernel: scsi host11: uas_eh_bus_reset_handler success

If You Want to Recognize It But Not As Storage

How to disable UAS

USA Attached Storage or UAS can cause issues with non-compliant adapters requiring it to be disabled. This page on disabling UAS has a good explanation of the symptoms, how to do initial tests, and multiple ways of telling the kernel to treat a specific problematic drive model differently.