Menu

#129 Debian SSIFailover uses findfs, but...

v1.9.1
closed-fixed
nobody
5
2007-08-12
2007-02-06
Anonymous
No

findfs looks in /etc/blkid.tab, which doesn't seem to be a cdsl, so it finds the same device on all nodes. Rather a problem if two nodes have different names for the same device (can happen for example on shared SCSI).

# onall /sbin/findfs UUID=b7c7645c-1d6f-4943-88c0-269ec640f5d3
(node 1)
/dev/sdc1
(node 2)
/dev/sdc1

# onall sh -c 'blkid -c /dev/null | grep b7c7645c-1d6f-4943-88c0-269ec640f5d3'
(node 1)
/dev/sda1: LABEL="/root" UUID="b7c7645c-1d6f-4943-88c0-269ec640f5d3" SEC_TYPE="ext3" TYPE="ext2"
(node 2)
/dev/sdc1: LABEL="/root" UUID="b7c7645c-1d6f-4943-88c0-269ec640f5d3" SEC_TYPE="ext3" TYPE="ext2"

Need "mklocalfile /etc/blkid.tab"

Discussion

  • John Hughes

    John Hughes - 2007-02-06

    Logged In: YES
    user_id=166336
    Originator: NO

    Also, should be running blkid on boot or nodeup?

     
  • John Hughes

    John Hughes - 2007-02-06

    Logged In: YES
    user_id=166336
    Originator: NO

    Doesn't quite work - apparently someone rm's blkid.tab on boot.

     
  • John Hughes

    John Hughes - 2007-02-06

    Logged In: YES
    user_id=166336
    Originator: NO

    Problem is blkid_flush_cache function writes temporary then uses rename to move it into place.

     
  • John Hughes

    John Hughes - 2007-02-06

    Logged In: YES
    user_id=166336
    Originator: NO

    So, a simple way to fix the problems is to replace:

    DEVICE=`/sbin/findfs $FSDEV`

    with

    DEVICE=`blkid -c /dev/null -t $FSDEV -o device`

     
  • Nobody/Anonymous

    Logged In: NO

    Easier "fix" just set env var BLKID_FILE to /dev/null before findfs

    Same "fix" works for the fsck on nodeup.

    Better fix would to be to libblkid to handle case of /etc/blkid.tab being a symbolic link - need ssi_realpath.

     
  • John Hughes

    John Hughes - 2007-02-09

    Logged In: YES
    user_id=166336
    Originator: NO

    Fixed by my hack

     
  • John Hughes

    John Hughes - 2007-06-23

    Logged In: YES
    user_id=166336
    Originator: NO

    Fixed even better by my patch to libblkid to make it work if /etc/blkid.tab is a cdsl

     
  • Roger Tsang

    Roger Tsang - 2007-08-12

    Logged In: YES
    user_id=1246761
    Originator: NO

    Fixed in 1.9.3

     
  • Roger Tsang

    Roger Tsang - 2007-08-12
    • status: open --> closed-fixed
     

Log in to post a comment.