JPICentral
Posts: 53
Joined: Wed Jul 18, 2018 3:22 am
Location: Next to the Mojave Desert at 100+ Degree Fahrenheit

Volume is dirty (External HDD - NTFS)

Sat Jul 20, 2019 7:10 am

I found 57 mentions, in one form or another, for "volume is dirty" in the Raspberry forums. None seemed to provide an answer for what is happening; so, ...
dmesg contained:
[ 4813.607739] sda: sda1
[ 4813.609700] sd 0:0:0:0: [sda] Attached SCSI disk
[ 4814.429416] ntfs: volume version 3.1.
[ 4814.429430] ntfs: (device sda1): load_system_files(): Volume is dirty. Mounting read-only. Run chkdsk and mount in Windows.

I am on Buster.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.19.50-v7+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #896 SMP Thu Jun 20 16:11:44 BST 2019
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Rev 1.2

I have been having a dickens of a time using this drive; after one day and an update and probably multiple things happening that I did not observe, I learned that the drive would mount just Read-Only on a RaspberryPi {0|B|B+}. The drive is 1tb NTFS and works fine connected to a Win10 USB port (USB 1|2|3) and will do both read and write.

I have been using my mobile to browse to learn what I can about a Dirty Volume while I have a Win10 device running chkdsk v: /scan /perf /R /F /X (please do not mind the redundant options as they are not a part of the issue or fix). I have some two hours (according to the count-down timer) before I learn if chkdsk fixed the problem (as suggested by information in the dmesg entry and elsewhere on the internet).

On a Win10 device, I did run fsutil dirty query v: on the HDD device in question and other devices and got expected results: dirty on the device in question and NOT dirty on the other devices.

I would appreciate thoughts on the RaspberryPi, "Volume is dirty;" and, "Why the device mounts on the Raspberry r/o while on a W10 it mounts r/w?" I have attempted other suggestions from my browsing to include:

/media/pi $ mount -v | grep "^/" | awk '{print "\nPartition identifier: " $1 "\n Mountpoint: " $3}'

Then, I have been fiddling with this next step using various suggested ways with limited success for results so I have to write: Followed by something like this --
sudo mount -o rw,remount /dev/sda1 /media/pi/myDrive

Bottom line is that none of the suggested solutions I located worked as I attempted to faithfully implement them, including chown and chmod to make the HDD device read/write again on my various Pi's.

Hence my inquiry to learn if there is someone who could speak to this, "volume is dirty," which the Pi does not seem to handle well at all -- as I see it from my limited understanding.

fruitoftheloom
Posts: 20150
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Volume is dirty (External HDD - NTFS)

Sat Jul 20, 2019 7:19 am

JPICentral wrote:
Sat Jul 20, 2019 7:10 am
I found 57 mentions, in one form or another, for "volume is dirty" in the Raspberry forums. None seemed to provide an answer for what is happening; so, ...
dmesg contained:
[ 4813.607739] sda: sda1
[ 4813.609700] sd 0:0:0:0: [sda] Attached SCSI disk
[ 4814.429416] ntfs: volume version 3.1.
[ 4814.429430] ntfs: (device sda1): load_system_files(): Volume is dirty. Mounting read-only. Run chkdsk and mount in Windows.

I am on Buster.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.19.50-v7+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #896 SMP Thu Jun 20 16:11:44 BST 2019
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Rev 1.2

I have been having a dickens of a time using this drive; after one day and an update and probably multiple things happening that I did not observe, I learned that the drive would mount just Read-Only on a RaspberryPi {0|B|B+}. The drive is 1tb NTFS and works fine connected to a Win10 USB port (USB 1|2|3) and will do both read and write.

I have been using my mobile to browse to learn what I can about a Dirty Volume while I have a Win10 device running chkdsk v: /scan /perf /R /F /X (please do not mind the redundant options as they are not a part of the issue or fix). I have some two hours (according to the count-down timer) before I learn if chkdsk fixed the problem (as suggested by information in the dmesg entry and elsewhere on the internet).

On a Win10 device, I did run fsutil dirty query v: on the HDD device in question and other devices and got expected results: dirty on the device in question and NOT dirty on the other devices.

I would appreciate thoughts on the RaspberryPi, "Volume is dirty;" and, "Why the device mounts on the Raspberry r/o while on a W10 it mounts r/w?" I have attempted other suggestions from my browsing to include:

/media/pi $ mount -v | grep "^/" | awk '{print "\nPartition identifier: " $1 "\n Mountpoint: " $3}'

Then, I have been fiddling with this next step using various suggested ways with limited success for results so I have to write: Followed by something like this --
sudo mount -o rw,remount /dev/sda1 /media/pi/myDrive

Bottom line is that none of the suggested solutions I located worked as I attempted to faithfully implement them, including chown and chmod to make the HDD device read/write again on my various Pi's.

Hence my inquiry to learn if there is someone who could speak to this, "volume is dirty," which the Pi does not seem to handle well at all -- as I see it from my limited understanding.

smartmontools is Linux Software which is available from the Raspbian Repositories, it gives an overview of the state of the hard drive:

https://www.smartmontools.org/
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

