diff options
author | Rob Taylor <rob.taylor@codethink.co.uk> | 2013-08-19 18:44:02 +0000 |
---|---|---|
committer | Rob Taylor <rob.taylor@codethink.co.uk> | 2013-08-28 16:58:23 +0000 |
commit | c7799f68af9ddeff38da18b00996f7fd90d365fa (patch) | |
tree | 6718d969be5810e113402fe4fb29c382b99154e0 | |
parent | d7f9f29c9e2418f2ef004608b893a5edaf248547 (diff) | |
download | linux-baserock/robtaylor/cephboot.tar.gz |
Document desired functionality for ceph-as-root.baserock/robtaylor/cephboot
This is based of nfsroot, but simplifying and generalising as there are no
backwards compatibility concerns.
We also use DYNAMIC_DEBUG rather than have a custom boot debugging method.
-rw-r--r-- | Documentation/filesystems/ceph/ceph.txt (renamed from Documentation/filesystems/ceph.txt) | 0 | ||||
-rw-r--r-- | Documentation/filesystems/ceph/cephroot.txt | 111 | ||||
-rw-r--r-- | include/linux/root_dev.h | 1 | ||||
-rw-r--r-- | init/do_mounts.c | 1 |
4 files changed, 113 insertions, 0 deletions
diff --git a/Documentation/filesystems/ceph.txt b/Documentation/filesystems/ceph/ceph.txt index b08c6ba553f0..b08c6ba553f0 100644 --- a/Documentation/filesystems/ceph.txt +++ b/Documentation/filesystems/ceph/ceph.txt diff --git a/Documentation/filesystems/ceph/cephroot.txt b/Documentation/filesystems/ceph/cephroot.txt new file mode 100644 index 000000000000..a0c8df0e4935 --- /dev/null +++ b/Documentation/filesystems/ceph/cephroot.txt @@ -0,0 +1,111 @@ +Mounting the root filesystem via Ceph (cephroot) +=============================================== + +Written 2013 by Rob Taylor <rob.taylor@codethink.co.uk> + +derived from nfsroot.txt: + +Written 1996 by Gero Kuhlmann <gero@gkminix.han.de> +Updated 1997 by Martin Mares <mj@atrey.karlin.mff.cuni.cz> +Updated 2006 by Nico Schottelius <nico-kernel-nfsroot@schottelius.org> +Updated 2006 by Horms <horms@verge.net.au> + + + +In order to use a diskless system, such as an X-terminal or printer server +for example, it is necessary for the root filesystem to be present on a +non-disk device. This may be an initramfs (see Documentation/filesystems/ +ramfs-rootfs-initramfs.txt), a ramdisk (see Documentation/initrd.txt), a +filesystem mounted via NFS or a filesystem mounted via Ceph. The following +text describes on how to use NFS for the root filesystem. + +For the rest of this text 'client' means the diskless system, and 'server' +means the NFS server. + + + + +1.) Enabling cephroot capabilities + ----------------------------- + +In order to use cephroot, CEPH_FS needs to be selected as +built-in during configuration. Once this has been selected, the cephroot +option will become available, which should also be selected. + +In the networking options, kernel level autoconfiguration can be selected, +along with the types of autoconfiguration to support. Selecting all of +DHCP, BOOTP and RARP is safe. + + + + +2.) Kernel command line + ------------------- + +When the kernel has been loaded by a boot loader (see below) it needs to be +told what root fs device to use. And in the case of nfsroot, where to find +both the server and the name of the directory on the server to mount as root. +This can be established using the following kernel command line parameters: + + +root=/dev/ceph + + This is necessary to enable the pseudo-Ceph-device. Note that it's not a + real device but just a synonym to tell the kernel to use Ceph instead of + a real device. + + +cephroot=<monaddr1>[,<monaddr2>,...]:/[<subdir>] + + If cephroot is not specified, it is expected that that a valid mount will be +found via DHCP option 17, Root Path [1] + + <monaddrX> Monitor address. Each takes the form host[:port]. If the port + is not specified, the Ceph default of 6789 is assumed. + + <subdir> A subdirectory subdir may be specified if a subset of the file + system is to be mounted + +cephrootopts=<ceph-opts> + + <ceph-opts> Standard Ceph options. All options are separated by commas. + See Documentation/filesystems/ceph/ceph.txt for options and + their defaults. + +cephrootappendip=1 + If cephrootappendip is set, then the subdir path has + '/A.B.C.D' appended to it, where A.B.C.D is the primary client IP. + +ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>: + <dns0-ip>:<dns1-ip> + + If the ip parameter is used with cephboot, then <server-ip> is disregarded. + + +ddebug_query="module ceph" + + This parameter enables debugging messages to appear in the kernel + log at boot time so that administrators can verify that the correct + Ceph mount options, server address, and root path are passed to the + Ceph client. + +4.) References + ---------- + +[1] http://tools.ietf.org/html/rfc2132 + +5.) Credits + ------- + + cephroot was derived from nfsroot by Rob Taylor <rob.taylor@codethink.co.uk> + + The nfsroot code in the kernel and the RARP support have been written + by Gero Kuhlmann <gero@gkminix.han.de>. + + The rest of the IP layer autoconfiguration code has been written + by Martin Mares <mj@atrey.karlin.mff.cuni.cz>. + + In order to write the initial version of nfsroot I would like to thank + Jens-Uwe Mager <jum@anubis.han.de> for his help. + + diff --git a/include/linux/root_dev.h b/include/linux/root_dev.h index ed241aad7c17..af6b1825b462 100644 --- a/include/linux/root_dev.h +++ b/include/linux/root_dev.h @@ -16,6 +16,7 @@ enum { Root_SDA2 = MKDEV(SCSI_DISK0_MAJOR, 2), Root_HDC1 = MKDEV(IDE1_MAJOR, 1), Root_SR0 = MKDEV(SCSI_CDROM_MAJOR, 0), + Root_CEPH = MKDEV(UNNAMED_MAJOR, 254), }; extern dev_t ROOT_DEV; diff --git a/init/do_mounts.c b/init/do_mounts.c index a2b49f2c1bd8..6cd19b1f33ff 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -195,6 +195,7 @@ done: * is a zero-filled hex representation of the 1-based partition number. * 7) PARTUUID=<UUID>/PARTNROFF=<int> to select a partition in relation to * a partition with a known unique id. + * 8) /dev/ceph represents Root_CEPH * * If name doesn't have fall into the categories above, we return (0,0). * block_class is used to check if something is a disk name. If the disk |