LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hard drive mounting woes (https://www.linuxquestions.org/questions/linux-newbie-8/hard-drive-mounting-woes-4175547916/)

Average 07-13-2015 10:27 PM

Hard drive mounting woes
 
Hello everyone!

I needed to transfer 1TB (SATA; MBR; EXFAT) drive to a 2TB drive (SATA; GPT; EXFAT). I connected both via USB 2.0 to my laptop running Debian Wheezy. ETA: few days.
I decided I will speed things up by building a Debian 8.1 box and hooking up both drives with SATA instead of USB 2.0.


I installed the drives. Installed exfat-fuse and exfat-utils. Mounting the 1TB drive was a breeze.
But then mounting the 2TB proved to be a two day failing endevour:


Code:

root@vox:/home/o# sfdisk -l

Disk /dev/sda: 121601 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start    End  #cyls    #blocks  Id  System
/dev/sda1          0+ 121601- 121601- 976759808    7  HPFS/NTFS/exFAT
/dev/sda2          0      -      0          0    0  Empty
/dev/sda3          0      -      0          0    0  Empty
/dev/sda4          0      -      0          0    0  Empty

Disk /dev/sdc: 243201 cylinders, 255 heads, 63 sectors/track
sfdisk: Warning: The partition table looks like it was made
  for C/H/S=*/256/63 (instead of 243201/255/63).
For this listing I'll assume that geometry.
Units: cylinders of 8257536 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start    End  #cyls    #blocks  Id  System
/dev/sdc1          0+ 266305- 266306- 2147483647+  ee  GPT
/dev/sdc2          0      -      0          0    0  Empty
/dev/sdc3          0      -      0          0    0  Empty
/dev/sdc4          0      -      0          0    0  Empty

Disk /dev/sdb: 30401 cylinders, 255 heads, 63 sectors/track
sfdisk: Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start    End  #cyls    #blocks  Id  System
/dev/sdb1  *      0+  29442-  29443- 236495872  83  Linux
/dev/sdb2      29442+  30401-    959-  7700481    5  Extended
/dev/sdb3          0      -      0          0    0  Empty
/dev/sdb4          0      -      0          0    0  Empty
/dev/sdb5      29442+  30401-    959-  7700480  82  Linux swap / Solaris


here is the output from GParted on my Debian 8.1 box:
http://s11.postimg.org/y8w7i1rv7/Scr...3_22_37_15.png

Code:

root@vox:/home/o# mount -t exfat /dev/sdc1 /home/o/2tb/
FUSE exfat 1.1.0
ERROR: failed to open '/dev/sdc1': No such file or directory.

Just to be sure I tried:

Code:

root@vox:/home/o# mount -t exfat /dev/sdc2 /home/o/2tb/
FUSE exfat 1.1.0
ERROR: failed to open '/dev/sdc2': No such file or directory.
root@vox:/home/o# mount -t exfat /dev/sdc3 /home/o/2tb/
FUSE exfat 1.1.0
ERROR: failed to open '/dev/sdc3': No such file or directory.
root@vox:/home/o# mount -t exfat /dev/sdc4 /home/o/2tb/
FUSE exfat 1.1.0
ERROR: failed to open '/dev/sdc4': No such file or directory.


What's going on?



To be sure, I disconnect the drive and put it back into the usb enclosure and connect it back to my laptop: Voila! It even automounts!

Code:

root@laptop:# sfdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util sfdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 243201 cylinders, 255 heads, 63 sectors/track
Warning: The partition table looks like it was made
  for C/H/S=*/256/63 (instead of 243201/255/63).
For this listing I'll assume that geometry.
Units = cylinders of 8257536 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start    End  #cyls    #blocks  Id  System
/dev/sdb1          0+ 266305- 266306- 2147483647+  ee  GPT
/dev/sdb2          0      -      0          0    0  Empty
/dev/sdb3          0      -      0          0    0  Empty
/dev/sdb4          0      -      0          0    0  Empty

here is the output from GParted on my laptop:

http://s17.postimg.org/s0nkae3pr/Scr...3_22_27_26.png

suicidaleggroll 07-13-2015 10:40 PM

Did you run an "ls" on /dev/ to see if sdc# was there?

I've only run into something like this once, it was with a RAID, but the symptoms were similar: fdisk reports a partition that doesn't exist in /dev/.

Here is my thread on the issue, nobody responded but I managed to fix it on my own:
http://www.linuxquestions.org/questi...ng-4175444903/

Cliffnotes: "partprobe /dev/md126" (or in your case "partprobe /dev/sdc") was able to restore a corrupt GPT table and created the /dev/md126p# (/dev/sdc# in your case) partitions so that I could mount them and go about my business.

Average 07-13-2015 10:50 PM

Quote:

Originally Posted by suicidaleggroll (Post 5391064)
Did you run an "ls" on /dev/ to see if sdc# was there?

I've only run into something like this once, it was with a RAID, but the symptoms were similar: fdisk reports a partition that doesn't exist in /dev/.

Here is my thread on the issue, nobody responded but I managed to fix it on my own:
http://www.linuxquestions.org/questi...ng-4175444903/

Cliffnotes: "partprobe /dev/md126" (or in your case "partprobe /dev/sdc") was able to restore a corrupt GPT table and created the /dev/md126p# (/dev/sdc# in your case) partitions so that I could mount them and go about my business.


Thanks suicidaleggroll!

"ls" shows only sdc! Mystery is starting to unravel!

I tried "partprobe /dev/sdc" and then "ls" and it is still the same.

Also please note how simply the drive mounts on my laptop...

I'm just flored at the mystery.

Aia 07-13-2015 11:46 PM

According to the snapshot you posted the drive is /dev/sdc and does not contain any filesystem. You cannot mount it without a filesystem on it.

lsblk will show you a tree like of the drives that your system sees, mounted and unmounted.
cat /proc/partitions will also show you what the kernel sees for devices.

Average 07-13-2015 11:53 PM

Quote:

Originally Posted by Aia (Post 5391079)
According to the snapshot you posted the drive is /dev/sdc and does not contain any filesystem. You cannot mount it without a filesystem on it.

lsblk will show you a tree like of the drives that your system sees, mounted and unmounted.
cat /proc/partitions will also show you what the kernel sees for devices.

Thank you! Please note that there are two "snapshots" of the same drive: one on my debian box ("vox") via SATA cable and another on my laptop attached via USB (external enclosure). The drive automounts on my laptop.

Here is the output on the "vox" (Debian 8.1 box):

Code:

root@vox:# lsblk
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk
sda1  8:1    0 931.5G  0 part
sdb      8:16  0 232.9G  0 disk
sdb1  8:17  0 225.6G  0 part /
sdb5  8:21  0  7.4G  0 part [SWAP]
sdc      8:32  0  1.8T  0 disk

Code:

root@vox:# cat /proc/partitions
major minor  #blocks  name

  8      16  244198584 sdb
  8      17  236495872 sdb1
  8      21    7700480 sdb5
  8        0  976762584 sda
  8        1  976759808 sda1
  8      32 1953514584 sdc


here is the output of the same commands on the laptop:

Code:

root@laptop:# lsblk
sdb                                  8:16  0  1.8T  0 disk 
sdb1                                8:17  0  128M  0 part 
sdb2                                8:18  0  1.8T  0 part  /media/2tb_temp

Code:

root@laptop:# cat /proc/partitions
  8      16 1953514584 sdb
  8      17    131072 sdb1
  8      18 1953382400 sdb2


Aia 07-14-2015 12:02 AM

Quote:

Originally Posted by Average (Post 5391081)
Thank you! Please note that there are two "snapshots" of the same drive: one on my debian box ("vox") via SATA cable and another on my laptop attached via USB (external enclosure). The drive automounts on my laptop.

Here is the output on the "vox" (Debian 8.1 box):

Code:

root@vox:/dev# lsblk
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk
sda1  8:1    0 931.5G  0 part
sdb      8:16  0 232.9G  0 disk
sdb1  8:17  0 225.6G  0 part /
sdb5  8:21  0  7.4G  0 part [SWAP]
sdc      8:32  0  1.8T  0 disk

Code:

root@vox:/dev# cat /proc/partitions
major minor  #blocks  name

  8      16  244198584 sdb
  8      17  236495872 sdb1
  8      21    7700480 sdb5
  8        0  976762584 sda
  8        1  976759808 sda1
  8      32 1953514584 sdc


Notice the red.
Your system is not seeing any partitions on that drive. As far as it is concerned, it does not have a partition.

Average 07-14-2015 12:11 AM

Quote:

Originally Posted by Average (Post 5391067)
Thanks suicidaleggroll!

"ls" shows only sdc! Mystery is starting to unravel!

I tried "partprobe /dev/sdc" and then "ls" and it is still the same.

Also please note how simply the drive mounts on my laptop...

I'm just flored at the mystery.


As you see here, it was already established above that the partitions arent recognized. Now how to fix this issue?

Aia 07-14-2015 12:15 AM

Quote:

Originally Posted by Average (Post 5391086)
As you see here, it was already established above that the partitions arent recognized. Now how to fix this issue?

I'll say that since the issue appears to be due to how you are connecting the device differently. Connect it via USB and not SATA.

Average 07-14-2015 12:20 AM

Quote:

Originally Posted by Aia (Post 5391088)
I'll say that since the issue appears to be due to how you are connecting the device differently. Connect it via USB and not SATA.


Brilliant suggestion! I assume you can tell me how to get SATA speeds with USB 2.0? :scratch:
(The original goal, as stated, is to increase the transfer speed from USB 2.0 speeds to SATA speeds.)

syg00 07-14-2015 12:25 AM

What distro (version) are you running on the laptop (is it older) ?.
Has the problem disk been used on Win10 ?.

Average 07-14-2015 12:32 AM

Quote:

Originally Posted by syg00 (Post 5391092)
What distro (version) are you running on the laptop (is it older) ?.
Has the problem disk been used on Win10 ?.

I'm junning Debian 7 on the laptop. The drive has never touched a Windows 10 box.


Also I wanted to confirm that the drive in question automounts on "vox" via external USB enclosure (just as it automounts on the laptop).

This issue specifically arrises when the drive is connected in "vox" via SATA cable.

syg00 07-14-2015 12:43 AM

The reason I asked is that Win10 (preview) appears to mangle gpt disks - it force mounts as MBR but leaves (and ignores) the gpt header (might only occur on re-install).
Confuses the hell out of the Linux tools.
Not sure if Win8{.1} does likewise as I never allowed it in the house.

Older versions of the Linux tools may not be so particular about the gpt header.

Average 07-14-2015 12:49 AM

Thanks syg00! I figured Windows 10 did something weird to the MBR.

Aia 07-14-2015 01:34 AM

Quote:

Originally Posted by Average (Post 5391090)
Brilliant suggestion! I assume you can tell me how to get SATA speeds with USB 2.0? :scratch:
(The original goal, as stated, is to increase the transfer speed from USB 2.0 speeds to SATA speeds.)

I was trying to tell you gracefully that your plans to use a SATA interface on it would not work. Not if you care about your data.

Average 07-14-2015 07:36 AM

Quote:

Originally Posted by Aia (Post 5391109)
I was trying to tell you gracefully that your plans to use a SATA interface on it would not work. Not if you care about your data.

Thanks! But that's not the linux way :)


All times are GMT -5. The time now is 12:31 AM.