Suggestion on autorelabel
Y'know, folks, fsck -c gives you a clue that not only is it running, but a
vague feel for how much longer it'll be. .autorelabel, esp with several 2TB drives in a system, gives screens and screens and screens of asterisks, with no clue if it'll *ever* finish (which matters, when I'm going to be leaving soon, and it needs to be up for an overnight backup....) mark -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux |
Suggestion on autorelabel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On 01/31/2012 05:06 PM, m.roth@5-cent.us wrote: > Y'know, folks, fsck -c gives you a clue that not only is it > running, but a vague feel for how much longer it'll be. > .autorelabel, esp with several 2TB drives in a system, gives > screens and screens and screens of asterisks, with no clue if it'll > *ever* finish (which matters, when I'm going to be leaving soon, > and it needs to be up for an overnight backup....) > > mark > > -- selinux mailing list selinux@lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/selinux > > Give me a mechanism to know how many files are on the file system and I might be able to give you an idea. Basically this is doing a find / I don't think there is a way to know how many files are left. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8pRe0ACgkQrlYvE4MpobPVuQCffo/Yr90UELNi+vX3C70HY6h4 m5QAoLwXyq7B8i9imggwscrhb93LcTfL =DMYi -----END PGP SIGNATURE----- -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux |
Suggestion on autorelabel
On Feb 1, 2012, at 8:02 AM, Daniel J Walsh wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 01/31/2012 05:06 PM, m.roth@5-cent.us wrote: >> Y'know, folks, fsck -c gives you a clue that not only is it >> running, but a vague feel for how much longer it'll be. >> .autorelabel, esp with several 2TB drives in a system, gives >> screens and screens and screens of asterisks, with no clue if it'll >> *ever* finish (which matters, when I'm going to be leaving soon, >> and it needs to be up for an overnight backup....) >> >> mark >> >> -- selinux mailing list selinux@lists.fedoraproject.org >> https://admin.fedoraproject.org/mailman/listinfo/selinux >> >> > Give me a mechanism to know how many files are on the file system and > I might be able to give you an idea. > > Basically this is doing a > > find / > > I don't think there is a way to know how many files are left. fsck walks inodes and knows how many inodes are in use in advance. I think you would have to use something like ftw(3) to count the files in advance (slow) or generate a guess based on the number of inodes in use (inaccurate). joe -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux |
Suggestion on autorelabel
> From: selinux-bounces@lists.fedoraproject.org [mailto:selinux-
> bounces@lists.fedoraproject.org] On Behalf Of Daniel J Walsh > Sent: 01 February 2012 14:02 > On 01/31/2012 05:06 PM, m.roth@5-cent.us wrote: > > Y'know, folks, fsck -c gives you a clue that not only is it > > running, but a vague feel for how much longer it'll be. > > .autorelabel, esp with several 2TB drives in a system, gives > > screens and screens and screens of asterisks, with no clue if it'll > > *ever* finish (which matters, when I'm going to be leaving soon, > > and it needs to be up for an overnight backup....) > > > > mark > > > > -- selinux mailing list selinux@lists.fedoraproject.org > > https://admin.fedoraproject.org/mailman/listinfo/selinux > > > > > Give me a mechanism to know how many files are on the file system and > I might be able to give you an idea. > > Basically this is doing a > > find / > > I don't think there is a way to know how many files are left. Poking around with a couple of commands gave me some results: # e2fsck -nv /dev/mapper/slsvg-usrvol 91208 regular files 11779 directories 0 character device files 0 block device files 0 fifos 20300 links 642 symbolic links (642 fast symbolic links) 0 sockets -------- 123929 files # find /usr -xdev | wc 123929 123929 7687890 I wasn't able to get good timings, because even running the e2fsck command seemed to help the find command run faster. I'd expect though that either of those commands will complete more quickly than the fetch-the-name;fetch-its-attribute;get-the-context;get-the-correct-context;compare-them;write-the-new-context loop. Whether that would be sufficiently more quickly to justify the extra overhead time in setting it up is an experiment I don't have the leisure time to conduct at the moment ;-). Moray. “To err is human; to purr, feline.” -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux |
Suggestion on autorelabel
On Wed, 2012-02-01 at 09:02 -0500, Daniel J Walsh wrote:
> On 01/31/2012 05:06 PM, m.roth@5-cent.us wrote: > > Y'know, folks, fsck -c gives you a clue that not only is it > > running, but a vague feel for how much longer it'll be. > > .autorelabel, esp with several 2TB drives in a system, gives > > screens and screens and screens of asterisks, with no clue if it'll > > *ever* finish (which matters, when I'm going to be leaving soon, > > and it needs to be up for an overnight backup....) > > > > mark > > > > -- selinux mailing list selinux@lists.fedoraproject.org > > https://admin.fedoraproject.org/mailman/listinfo/selinux > > > > > Give me a mechanism to know how many files are on the file system and > I might be able to give you an idea. > > Basically this is doing a > > find / > > I don't think there is a way to know how many files are left. > -- I was also troubled by the 'endless' stream of asterisks. Perhaps some sort of heuristic - like disk size(s) divided by 'average' file size. Also don't know the value of one asterisk - is it 100 files? A few more experiments would give something that would be +- 30% This would be better than nothing. Bob G -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux |
Suggestion on autorelabel
On Wed, Feb 01, 2012 at 08:56:42 -0600,
Bob Gustafson <bobgus@rcn.com> wrote: > Perhaps some sort of heuristic - like disk size(s) divided by 'average' > file size. Also don't know the value of one asterisk - is it 100 files? I believe it is 100 files. So if you know how many files on on your system you can estimate when it will complete. -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux |
Suggestion on autorelabel
On Wed, 2012-02-01 at 4:57 PM, Bob Gustafson wrote:
> On Wed, 2012-02-01 at 09:02 -0500, Daniel J Walsh wrote: > > On 01/31/2012 05:06 PM, m.roth@5-cent.us wrote: > > > Y'know, folks, fsck -c gives you a clue that not only is it > > > running, but a vague feel for how much longer it'll be. > > > .autorelabel, esp with several 2TB drives in a system, gives > > > screens and screens and screens of asterisks, with no clue if it'll > > > *ever* finish (which matters, when I'm going to be leaving soon, > > > and it needs to be up for an overnight backup....) > > > > > > mark > > > > > > -- selinux mailing list selinux@lists.fedoraproject.org > > > https://admin.fedoraproject.org/mailman/listinfo/selinux > > > > > > > > Give me a mechanism to know how many files are on the file system and > > I might be able to give you an idea. > > > > Basically this is doing a > > > > find / > > > > I don't think there is a way to know how many files are left. > > -- > > I was also troubled by the 'endless' stream of asterisks. > > Perhaps some sort of heuristic - like disk size(s) divided by 'average' > file size. Also don't know the value of one asterisk - is it 100 files? > > A few more experiments would give something that would be +- 30% This > would be better than nothing. > > Bob G > "df -i" gives a summary of used inodes that corresponds to the number of files in my ext4 /boot and /home file systems very closely. The root file system inum count is about 14,000 more than find / -mount | wc -l But perhaps this could provide a good base number. Fred -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux |
Suggestion on autorelabel
> Give me a mechanism to know how many files are on the file system and
> I might be able to give you an idea. Yes, hardlinks are a complication. However, a useful progress measure can be computed as the percentage of _known_ total .st_nlink that have been seen so far. The numerator starts at zero. The denominator starts at (total_inodes - free_inodes). Update the denominator upon seeing each inode for the first time. Update the numerator upon seeing each hardlink in turn, including the first time for each inode. So, if 2==.st_nlink, then the first directory entry for any particular .st_ino results in numerator += 1; denominator += .st_nlink - 1; and the remnaining directory entries for that .st_ino do just numerator += 1; The fraction will wobble (go "backwards") upon first encounter with each inode that has (1 < .st_nlink), but the wobble will be small after 10% of duration. This method requires one additional stat() per inode [to check .st_nlink], assuming that a directory entry already gives you the .st_ino. It also requires a bit table to track the first encounter of each inode. -- -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux |
Suggestion on autorelabel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On 02/01/2012 09:56 AM, Bob Gustafson wrote: > On Wed, 2012-02-01 at 09:02 -0500, Daniel J Walsh wrote: >> On 01/31/2012 05:06 PM, m.roth@5-cent.us wrote: >>> Y'know, folks, fsck -c gives you a clue that not only is it >>> running, but a vague feel for how much longer it'll be. >>> .autorelabel, esp with several 2TB drives in a system, gives >>> screens and screens and screens of asterisks, with no clue if >>> it'll *ever* finish (which matters, when I'm going to be >>> leaving soon, and it needs to be up for an overnight >>> backup....) >>> >>> mark >>> >>> -- selinux mailing list selinux@lists.fedoraproject.org >>> https://admin.fedoraproject.org/mailman/listinfo/selinux >>> >>> >> Give me a mechanism to know how many files are on the file system >> and I might be able to give you an idea. >> >> Basically this is doing a >> >> find / >> >> I don't think there is a way to know how many files are left. -- > > I was also troubled by the 'endless' stream of asterisks. > > Perhaps some sort of heuristic - like disk size(s) divided by > 'average' file size. Also don't know the value of one asterisk - is > it 100 files? > > A few more experiments would give something that would be +- 30% > This would be better than nothing. > > Bob G > > -- selinux mailing list selinux@lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/selinux > > If you have huge file systems with all the same file type on them. it is probably better to just mount the drive with a label. Then autorelabel will ignore the file system. No reason to put labels on a huge file system all with the same label. man setfiles ... -p show progress by printing * every 1000 files. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8pZtQACgkQrlYvE4MpobMp1ACfQJQGte2ueh DIlYJhF5hRB0fR +jUAn1UQtm4xMPEi13QGf2m4R46t7hWi =R1YP -----END PGP SIGNATURE----- -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux |
Suggestion on autorelabel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On 02/01/2012 10:45 AM, John Reiser wrote: >> Give me a mechanism to know how many files are on the file system >> and I might be able to give you an idea. > > Yes, hardlinks are a complication. However, a useful progress > measure can be computed as the percentage of _known_ total > .st_nlink that have been seen so far. The numerator starts at > zero. The denominator starts at (total_inodes - free_inodes). > Update the denominator upon seeing each inode for the first time. > Update the numerator upon seeing each hardlink in turn, including > the first time for each inode. So, if 2==.st_nlink, then the first > directory entry for any particular .st_ino results in numerator += > 1; denominator += .st_nlink - 1; and the remnaining directory > entries for that .st_ino do just numerator += 1; > > The fraction will wobble (go "backwards") upon first encounter with > each inode that has (1 < .st_nlink), but the wobble will be small > after 10% of duration. This method requires one additional stat() > per inode [to check .st_nlink], assuming that a directory entry > already gives you the .st_ino. It also requires a bit table to > track the first encounter of each inode. > Patches accepted... Or an example C program. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8pZ4sACgkQrlYvE4MpobPUdwCeN3lbPwozWN iE1mCyVvDpi6r+ mA8AoMnyHhXRTD23WyvMCjZ2jSzPr2Pc =9rzD -----END PGP SIGNATURE----- -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux |
| All times are GMT. The time now is 11:24 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.