Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-02-27 00:16:54

tuxolero
Member
Registered: 2013-02-10
Posts: 60

What (and why) is written to an SD card even when it is not mounted ?

A few days ago, I created a backup of my Raspberry Pi SD card using dd:

dd bs=4M if=/dev/sdh of=raspberrypi_2015-02-18.img

The card contains two partitions, /boot (vfat) and / (ext4). I have disabled automounting in my XFCE settings. And indeed, the partition icons pop up in the "not mounted" state when I insert the card.

Because I always verify my backups, I dd'ed the SD card again on the next day. When I compared the images, they differed. In between, I did not use the card, neiter in the Pi nor in the PC.

Being confused by this result, I did some more testing:

Test 1:
- insert the SD card, dd, remove it
- do lots of I/O on the harddisk to kick out the card's contents from the buffer cache
- insert the SD card, dd, remove it
- compare the images -> different

Test 2:
- do lots of I/O on the harddisk ...

- insert the SD card, dd, keep it inserted
- do lots of I/O on the harddisk ...
- dd, remove it
- compare the images -> identical

Test 3:
- activate the write-protection on the SD card
- do lots of I/O on the harddisk ...

- insert the SD card, dd, remove it
- do lots of I/O on the harddisk ...
- insert the SD card, dd, remove it
- compare the images -> identical

Because the images are identical when not removing the SD card or when write protection is active, it looks like something is written to the SD card when it is inserted, even when it is not mounted.

Without XFCE running, I can insert / remove / re-insert the SD card without write protection (like in Test 1), and the images are identical. This means that XFCE (or one of it's background services) is the culprit.

So: what (and why) is written to the sd card ?

Yo might call me nitpicking, but I really think that no media at all should ever be written to until it's being mounted.

Thanks and Regards,
Tuxolero

Offline

Board footer

Powered by FluxBB