On Tue, Mar 14, 2000 at 12:12:17PM -0800, Greg Lehey wrote:
> On Thursday, 9 March 2000 at 11:12:21 +1030, Mark Newton wrote:
>
> > Another thing which would be useful is the ability to "vinum-ize" an
> > existing filesystem without destroying it first. On Solaris and
> > IRIX I can do that by creating a logical volume with a single plex
> > which just happens to contain the same partition as the existing
> > filesystem, thereby wrapping the filesystem in the logical volume.
[ ... ]
> It's still on my wishlist, though I don't know if I have it on the web
> page (and since I'm on the road at the moment, I can't check). My
> main concern here is that I want to maintain the device name/drive ID
> independence (for those who may not know, you can take the disks of a
> Vinum array out, shuffle the device IDs and reboot, and it will still
> put the components together in the correct way).
IRIX does accomplish this (Solaris ODS doesn't). There are certain
features of the way it handles its disks which make that simpler, though:
IRIX utilizes a reserved partition on every disk (partition 8) as a
"volume header", which must start at sector 0 and can be arbitrarily
sized. The volume header contains a disklabel (which starts at
sector 0, so it overlays the disk's partition table) and zero or
more additional files in a simple filesystem (not a filesystem as
such; all files are contiguous, rammed together a-la a tar archive,
simple enough for a first-stage bootloader to understand). The most
common use for this filesystem is to contain the second-stage
bootloader (aka /boot/loader on BSD), but there are other purposes for
it as well. One of those purposes is to host XLV volume labels, which
are replicated across all disks which participate in XLV volumes.
Each XLV volume label contains a unique identifier for the spindle
which contains it. That means that the "subdisk ID" equivalent,
together with all the other info in the label, is held out-of-band,
leaving the partition containing the XLV volume element as a
repository for filesystem data and nothing else.
The advantage of this approach is, of course, that an XLV volume can
"wrap" a preexisting filesystem without destroying it. If I want to
grow my /usr partition on dks0d1s6 by using a "spare" partition on
dks1d2s0, I can do this:
irix# xlv_make
xlv_make> volume usr
usr
xlv_make> data
usr.data
xlv_make> plex
usr.data.0
xlv_make> ve dks0d1s6
usr.data.0.0
xlv_make> end
Object specification completed
xlv_make> exit
Save changes? [n] y
irix#
[ then modify fstab to mount /usr from /dev/xlv/usr instead of
/dev/dsk/dks0d1s6 and reboot. Once I've done that, I'll never
need to reboot to manage /usr again; I can perform operations
like growing the filesystem onto additional volume elements
without needing to unmount it (in fact, some operations will
fail to work if the filesystem is unmounted) ]
irix# xlv_make
xlv_make> ve foo dks1d2s0
foo
xlv_make> end
Object specification completed
xlv_make> exit
Save changes? [n] y
irix# xlv_mgr
xlv_mgr> attach ve foo usr.data.0
VE foo attached to plex usr.data.0
xlv_mgr> show -verbose all
[ you'll see that "foo" has been renamed to "usr.data.0.1" ]
xlv_mgr> exit
irix# xfs_growfs /usr
[ /usr is "grown" online (i.e: you don't need to unmount it) ]
> The obvious way to
> do that is to say "there must be a Vinum partition on this physical
> drive, but the subdisk doesn't have to be on it". That could be a
> problem for existing disks. Thoughts?
A variation might be, "There can be more than one Vinum partition on
a physical drive, and Vinum metadata can be kept in a different one
from Vinum data."
Cheers,
- mark
--
Mark Newton Email: [EMAIL PROTECTED] (W)
Network Engineer Email: [EMAIL PROTECTED] (H)
Internode Systems Pty Ltd Desk: +61-8-82232999
"Network Man" - Anagram of "Mark Newton" Mobile: +61-416-202-223
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message