Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Partition\Device not mountable
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 158

PostPosted: Sun Oct 29, 2017 6:18 pm    Post subject: Partition\Device not mountable Reply with quote

Hi,

i have a few HDD's and an SSD in my machine and after an unexpected restart one of them started having an issue in Gentoo.

I have no idea how to resolve it at this point, here are the details\example:

Code:

admin@pc ~ $ sudo fdisk -l

Disk /dev/sdc: 2.7 TiB, 3000592982016 bytes, 5860533168 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

Device      Start        End    Sectors  Size Type
/dev/sdc1  264192 5860532223 5860268032  2.7T Microsoft basic data

admin@pc ~ $ sudo mount /dev/sdc1 /mnt/backup/
mount: special device /dev/sdc1 does not exist

Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43186
Location: 56N 3W

PostPosted: Sun Oct 29, 2017 7:08 pm    Post subject: Reply with quote

Troopo,

That start sector looks a bit odd but its not illegal.

I'll guess the filesystem is ntfs and you ant ts mount it read/write, so you will be using FUSE and ntfs-3g

Add
Code:
 -t ntfs-3g -o ro
to your mount command. The -o ro is just a precaution.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 158

PostPosted: Sun Oct 29, 2017 8:26 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Troopo,

That start sector looks a bit odd but its not illegal.

I'll guess the filesystem is ntfs and you ant ts mount it read/write, so you will be using FUSE and ntfs-3g

Add
Code:
 -t ntfs-3g -o ro
to your mount command. The -o ro is just a precaution.


Thanks, yes correct however i think the problem is different, first here is the output of your addition:

Code:

ntfs-3g: Failed to access volume '/dev/sdc1': No such file or directory


I think the problem is that sdc1 is not there, i checked /dev/ it only has sdc no sdc1, could it be related to data loss or corrupted data? (as i said it was an unexpected restart)

BTW just to mention that in windows it's all there...

UPDATE:
I've tried recompiling ntfs-3g and the kernel it didn't help but was worth a try
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 340
Location: Stockholm

PostPosted: Mon Oct 30, 2017 7:24 am    Post subject: Reply with quote

"BTW just to mention that in windows it's all there..."

Why not run "check file system" from Windows and see what happens...
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Mon Oct 30, 2017 10:10 am    Post subject: Reply with quote

https://en.wikipedia.org/wiki/Microsoft_basic_data_partition wrote:
a basic data partition (BDP) is any partition identified with Globally Unique Identifier (GUID) of EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

https://en.wikipedia.org/wiki/Microsoft_basic_data_partition wrote:
When a Microsoft operating system converts a GPT-partitioned basic disk to a dynamic disk, all BDPs are combined and converted to a single Logical Disk Manager data partition identified with GUID AF9B60A0-1431-4F62-BC68-3311714A69AD

What this mean is that if GUID is EBD... you have a BDP, if GUID is AF9... you have a dynamic one

And (in my kernel, might be support in yours)
.config wrote:
CONFIG_LDM_PARTITION:
Note this driver only supports Dynamic Disks with a protective MBR
label, i.e. DOS partition table. It does not support GPT labelled
Dynamic Disks yet as can be created with Vista.

Got it? If your GUID is GBD... fine, if it's AF9... you will have no support, explaining why the disk is detect but sdc? is not create.

And because EBD are GPT only, you need to stop using fdisk with your disk and use gdisk (explaining also your strange starting sector that must be a trick to protect GPT infos from misuse of MBR only programs.
Try gdisk -l /dev/sdc and see if you can grab its GUID, if it's AF9 you have your answer.
And if not, well, at least you made me discover this BDP ;)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43186
Location: 56N 3W

PostPosted: Mon Oct 30, 2017 10:27 am    Post subject: Reply with quote

Troopo,

Don't run fsck unless you have an image ot the drive or some other backup.
All fsck utilities work by making assumptions in the face of missing or conflicting data. When they guess incorrectly, they make a bad situation worse.

As it works in windows, the filesystem is OK.

