You are not logged in.

#1 2018-02-14 23:49:30

mkheaven
Member
Registered: 2018-01-17
Posts: 15

[SOLVED] Can't mount some NTFS drives

Hello everybody!

Recently I switched from Windows, solved many problems in the process (including some non-trivial, which I don't know where to post about) and got some feeling of the system, but now I'm stuck.
Some HDDs are left NTFS-formatted and some of them are not mounting. Other NTFS-formatted HDDs and USB sticks are mounting fine.
I have ntfs-3g working with thunar+gvfs+udiskie+lxpolkit.
Problems are different, so I guess they're for different posts(right?). Here comes first (2Tb drive):

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0   7,3T  0 disk 
└─sda1        8:1    0   7,3T  0 part 
sdb           8:16   0   1,8T  0 disk 
├─sdb1        8:17   0     1K  0 part 
└─sdb5        8:21   0   1,8T  0 part 
nvme0n1     259:0    0 447,1G  0 disk 
├─nvme0n1p1 259:1    0     1G  0 part /boot
├─nvme0n1p2 259:2    0    33G  0 part [SWAP]
├─nvme0n1p3 259:3    0    50G  0 part /
└─nvme0n1p4 259:4    0 363,1G  0 part /home
$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 1,8 TiB, 2000398934016 bytes, 3907029168 sector
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 байт / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x647b1a45

Device        Start       End   Sectors  Size Type
/dev/sdb1               16065 3907024064 3907008000   1,8T             f W95 EXT'd. (LBA)
/dev/sdb5               16128 3907024064 3907007937   1,8T             7 HPFS/NTFS/exFAT
$ sudo mount /dev/sdb5 /mnt/removable
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
$MFTMirr does not match $MFT (record 16).
Failed to mount '/dev/sdb5': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.

It is not from any RAID and works perfect with windows.
I followed and ran chkdsk /f, connected to my notebook with windows 7 with usb-adapter. No errors found.
Frankly I'm not sure how "reboot into windows twice" part was completed, because it's not a bootable drive and it seems that usb-adapter has some issues too (it got no poweroff button, so I just have to unplug the power cable after disabling in windows and unplugging usb. At this moment it is still spinning, so it causes "power lost" error in SMART every time), but that never affected anything as far as I can tell.

So now I'm left with:
- Not mounting 2Tb NTFS drive with important data
- Mounting 8Tb ext4 drive (I prefer to leave ext4)
- Main PC with Arch and Win7 guest in VirtualBox
- Notebook with Win7 and probably a bit risky usb-to-sata
- I also use this notebook every day for work so I can't just let it stay online for about 30 hours anymore (that's about the time chkdsk /f took)

I researched this and only got these variants of further actions:
- Try ntfs-fix [risky]
- Mount it inside Win7 VM... and then I'm not sure what to do [risky too]
- Make a full copy and then try risky variants [not a solution]

Do you know any better ways in 2018?

Last edited by mkheaven (2018-02-19 08:33:03)

Offline

#2 2018-02-15 14:27:36

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] Can't mount some NTFS drives

Do you need to keep that disk formatted as ntfs or do you only want to copy the data out?

Regarding the reboot twice advice I guess you can reboot your machine with the disk connected over usb, even if it isn't the boot disk. Regarding fixing the filesystem, I would only use windows tools, specially because you say the data is important.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2018-02-15 18:24:40

mkheaven
Member
Registered: 2018-01-17
Posts: 15

Re: [SOLVED] Can't mount some NTFS drives

R00KIE wrote:

Do you need to keep that disk formatted as ntfs or do you only want to copy the data out?

Regarding the reboot twice advice I guess you can reboot your machine with the disk connected over usb, even if it isn't the boot disk. Regarding fixing the filesystem, I would only use windows tools, specially because you say the data is important.

Thanks for your reply!

I only need to keep the data, will format every drive as ext4 in some time. (Btw, is there any way to write to ext4 from win7 (being sure this will not corrupt anything) in 2018?)

I guess this is exactly what I did (rebooted while connected to usb), but I'll try that part again just in case.

I get your point, but don't know how to follow... seems I can't just connect both drives at the same time and copy what I need, can I? (can I even do that with both drives connected to Win7 VM?)

Last edited by mkheaven (2018-02-15 18:25:13)

Offline

#4 2018-02-15 21:47:03

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] Can't mount some NTFS drives

One thing at a time, since what you want is keep the data you have at least a couple of options. I would not recommend trying to write to ext4 from windows, just like I wouldn't recommend playing too much with ntfs on linux.

You seem to have two different computers, one of them running windows directly, which allows you to read the data on the disk. Both solutions I can think of right now involve copying the data over the network, think windows file sharing together with cifs mount on linux.

Solution 1: You could connect your laptop to the main pc and copy everything over the network, it might not be very fast but it's probably the solution that takes less effort and maybe less change of having difficulty in setting it up.

Solution 2: You could mount the disk in the virtual machine so win7 can read it again copy the data over the network, the only difference is that it's all done in the same machine, this solution might require a bit more work though.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2018-02-15 22:56:29

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: [SOLVED] Can't mount some NTFS drives

Why are there two partitions covering the exact same sectors and using a weird partition offset?
At least it doesn't look like as if this was an extended DOS partition (and since sdb has only one partition, that'd not be required either)

Can you mount sdb1 as vfat?

Offline

#6 2018-02-16 09:29:15

