Re: Modification Time of RBD Images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

YMMV, riddled with assumptions (image is image-format=2, has one ext4 filesystem, no partition table, ext4 superblock starts at 0x400 and probably a whole boatload of other stuff, I don't know when ext4 updates s_wtime of it's superblock, nor if it's actually the superblock last write or last write to filesystem, etc.).

rados -p rbd get $(rbd info $SOME_IMAGE_NAME | awk '/block_name_prefix/ { print $2 }').0000000000000000 - | dd if=/dev/stdin of=/dev/stdout skip=1072 bs=1 count=4 status=none | perl -lane 'print scalar localtime unpack "I*",  $_;'

Cheers,
KJ

On Fri, Mar 24, 2017 at 12:27 AM, Dongsheng Yang <dongsheng.yang@xxxxxxxxxxxx> wrote:
Hi jason,

    do you think this is a good feature for rbd?
maybe we can implement a "rbd stat" command
to show atime, mtime and ctime of an image.

Yang


On 03/23/2017 08:36 PM, Christoph Adomeit wrote:
Hi,

no i did not enable the journalling feature since we do not use mirroring.


On Thu, Mar 23, 2017 at 08:10:05PM +0800, Dongsheng Yang wrote:
Did you enable the journaling feature?

On 03/23/2017 07:44 PM, Christoph Adomeit wrote:
Hi Yang,

I mean "any write" to this image.

I am sure we have a lot of not-used-anymore rbd images in our pool and I am trying to identify them.

The mtime would be a good hint to show which images might be unused.

Christoph

On Thu, Mar 23, 2017 at 07:32:49PM +0800, Dongsheng Yang wrote:
Hi Christoph,

On 03/23/2017 07:16 PM, Christoph Adomeit wrote:
Hello List,

i am wondering if there is meanwhile an easy method in ceph to find more information about rbd-images.

For example I am interested in the modification time of an rbd image.
Do you mean some metadata changing? such as resize?

Or any write to this image?

Thanx
Yang
I found some posts from 2015 that say we have to go over all the objects of an rbd image and find the newest mtime put this is not a preferred solution for me. It takes to much time and too many system resources.

Any Ideas ?

Thanks
   Christoph


_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



--
Kjetil Joergensen <kjetil@xxxxxxxxxxxx>
SRE, Medallia Inc
Phone: +1 (650) 739-6580
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux