#include <linux/types.h>
#include <lnet/types.h>
+/****************** on-disk files *********************/
-/****************** persistent mount data *********************/
-
-/* Persistent mount data are stored on the disk in this file.
- Used before the setup llog can be read. */
-#define MOUNT_CONFIGS_DIR "CONFIGS"
-#define MOUNT_DATA_FILE MOUNT_CONFIGS_DIR"/mountdata"
#define MDT_LOGS_DIR "LOGS" /* COMPAT_146 */
+#define MOUNT_CONFIGS_DIR "CONFIGS"
+/* Persistent mount data are stored on the disk in this file. */
+#define MOUNT_DATA_FILE MOUNT_CONFIGS_DIR"/mountdata"
+#define LAST_RCVD "last_rcvd"
+#define LOV_OBJID "lov_objid"
+#define HEALTH_CHECK "health_check"
+
+
+/****************** persistent mount data *********************/
#define LDD_F_SV_TYPE_MDT 0x0001
#define LDD_F_SV_TYPE_OST 0x0002
#define LDD_F_UPGRADE14 0x0200 /* COMPAT_14 */
#define MTI_F_IOCTL 0x0400 /* only used in mti */
-
enum ldd_mount_type {
LDD_MT_EXT3 = 0,
LDD_MT_LDISKFS,
"smfs",
"reiserfs",
};
- //LASSERT(mt < LDD_MT_LAST);
return mount_type_string[mt];
}
#define lmd_is_client(x) ((x)->lmd_flags & LMD_FLG_CLIENT)
-/****************** mkfs command *********************/
-
-#define MO_IS_LOOP 0x01
-#define MO_FORCEFORMAT 0x02
-
-/* used to describe the options to format the lustre disk, not persistent */
-struct mkfs_opts {
- struct lustre_disk_data mo_ldd; /* to be written in MOUNT_DATA_FILE */
- char mo_mount_type_string[20]; /* "ext3", "ldiskfs", ... */
- char mo_device[128]; /* disk device name */
- char mo_mkfsopts[128]; /* options to the backing-store mkfs */
- char mo_loopdev[128]; /* in case a loop dev is needed */
- __u64 mo_device_sz; /* in KB */
- int mo_stripe_count;
- int mo_flags;
- int mo_mgs_failnodes;
-};
-
-/****************** on-disk files *********************/
-
-#define LAST_RCVD "last_rcvd"
-#define LOV_OBJID "lov_objid"
-#define HEALTH_CHECK "health_check"
/****************** last_rcvd file *********************/
#define MAX_LOOP_DEVICES 16
#define L_BLOCK_SIZE 4096
#define INDEX_UNASSIGNED 0xFFFF
+#define MO_IS_LOOP 0x01
+#define MO_FORCEFORMAT 0x02
+
+/* used to describe the options to format the lustre disk, not persistent */
+struct mkfs_opts {
+ struct lustre_disk_data mo_ldd; /* to be written in MOUNT_DATA_FILE */
+ char mo_mount_type_string[20]; /* "ext3", "ldiskfs", ... */
+ char mo_device[128]; /* disk device name */
+ char mo_mkfsopts[128]; /* options to the backing-store mkfs */
+ char mo_loopdev[128]; /* in case a loop dev is needed */
+ __u64 mo_device_sz; /* in KB */
+ int mo_stripe_count;
+ int mo_flags;
+ int mo_mgs_failnodes;
+};
static char *progname;
static int verbose = 1;
fprintf(stderr, "Are the lustre modules loaded?\n"
"Check /etc/modules.conf and /proc/filesystems\n");
if (errno == ENOTBLK)
- fprintf(stderr,"Does this filesystem have any OSTs?\n");
+ fprintf(stderr,"Do you need -o loop?\n");
+ if (errno == ENOMEDIUM)
+ fprintf(stderr,"This filesystem needs at least 1 OST\n");
if (errno == ENOENT)
fprintf(stderr,"Is the MGS specification correct? "
"(%s)\n", source);
"(%s)\n", source);
if (errno == ENXIO)
fprintf(stderr,"The target service failed to start "
- "(bad config log?) (%s)\n", source);
+ "(bad config log?) (%s). "
+ "See /var/log/messages.\n", source);
if (errno == EIO)
fprintf(stderr,"Is the MGS running? (%s)\n", source);
if (errno == EADDRINUSE)