Find the answer to your Linux question:
Results 1 to 5 of 5
I have a partition on a second hard drive that I use for backup. I backup through rsync and cron. I listed info through tune2fs /dev/sdb1 and got this: Filesystem ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Dec 2008
    Posts
    168

    fsck on backup drive?


    I have a partition on a second hard drive that I use for backup. I backup through rsync and cron.
    I listed info through tune2fs /dev/sdb1 and got this:

    Filesystem created: Sat Sep 13 09:12:56 2008
    Last mount time: Mon May 9 10:03:21 2011
    Last write time: Mon May 9 10:03:21 2011
    Mount count: 390
    Maximum mount count: 23
    Last checked: Thu Apr 8 11:28:03 2010
    Check interval: 15552000 (6 months)
    Next check after: Tue Oct 5 11:28:03 2010


    This drive was backed up every night except the last month, but the max count is 23 and the last check shows Thu Apr 8 11:28:03 2010. Can someone explain this? I want this partition to be checked at regular intervals when it gets mounted for backup.

    Thanks

  2. #2
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    How are you mounting the partition?

  3. #3
    Linux Newbie
    Join Date
    Dec 2008
    Posts
    168
    Quote Originally Posted by Jonathan183 View Post
    How are you mounting the partition?
    I am not mounting it on boot up, but through a script that I run through Crontab; it mounts the partition when it backs up to it then umounts.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,763

    Post

    Quote Originally Posted by JoeS View Post
    I have a partition on a second hard drive that I use for backup. I backup through rsync and cron.
    I listed info through tune2fs /dev/sdb1 and got this:

    Filesystem created: Sat Sep 13 09:12:56 2008
    Last mount time: Mon May 9 10:03:21 2011
    Last write time: Mon May 9 10:03:21 2011
    Mount count: 390
    Maximum mount count: 23
    Last checked: Thu Apr 8 11:28:03 2010
    Check interval: 15552000 (6 months)
    Next check after: Tue Oct 5 11:28:03 2010


    This drive was backed up every night except the last month, but the max count is 23 and the last check shows Thu Apr 8 11:28:03 2010. Can someone explain this? I want this partition to be checked at regular intervals when it gets mounted for backup.

    Thanks
    Checking man tune2fs - 390 times filesystem has been mounted. so far . Since its greater value than the max-mount-counts parameter set by the -c option (23) , will check the filesystem at the next reboot.

    Since its a secondary disk - i don't think you will be rebooting everyday.Better idea is to use " interval-between-checks " which performs fsck based on time interval rather than using mount counts and reboot.

    If I'm not wrong -
    tune2fs -i 1d /dev/sdb1
    should run fsck everyday.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  6. #5
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    I'd be tempted to add an entry in /etc/fstab to mount read only and check the filesystem, then modify the script to remount rw when you take a backup and let it unmount after the backup is taken.

    Other than that I'd either fsck the partition before mounting or start looking at the boot process and implement the equivalent of mount which is done during boot ... example

    ... someone else may have a more elegant solution for you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •