[SFS] When was this server "born"?

Mike Shoup mike@shouptech.com
Wed, 5 Aug 2015 14:38:24 -0600


--20cf307cfd3c5db49e051c966265
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Near as I can tell, XFS doesn't store that information:

~
[mike@voyager]$ sudo xfs_info /
meta-data=3D/dev/mapper/centos_voyager-root isize=3D256    agcount=3D4,
agsize=3D1147392 blks
         =3D                       sectsz=3D512   attr=3D2, projid32bit=3D1
         =3D                       crc=3D0        finobt=3D0
data     =3D                       bsize=3D4096   blocks=3D4589568, imaxpct=
=3D25
         =3D                       sunit=3D0      swidth=3D0 blks
naming   =3Dversion 2              bsize=3D4096   ascii-ci=3D0 ftype=3D0
log      =3Dinternal               bsize=3D4096   blocks=3D2560, version=3D=
2
         =3D                       sectsz=3D512   sunit=3D0 blks, lazy-coun=
t=3D1
realtime =3Dnone                   extsz=3D4096   blocks=3D0, rtextents=3D0


___


You could probably look at the ctime of a unique file for each machine,
that gets created at install time. What about the host's SSH key? I don't
think most places change those very often.

~
[mike@voyager]$ stat /etc/ssh/ssh_host_rsa_key
  File: =E2=80=98/etc/ssh/ssh_host_rsa_key=E2=80=99
  Size: 1675          Blocks: 8          IO Block: 4096   regular file
Device: fd00h/64768d    Inode: 416880      Links: 1
Access: (0640/-rw-r-----)  Uid: (    0/    root)   Gid: (  999/ssh_keys)
Access: 2015-08-05 12:48:27.021065883 -0600
Modify: 2015-04-26 20:05:46.378871265 -0600
Change: 2015-04-26 20:05:46.457871265 -0600
 Birth: -


--
Mike


On Wed, Aug 5, 2015 at 2:13 PM, David L. Willson <dlwillson@sofree.us>
wrote:

> BCC: LPIC-1 Study Group
>
> "Born On Date"
>
> Sometimes it's useful to know when this server was "born", when it was
> built. Usually, you also want to know who built it, so you know who to
> question or kick, but that's a topic for another day.
>
> The root filesystem was usually created on the same day, so that is the
> date I use. To get that date, if your root filesystem is ext2/3/4, run
> dumpe2fs and look for 'created'.
>
> Here's an example:
>
> [dwills003c@wdv-logecoll nagios]$ sudo df -hT /
> Filesystem    Type    Size  Used Avail Use% Mounted on
> /dev/sdi6     ext3     70G   32G   35G  48% /
> [dwills003c@wdv-logecoll nagios]$ sudo /sbin/dumpe2fs /dev/sdi6 | grep
> -iC 3 created
> dumpe2fs 1.39 (29-May-2006)
> Fragments per group:      32768
> Inodes per group:         32736
> Inode blocks per group:   1023
> Filesystem created:       Tue Jan 25 06:44:25 2011
> Last mount time:          Fri Jul 31 09:02:54 2015
> Last write time:          Fri Jul 31 09:02:54 2015
> Mount count:              10
>
> Now, Fedora Server 22 and Enterprise Linux 7 have moved to xfs. How do yo=
u
> get the same information from it? I don't know... yet.
> _______________________________________________
> SFS mailing list
> SFS@thegeek.nu
> http://mailman.thegeek.nu/mailman/listinfo/sfs
>

