Re: CF Card wear optimalisation for ext4
Andreas Dilger <[email protected]> Thu, 16 Oct 2014 13:33:11 -0600
| Newsgroups | gmane.comp.file-systems.ext3.user |
|---|---|
| Message-ID | <[email protected]> |
--===============2945289586049959902== Content-Type: multipart/signed; boundary="Apple-Mail=_81E51631-E549-4FE6-A4B9-61805A4573E8"; protocol="application/pgp-signature"; micalg=pgp-sha1 --Apple-Mail=_81E51631-E549-4FE6-A4B9-61805A4573E8 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Oct 16, 2014, at 10:25 AM, Bodo Thiesen <[email protected]> wrote: > * Andreas Dilger <[email protected]> hat geschrieben: > >> You can see in the ext4 superblock the amount of data that has been >> written to a filesystem over its lifetime: >> >> Note that this number isn't wholly accurate, but rather a guideline. > > Is is more like a completely bogus value at best: > > # LANG=C df -h / | grep root > /dev/root 3.7T 3.6T 73G 99% / > # grep [0-9] /proc/partitions > 8 0 3907018584 sda > # tune2fs -l /dev/sda | grep Lifetime > Lifetime writes: 2503 GB > > 3.7 TB Disk/Partition, 3.6 TB space in use but only 2.4 TB writes. > > No, there are no 1.2 TB + x allocated but never written to clusters on > that file system. > > And if /sys/fs/ext4/*/*_write_kbytes are as correct as the "Lifetime > writes" value, than the correct answer to Jelle's question is: "There is > no way currently to figure out the actual number of writes to a device". The "lifetime writes" value has not been around forever, so if the filesystem was originally created and populated on an older kernel (e.g. using ext3) it would not contain a record of those writes. There is also some potential loss if the filesystem isn't unmounted cleanly. It definitely _can_ be used to monitor the writes to a particular filesystem over the past 24h, which is what the original poster was asking about. Cheers, Andreas --Apple-Mail=_81E51631-E549-4FE6-A4B9-61805A4573E8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIVAwUBVEAdd3Kl2rkXzB/gAQItIQ/+L+mpIOWlbFAAXH9Zmy7aIghP+7RjhkmP 5fEFGA+FTi3C+x42v0a4B2qR0RA+cdrU61rcpynPN2huJFbGIo42JQfTKDaEX4Dj GE5v4Z/dJi2wVhLGr538BcKeYPVpy8e4678LToXZZPHBl1CJATYh5GZE8PyzMx1n jtWVP1QVpibV43p067yNj+6n0Un6kKp6NnLT979+Fi48yU023SGyXzz+BLq/vk4f aGBvw58JA3BboXswIabWLJV/Oo6nCdtSTz2aRyRuI/1dPM4Qo2BYjDf7LmjYOv2u qimAQgPgBC/dye8uUqecKWSoIllRW36o05v/zyyHjNCJ4S7ha+Or7nS0Q4juXW/J T5IDbPUbzDK9KONSJLnpI0ah4XBtLn3dR8Ug2ChgyckrQzQDoublE1L4Xp2ND7of DZ2rKy5bF1SGZn19VqjgWkdtmF3M+d4fM/JoS6x8yicqhro/IA21ki0lvFXH0GT8 DyhyGNZr6n6iCazkFB40Mhn9bSgsR+qgMKvl+9qKUCV1qiTXr7wuQ/DpNETn8ln3 IVnZifRk+e7MLBjfK8uYdAPTvU6ePFq1yOKXMa+xU2vvzo+Qqoe9wWklVLBC9+cx i9dUWNqIR9p3NIt2PTuHI0UeeVNZy3GILguTtNSXwxSleArHFepQinXdX5us4WD5 dT6uErCUYfA= =XOMv -----END PGP SIGNATURE----- --Apple-Mail=_81E51631-E549-4FE6-A4B9-61805A4573E8-- --===============2945289586049959902== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ext3-users mailing list [email protected] https://www.redhat.com/mailman/listinfo/ext3-users --===============2945289586049959902==--