mkheaven
Member
Registered: 2018-01-17
Posts: 15

Re: [SOLVED] Can't mount some NTFS drives

R00KIE wrote:

One thing at a time, since what you want is keep the data you have at least a couple of options. I would not recommend trying to write to ext4 from windows, just like I wouldn't recommend playing too much with ntfs on linux.

You seem to have two different computers, one of them running windows directly, which allows you to read the data on the disk. Both solutions I can think of right now involve copying the data over the network, think windows file sharing together with cifs mount on linux.

Solution 1: You could connect your laptop to the main pc and copy everything over the network, it might not be very fast but it's probably the solution that takes less effort and maybe less change of having difficulty in setting it up.

Solution 2: You could mount the disk in the virtual machine so win7 can read it again copy the data over the network, the only difference is that it's all done in the same machine, this solution might require a bit more work though.

Thanks, didn't think about the network. I've just checked that 1st solution and it indeed works... kind of. I just need to wait a couple of weeks for it to complete. Probably too bad network.

But this really can help, so for future generations:
1. Connect to 1 gigabit LAN, if you have any deadlines
2. On Windows machine you right-click any folder -> properties -> sharing -> share for your local user, I assume you call it "share"
3. You need to know your local IP, get it in Windows with Start -> run -> cmd -> type in

ipconfig

4. Then on Arch:

mkdir /mnt/winshare
mount -t winshare //192.168.1.30/share /mnt/cifs -o username=yourwindowsusername,password=yourwindowsuserpassword

5. Now you can copy, for me the speed goes around 600Kb-1.1Mb/s, so it would copy my 2Tb just in about... 15 - 36 days, wow. Wish you better luck!


I guess the 2nd solution must work much faster, but is it safe to moint this way? (heard the opposite but that might have been about writing, not sure)

Offline

#7 2018-02-16 09:40:32

mkheaven
Member
Registered: 2018-01-17
Posts: 15

Re: [SOLVED] Can't mount some NTFS drives

seth wrote:

Why are there two partitions covering the exact same sectors and using a weird partition offset?
At least it doesn't look like as if this was an extended DOS partition (and since sdb has only one partition, that'd not be required either)

Can you mount sdb1 as vfat?

Not sure. I guess I was using just inbuilt windows tools when creating it, but can't remember. Might have been Acronis. I didn't mess with standart offsets for sure.

No, I can't:

$ sudo mount -t vfat /dev/sdb1 /mnt/removable
mount: /mnt/removable: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.

Same for sdb5

Offline

#8 2018-02-16 10:19:14

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] Can't mount some NTFS drives

@mkheaven
You may have to tune some mount parameters to get better speed and you can connect the machines directly, that should take any speed limitations imposed by other network equipment out of the way.
Regarding mounting it on win7 it should be safe, it is windows. In theory the copy should be faster but you will still be dealing with copying it over a network and using SMB to do it so you might hit the same speed limitation you are seeing now.

There is another option that should be safe, you could try to use testdisk and see if it recognizes the filesystem and is able to "see" the files inside, if it does you should be able to copy everything without having to involve windows or the network in the process.

@seth
I suppose the disk layout looks like that because the "outer" partition (sdb1) is an extended (primary) partition and the "inner" partition (sdb5) is a logic partition. Even the numbering fits, note that there is sdb1 and sdb5, which is typical of a setup with an extended partition. As to why it ended up like that your guess is as good as mine.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#9 2018-02-16 10:51:07

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: [SOLVED] Can't mount some NTFS drives

This is in particular what looks suspicious to me.
fdisk should list it as "Extended" then - "f" is an actual FAT partition type. I was imagining some sort of weirdo hybrid partition that can be accessed as ntfs AND vfat (but I don't know about such configs at all)

Leaving that aside: an extended partition with just one partition inside makes no sense ;-)

Offline

#10 2018-02-16 20:38:08

mkheaven
Member
Registered: 2018-01-17
Posts: 15

Re: [SOLVED] Can't mount some NTFS drives

R00KIE wrote:

@mkheaven
You may have to tune some mount parameters to get better speed and you can connect the machines directly, that should take any speed limitations imposed by other network equipment out of the way.
Regarding mounting it on win7 it should be safe, it is windows. In theory the copy should be faster but you will still be dealing with copying it over a network and using SMB to do it so you might hit the same speed limitation you are seeing now.

There is another option that should be safe, you could try to use testdisk and see if it recognizes the filesystem and is able to "see" the files inside, if it does you should be able to copy everything without having to involve windows or the network in the process.

testdisk seem to work! Thank you so much, you saved me weeks!

It's copying right now, atm 235k files copied ok and 1 failed somehow. I guess I'll be able to find out what exactly failed from testdisk logs.

Now the average speed is probably about 60M/s (from what I see with iotop), huge difference)

Will conclude and mark solved when finished.

Offline

#11 2018-02-19 08:31:53

mkheaven
Member
Registered: 2018-01-17
Posts: 15

Re: [SOLVED] Can't mount some NTFS drives

So it's finished and I've got almost everything copied but around 300 errors in ~/testdisk.log

They are partly "fileERROR: Couldn't read file" and "ERROR: Couldn't set the file's date and time" and I have no clue why these happened. Will double-check for consistency.
Partly they are "Can't create file %path%: too long name". I've found a solution for that involving symbolic links, but can't make it with testdisk, so I guess I'll have to use windows for that.

Offline

Board footer

Powered by FluxBB