def target_label_split(label):
    """
    Split a target label into a tuple of it's parts: (fsname, target type, index)
    """
    a = label.rsplit("-", 1)
    if len(a) == 1:
        # MGS
        return (None, a[0][0:3], None)
    return (a[0], a[1][0:3], int(a[1][3:], 16))