User avatar
rpdom
Posts: 14746
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Volume is dirty (External HDD - NTFS)

Sat Jul 20, 2019 7:29 am

To mount NTFS volums with r/w access you need to install the ntfs-3g package. The standard driver is less flexible (but faster) and only allows read access to NTFS.

User avatar
DougieLawson
Posts: 35542
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Volume is dirty (External HDD - NTFS)

Sat Jul 20, 2019 7:40 am

To clean a NTFS drive you should mount it in a Windows system and run the file system checking GUI (right click on the drive icon select the tools menu). There doesn't appear to be any viable NTFS fsck on Linux (and there's nothing in the Raspbian repo).
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

JPICentral
Posts: 53
Joined: Wed Jul 18, 2018 3:22 am
Location: Next to the Mojave Desert at 100+ Degree Fahrenheit

Re: Volume is dirty (External HDD - NTFS)

Sat Jul 20, 2019 5:21 pm

GOOD NEWS. Being rather patient for some several hours waiting for the Win 10 chkdsk process to finish I have a "ClEaN" volume.

NTFS is useful in that Tb size files can be stored; that being written, with tongue in cheek, "NTFS might just be a piece of work?" Anyhow. ... . I wrote that because the output from the chkdsk processing gave only shinning reporting that the drive, its tracks, sectors, security features, blah, blah, were just, "Peachy Keen!" Nothing was wrong. Sorta smacks of scandisk and the secrets of what it repairs that is never reported.

Win 10 CmdLn fsutil dirty query v: (where v: is the windows volume/disk with the problem) produced the answer I was hoping to get: "The device is NOT dirty!"

I plugged the HDD into the Pi's and confirmed that I can now write to it:

from mount and dmesg:

usb 1-1.3.2: Manufacturer: StoreJet Transcend
[ 202.002758] usb 1-1.3.2: SerialNumber: S318J9AF6xxxxx
[ 202.003696] usb-storage 1-1.3.2:1.0: USB Mass Storage device detected
[ 202.015446] scsi host0: usb-storage 1-1.3.2:1.0
[ 202.076835] usbcore: registered new interface driver uas
[ 203.102377] scsi 0:0:0:0: Direct-Access StoreJet Transcend 0 PQ: 0 ANSI: 6
[ 203.103610] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[ 203.104182] sd 0:0:0:0: [sda] Write Protect is off
[ 203.104207] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 203.106109] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 203.131004] sda: sda1
[ 203.134088] sd 0:0:0:0: [sda] Attached SCSI disk
[ 203.135771] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 204.095678] ntfs: driver 2.1.32 [Flags: R/W MODULE].
[ 204.159642] ntfs: volume version 3.1.


Whomever put that tidbit in the dmesg about the dirty volume; AND, more importantly, the suggested fix really needs a big gigantic, "Hug!" I wish I had looked some days ago at dmesg I could have saved myself a considerable amount of time searching for the, "Holy Grail of an answer that seems to escape being found along with the answer to -- Why is is called a Dirty Volume?"

I so have the burning desire to know the real and whole truth about this dirt! Maybe I will never know. I do have a way to fix it so for now I will be tentatively satisfied and get on with my bluetooth problem that got stymied while I attacked this issue.

Thank you for the kind responses. I will tuck them away in the event this procedure stops working (sic).

Life, how wonderful when stuff works!

User avatar
DougieLawson
Posts: 35542
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Volume is dirty (External HDD - NTFS)

Sat Jul 20, 2019 7:22 pm

Why not reformat as ext4, that supports peta (10^15) and exa (10^18) byte file sizes. (Which is larger than any single hard disk that's available.)
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

JPICentral
Posts: 53
Joined: Wed Jul 18, 2018 3:22 am
Location: Next to the Mojave Desert at 100+ Degree Fahrenheit

Re: Volume is dirty (External HDD - NTFS)

Sat Jul 20, 2019 8:04 pm

Though I do not know the source of, "Need arises to meet availability" I most certainly do not want to have that much crap hanging around. I have enough trouble dealing with Tb quantities and backing up and trying to find where it got stuffed and ... .

Should I have the need for such a ginormous glob, I have an answer (if do not forget ((grin)) ). Thanks. I am still ecstatic that there was a simple rather elegant solution though time consuming. In the hopefully unlikely event this situation should repeat itself and I need more space, ... well ... .

Appreciate. Now off the the mysterious land of Bluetooth and the offered challenges that should be so simple. Later!

JPICentral
Posts: 53
Joined: Wed Jul 18, 2018 3:22 am
Location: Next to the Mojave Desert at 100+ Degree Fahrenheit

Re: Volume is dirty (External HDD - NTFS)

Tue Aug 20, 2019 1:58 am

Sat Jul 20, 2019 12:29 am
To mount NTFS volum[e]s with r/w access you need to install the ntfs-3g package. The standard driver is less flexible (but faster) and only allows read access to NTFS.
This was an EXCELLENT bit of input. My "Thank You" is a bit late. It is very important that you know these few words made a BIG difference in my use of NTFS formatted drive-use on RPI and WIN10.

Thanks ...

Return to “Beginners”