MySQL causing unreferenced files during fsck

View: New views
3 Messages — Rating Filter:   Alert me  

MySQL causing unreferenced files during fsck

by Mark Yieh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone,
I'm not sure if this is any cause for concern, but I
recently had to run an fsck due to a power failure
on my base 4.6 i386 box, and I noticed some
unreferenced files from MySQL.
I installed MySQL from packages and followed the
instructions for a secure install.
I'm pretty new to OpenBSD and system administration
in general, so I'm not sure if this is a big issue.
If it's not then is there a way for me to clear these files
so the next time I run fsck I won't see these errors?

Here is the output from the fsck program:

** /dev/rsd0a (NO WRITE)
** Last Mounted on /
** Root file system
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1906 files, 19932 used, 496332 free (28 frags, 62038 blocks, 0.0%  
fragmentation)
** /dev/rsd0d (NO WRITE)
** Last Mounted on /home
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
22 files, 20 used, 51602271 free (31 frags, 6450280 blocks, 0.0%  
fragmentation)
** /dev/rsd0e (NO WRITE)
** Last Mounted on /tmp
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
UNREF FILE I=8  OWNER=_mysql MODE=100600
SIZE=0 MTIME=Nov  1 20:55 2009
CLEAR? no

UNREF FILE I=9  OWNER=_mysql MODE=100600
SIZE=0 MTIME=Nov  1 20:55 2009
CLEAR? no

UNREF FILE I=10  OWNER=_mysql MODE=100600
SIZE=0 MTIME=Nov  1 20:55 2009
CLEAR? no

UNREF FILE I=11  OWNER=_mysql MODE=100600
SIZE=0 MTIME=Nov  1 20:55 2009
CLEAR? no

UNREF FILE I=12  OWNER=_mysql MODE=100600
SIZE=0 MTIME=Nov  1 20:55 2009
CLEAR? no

** Phase 5 - Check Cyl groups
6 files, 1 used, 1034207 free (15 frags, 129274 blocks, 0.0%  
fragmentation)
** /dev/rsd0f (NO WRITE)
** Last Mounted on /usr
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
13038 files, 213917 used, 15268444 free (292 frags, 1908519 blocks,  
0.0% fragmentation)
** /dev/rsd0g (NO WRITE)
** Last Mounted on /usr/X11R6
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1 files, 1 used, 2066048 free (16 frags, 258254 blocks, 0.0%  
fragmentation)
** /dev/rsd0h (NO WRITE)
** Last Mounted on /usr/local
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
5351 files, 58625 used, 15423736 free (72 frags, 1927958 blocks, 0.0%  
fragmentation)
** /dev/rsd0i (NO WRITE)
** Last Mounted on /usr/obj
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1 files, 1 used, 2066048 free (16 frags, 258254 blocks, 0.0%  
fragmentation)
** /dev/rsd0j (NO WRITE)
** Last Mounted on /usr/src
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1 files, 1 used, 2066048 free (16 frags, 258254 blocks, 0.0%  
fragmentation)
** /dev/rsd0k (NO WRITE)
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
326 files, 12542 used, 15469819 free (211 frags, 1933701 blocks, 0.0%  
fragmentation)
** /dev/rsd0l (NO WRITE)
** Last Mounted on /var/log
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
23 files, 3052 used, 2062997 free (29 frags, 257871 blocks, 0.0%  
fragmentation)
** /dev/rsd0m (NO WRITE)
** Last Mounted on /var/mail
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 465 used, 5161108 free (20 frags, 645136 blocks, 0.0%  
fragmentation)
** /dev/rsd0n (NO WRITE)
** Last Mounted on /var/spool
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
12 files, 12 used, 5161561 free (73 frags, 645186 blocks, 0.0%  
fragmentation)
** /dev/rsd0o (NO WRITE)
** Last Mounted on /var/tmp
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 2 used, 1034206 free (22 frags, 129273 blocks, 0.0%  
fragmentation)
** /dev/rsd0p (NO WRITE)
** Last Mounted on /var/www
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
278 files, 881 used, 51601410 free (66 frags, 6450168 blocks, 0.0%  
fragmentation)

Here's how I start my MySQL daemon.

if [ -x /usr/local/bin/mysqld_safe ] ; then
         su -c mysql root -c '/usr/local/bin/mysqld_safe > /dev/null  
2>&1 &'
         echo -n ' mysql'
fi

I have that in /etc/rc.local.
That was how the MySQL package suggested to start the daemon.

Thanks for your help and thanks to the OpenBSD team for their time and  
effort.


Re: MySQL causing unreferenced files during fsck

by Otto Moerbeek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Unreferenced files are totally normal when a sudden power down occurs.
Especially on /tmp. So stop worrying, and trust fsck to do the right thing.

        -Otto

On Sun, Nov 01, 2009 at 10:56:50PM -0800, Mark Yieh wrote:

