# Repair NTFS dirty disks

If you have a damage NTFS disk you can try to repair it.

A possible error when you are mounting the disk: **nvme1n1p1: volume is dirty and "force" flag is not set!**

```
sudo journalctl -f

abr 11 14:31:54 gr4n4d3 kernel: ntfs3: nvme1n1p1: It is recommened to use chkdsk.
abr 11 14:31:54 gr4n4d3 kernel: ntfs3: nvme1n1p1: volume is dirty and "force" flag is not set!
abr 11 14:31:54 gr4n4d3 udisksd[4387]: $MFTMirr does not match $MFT (record 3).
abr 11 14:31:54 gr4n4d3 udisksd[4387]: Failed to mount '/dev/nvme1n1p1': Input/output error
abr 11 14:31:54 gr4n4d3 udisksd[4387]: NTFS is either inconsistent, or there is a hardware fault, or it's a
abr 11 14:31:54 gr4n4d3 udisksd[4387]: SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
abr 11 14:31:54 gr4n4d3 udisksd[4387]: then reboot into Windows twice. The usage of the /f parameter is very
abr 11 14:31:54 gr4n4d3 udisksd[4387]: important! If the device is a SoftRAID/FakeRAID then first activate
abr 11 14:31:54 gr4n4d3 udisksd[4387]: it and mount a different device under the /dev/mapper/ directory, (e.g.
abr 11 14:31:54 gr4n4d3 udisksd[4387]: /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
abr 11 14:31:54 gr4n4d3 udisksd[4387]: for more details.
abr 11 14:31:54 gr4n4d3 gnome-shell[1876]: JS ERROR: Mount and launch mountable-volume:72BCBC4A3D9DDC2E: Error: Expected type string for argument 'details' but got type GLib_Error
                                           _notifyActionError@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/locations.js:484:20
                                           launchAction@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/locations.js:538:22
                                           async*mountAndLaunch@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/locations.js:470:24
                                           vfunc_launch@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/locations.js:436:14
                                           makeLocationApp/<@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/locations.js:930:26
                                           _create/object[name]@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/utils.js:296:68
                                           wrapWindowsBackedApp/<@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/locations.js:879:26
                                           _create/object[name]@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/utils.js:296:68
                                           wrapWindowsBackedApp/<@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/locations.js:892:34
                                           _create/object[name]@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/utils.js:296:68
                                           launchNewWindow@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/appIcons.js:677:26
                                           activate@/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/appIcons.js:615:18
                                           vfunc_clicked@resource:///org/gnome/shell/ui/appDisplay.js:3171:14

```

To fix it you can try the following command:

```
sudo ntfsfix /dev/nvme1n1p1
```

```
Mounting volume... $MFTMirr does not match $MFT (record 3).
FAILED
Attempting to correct errors... 
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... FAILED
Correcting differences in $MFTMirr record 3...OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/nvme1n1p1 was processed successfully.

```

Done :sunglasses:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.seguranca-informatica.pt/arm/basic-tips/repair-ntfs-dirty-disks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
