DragonFly kernel List (threaded) for 2008-07
DragonFly BSD
DragonFly kernel List (threaded) for 2008-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Hammer - adding volume


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Jul 2008 09:30:13 -0700 (PDT)

:Is adding a volume to an existing filesystem
:going to be supported for the release?
:
:I guess I will have to use newf_hammer with some flag
:to prepare new volume for addition to existing filesytem,
:but don't see appropriate flag.
:
:When I just newfs_hammer another partition, it can't be mounted with existi=
:ng:
:mount fails with this message to console:
: fsid doesn't match other volumens
:
: -thomas

    Heh, that won't work.  HAMMER will not let you shoot yourself in the
    foot, if you specify two separate HAMMER filesystems in a single mount
    it won't let you do it.

    It won't be available for release but certainly messing around
    with the volume structure off-line (with the filesystem unmounted)
    is not too difficult to do and you could write a command to have
    the hammer utility do it.  Basically:

    * You have to create a new volume header in the new partition,
      assign it a new volume number (e.g. original might be volume 0,
      your new volume would be volume 1), and assign it the same
      fsid.  Numerous fields must be properly assigned.

    * You have to update all the volume headers to specify that there are
      two volumes in the filesystem.

    * And finally the freemap needs to be updated to add the space now
      available in the new volume to the filesystem.  The freemap's
      layer1 is already allocated so this is a matter of allocating and
      assigning the layer2 big-blocks related to the new volume.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]