--20cf307cfd3c5db49e051c966265
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Near as I can tell, XFS doesn&#39;t store that inform=
ation:<br><br>~<br>[mike@voyager]$ sudo xfs_info /<br>meta-data=3D/dev/mapp=
er/centos_voyager-root isize=3D256=C2=A0=C2=A0=C2=A0 agcount=3D4, agsize=3D=
1147392 blks<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sectsz=3D512=C2=A0=C2=
=A0 attr=3D2, projid32bit=3D1<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 =3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=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sectsz=3D512=C2=A0=C2=A0 sunit=3D0 blks, lazy-count=
=3D1<br>realtime =3Dnone=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 extsz=3D4096=C2=
=A0=C2=A0 blocks=3D0, rtextents=3D0<br><br><br>___<br><br><br></div><div>Yo=
u could probably look at the ctime of a unique file for each machine, that =
gets created at install time. What about the host&#39;s SSH key? I don&#39;=
t think most places change those very often.<br><br>~<br>[mike@voyager]$ st=
at /etc/ssh/ssh_host_rsa_key<br>=C2=A0 File: =E2=80=98/etc/ssh/ssh_host_rsa=
_key=E2=80=99<br>=C2=A0 Size: 1675=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=
=A0=C2=A0 Blocks: 8=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 I=
O Block: 4096=C2=A0=C2=A0 regular file<br>Device: fd00h/64768d=C2=A0=C2=A0=
=C2=A0 Inode: 416880=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Links: 1<br>Access: (064=
0/-rw-r-----)=C2=A0 Uid: (=C2=A0=C2=A0=C2=A0 0/=C2=A0=C2=A0=C2=A0 root)=C2=
=A0=C2=A0 Gid: (=C2=A0 999/ssh_keys)<br>Access: 2015-08-05 12:48:27.0210658=
83 -0600<br>Modify: 2015-04-26 20:05:46.378871265 -0600<br>Change: 2015-04-=
26 20:05:46.457871265 -0600<br>=C2=A0Birth: -<br></div><div><br><br></div><=
div>--<br></div><div>Mike<br></div><div><br></div><div class=3D"gmail_extra=
"><br><div class=3D"gmail_quote">On Wed, Aug 5, 2015 at 2:13 PM, David L. W=
illson <span dir=3D"ltr">&lt;<a href=3D"mailto:dlwillson@sofree.us" target=
=3D"_blank">dlwillson@sofree.us</a>&gt;</span> wrote:<br><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">BCC: LPIC-1 Study Group<br>
<br>
&quot;Born On Date&quot;<br>
<br>
Sometimes it&#39;s useful to know when this server was &quot;born&quot;, wh=
en it was built. Usually, you also want to know who built it, so you know w=
ho to question or kick, but that&#39;s a topic for another day.<br>
<br>
The root filesystem was usually created on the same day, so that is the dat=
e I use. To get that date, if your root filesystem is ext2/3/4, run dumpe2f=
s and look for &#39;created&#39;.<br>
<br>
Here&#39;s an example:<br>
<br>
[dwills003c@wdv-logecoll nagios]$ sudo df -hT /<br>
Filesystem=C2=A0 =C2=A0 Type=C2=A0 =C2=A0 Size=C2=A0 Used Avail Use% Mounte=
d on<br>
/dev/sdi6=C2=A0 =C2=A0 =C2=A0ext3=C2=A0 =C2=A0 =C2=A070G=C2=A0 =C2=A032G=C2=
=A0 =C2=A035G=C2=A0 48% /<br>
[dwills003c@wdv-logecoll nagios]$ sudo /sbin/dumpe2fs /dev/sdi6 | grep -iC =
3 created<br>
dumpe2fs 1.39 (29-May-2006)<br>
Fragments per group:=C2=A0 =C2=A0 =C2=A0 32768<br>
Inodes per group:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A032736<br>
Inode blocks per group:=C2=A0 =C2=A01023<br>
Filesystem created:=C2=A0 =C2=A0 =C2=A0 =C2=A0Tue Jan 25 06:44:25 2011<br>
Last mount time:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Fri Jul 31 09:02:54 2015=
<br>
Last write time:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Fri Jul 31 09:02:54 2015=
<br>
Mount count:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 10<br>
<br>
Now, Fedora Server 22 and Enterprise Linux 7 have moved to xfs. How do you =
get the same information from it? I don&#39;t know... yet.<br>
_______________________________________________<br>
SFS mailing list<br>
<a href=3D"mailto:SFS@thegeek.nu">SFS@thegeek.nu</a><br>
<a href=3D"http://mailman.thegeek.nu/mailman/listinfo/sfs" rel=3D"noreferre=
r" target=3D"_blank">http://mailman.thegeek.nu/mailman/listinfo/sfs</a><br>
</blockquote></div><br></div></div>

--20cf307cfd3c5db49e051c966265--