> Hi everyone,
> I'm not sure if this is any cause for concern, but I
> recently had to run an fsck due to a power failure
> on my base 4.6 i386 box, and I noticed some
> unreferenced files from MySQL.
> I installed MySQL from packages and followed the
> instructions for a secure install.
> I'm pretty new to OpenBSD and system administration
> in general, so I'm not sure if this is a big issue.
> If it's not then is there a way for me to clear these files
> so the next time I run fsck I won't see these errors?
>
> Here is the output from the fsck program:
>
> ** /dev/rsd0a (NO WRITE)
> ** Last Mounted on /
> ** Root file system
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 1906 files, 19932 used, 496332 free (28 frags, 62038 blocks, 0.0%
> fragmentation)
> ** /dev/rsd0d (NO WRITE)
> ** Last Mounted on /home
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 22 files, 20 used, 51602271 free (31 frags, 6450280 blocks, 0.0%
> fragmentation)
> ** /dev/rsd0e (NO WRITE)
> ** Last Mounted on /tmp
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> UNREF FILE I=8  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov  1 20:55 2009
> CLEAR? no
>
> UNREF FILE I=9  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov  1 20:55 2009
> CLEAR? no
>
> UNREF FILE I=10  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov  1 20:55 2009
> CLEAR? no
>
> UNREF FILE I=11  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov  1 20:55 2009
> CLEAR? no
>
> UNREF FILE I=12  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov  1 20:55 2009
> CLEAR? no
>
> ** Phase 5 - Check Cyl groups
> 6 files, 1 used, 1034207 free (15 frags, 129274 blocks, 0.0%
> fragmentation)
> ** /dev/rsd0f (NO WRITE)
> ** Last Mounted on /usr
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 13038 files, 213917 used, 15268444 free (292 frags, 1908519 blocks,
> 0.0% fragmentation)
> ** /dev/rsd0g (NO WRITE)
> ** Last Mounted on /usr/X11R6
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 1 files, 1 used, 2066048 free (16 frags, 258254 blocks, 0.0%
> fragmentation)
> ** /dev/rsd0h (NO WRITE)
> ** Last Mounted on /usr/local
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 5351 files, 58625 used, 15423736 free (72 frags, 1927958 blocks,
> 0.0% fragmentation)
> ** /dev/rsd0i (NO WRITE)
> ** Last Mounted on /usr/obj
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 1 files, 1 used, 2066048 free (16 frags, 258254 blocks, 0.0%
> fragmentation)
> ** /dev/rsd0j (NO WRITE)
> ** Last Mounted on /usr/src
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 1 files, 1 used, 2066048 free (16 frags, 258254 blocks, 0.0%
> fragmentation)
> ** /dev/rsd0k (NO WRITE)
> ** Last Mounted on /var
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 326 files, 12542 used, 15469819 free (211 frags, 1933701 blocks,
> 0.0% fragmentation)
> ** /dev/rsd0l (NO WRITE)
> ** Last Mounted on /var/log
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 23 files, 3052 used, 2062997 free (29 frags, 257871 blocks, 0.0%
> fragmentation)
> ** /dev/rsd0m (NO WRITE)
> ** Last Mounted on /var/mail
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 2 files, 465 used, 5161108 free (20 frags, 645136 blocks, 0.0%
> fragmentation)
> ** /dev/rsd0n (NO WRITE)
> ** Last Mounted on /var/spool
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 12 files, 12 used, 5161561 free (73 frags, 645186 blocks, 0.0%
> fragmentation)
> ** /dev/rsd0o (NO WRITE)
> ** Last Mounted on /var/tmp
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 2 files, 2 used, 1034206 free (22 frags, 129273 blocks, 0.0%
> fragmentation)
> ** /dev/rsd0p (NO WRITE)
> ** Last Mounted on /var/www
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 278 files, 881 used, 51601410 free (66 frags, 6450168 blocks, 0.0%
> fragmentation)
>
> Here's how I start my MySQL daemon.
>
> if [ -x /usr/local/bin/mysqld_safe ] ; then
>         su -c mysql root -c '/usr/local/bin/mysqld_safe > /dev/null
> 2>&1 &'
>         echo -n ' mysql'
> fi
>
> I have that in /etc/rc.local.
> That was how the MySQL package suggested to start the daemon.
>
> Thanks for your help and thanks to the OpenBSD team for their time
> and effort.


Re: MySQL causing unreferenced files during fsck

by Denise H. G.-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mark Yieh <mark@...> writes:

> Hi everyone,
> I'm not sure if this is any cause for concern, but I
> recently had to run an fsck due to a power failure
> on my base 4.6 i386 box, and I noticed some
> unreferenced files from MySQL.
> I installed MySQL from packages and followed the
> instructions for a secure install.
> I'm pretty new to OpenBSD and system administration
> in general, so I'm not sure if this is a big issue.
> If it's not then is there a way for me to clear these files
> so the next time I run fsck I won't see these errors?
>
> Here is the output from the fsck program:
> fragmentation)
> ** /dev/rsd0e (NO WRITE)
> ** Last Mounted on /tmp
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> UNREF FILE I=8  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov  1 20:55 2009
> CLEAR? no
>
> UNREF FILE I=9  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov  1 20:55 2009
> CLEAR? no
>
> UNREF FILE I=10  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov  1 20:55 2009
> CLEAR? no
>
> UNREF FILE I=11  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov  1 20:55 2009
> CLEAR? no
>
> UNREF FILE I=12  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov  1 20:55 2009
> CLEAR? no
>

Hi,

It seems that these unreferenced files are all located in /tmp, I think
you can safely run a 'fsck -y /tmp' to fix the issue in the single user
mode.

> Here's how I start my MySQL daemon.
>
> if [ -x /usr/local/bin/mysqld_safe ] ; then
>         su -c mysql root -c '/usr/local/bin/mysqld_safe > /dev/null
> 2>&1 &'
>         echo -n ' mysql'
> fi
>
> I have that in /etc/rc.local.
> That was how the MySQL package suggested to start the daemon.
>
> Thanks for your help and thanks to the OpenBSD team for their time and
> effort.
>
>
>

--
tamgya |aT| GmAiL |DoT| cOm