knowing the start of the partition
Code:
Device      Start        End    Sectors  Size Type
/dev/sdc1  264192 5860532223 5860268032  2.7T Microsoft basic data

Its possible to mount it without the partition table.

Convert 264192 sectors to bytes and use -o offset=<bytes> /dev/sdc /mnt/someplace. Offset is the number of bytes from the start of the drive to the start ot the filesystem.

What does
Code:
fdisk -t dos -l /dev/sdc
show?
This is the protective msdos partition table. Do not edit this but looking is safe.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 158

PostPosted: Thu Nov 02, 2017 3:08 am    Post subject: Reply with quote

Hi,

Sorry for not updating.

This is the print out for gdisk -l /dev/sdc

Code:

GPT fdisk (gdisk) version 1.0.1

Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk /dev/sdc: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): B1574000-6DAA-8B46-BECA-2A1C26A57E0E
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 265069 sectors (129.4 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1          264192      5860532223   2.7 TiB     0700 



Not sure what it means EBD BDP wise tho


Here is the print for the partition table fdisk -t dos -l /dev/sdc

Code:

Disk /dev/sdc: 2.7 TiB, 3000592982016 bytes, 5860533168 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: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors Size Id Type
/dev/sdc1           1 4294967295 4294967295   2T ee GPT

Partition 1 does not start on physical sector boundary.



I think the problem is not clear maybe but how do i fix it ? :)
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Fri Nov 03, 2017 2:26 am    Post subject: Reply with quote

Troopo wrote:
I think the problem is not clear maybe but how do i fix it ? :)

What i'm sure, is that it report you have GPT damage, what i'm less sure is how to fix that.
What i would do if i were you, is look in Windows if it have some correction or fixing program and check the disk with it, because at least, Windows is handling it right, so its tool should too.
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 158

PostPosted: Fri Nov 03, 2017 1:44 pm    Post subject: Reply with quote

krinn wrote:
Troopo wrote:
I think the problem is not clear maybe but how do i fix it ? :)

What i'm sure, is that it report you have GPT damage, what i'm less sure is how to fix that.
What i would do if i were you, is look in Windows if it have some correction or fixing program and check the disk with it, because at least, Windows is handling it right, so its tool should too.


Thanks but what i'm afraid of is what NeddySeagoon mentioned, i've had similar experiences with windows and HDD to know it's not a good idea.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43186
Location: 56N 3W

PostPosted: Fri Nov 03, 2017 7:00 pm    Post subject: Reply with quote

Troopo,

Your MSDOS partition table is correct for a GPT formatted disk.

That your GPT is damaged is bad news. There are two copies of a GPT on the volume. Damaged means that they are different.
The main GPT is at the stari of the volume, the backup at the end.

Any of the partitioning tools should offer to fix the damage by copying the backup copy over the main copy.
That much is safe as no user data will be harmed.

The problem arises when damage is not confined to the partition table and extends into the filesystem itself.

You say that it works in Windows?
Windows probably (silently) ignores the damaged copy of the partition table.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 158

PostPosted: Sat Nov 04, 2017 6:48 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Troopo,

Your MSDOS partition table is correct for a GPT formatted disk.

That your GPT is damaged is bad news. There are two copies of a GPT on the volume. Damaged means that they are different.
The main GPT is at the stari of the volume, the backup at the end.

Any of the partitioning tools should offer to fix the damage by copying the backup copy over the main copy.
That much is safe as no user data will be harmed.

The problem arises when damage is not confined to the partition table and extends into the filesystem itself.

You say that it works in Windows?
Windows probably (silently) ignores the damaged copy of the partition table.


Thanks!
So which tool would you say is the safest one to try since i really can't replace all the data on that disk..
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43186
Location: 56N 3W

PostPosted: Sat Nov 04, 2017 8:01 pm    Post subject: Reply with quote

Troopo,

It something I rarely need to do, so I don't have any data to make a recommendation.
Since it works in windows, make a backup before you try any.
Then you have a backup in case it all goes wrong.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum