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

Expanding existing Hammer FS


From: Michael Neumann <mneumann@xxxxxxxx>
Date: Tue, 16 Dec 2008 01:45:38 +0100

Hi,

I'd be nice to be able to add just another spare disk to an existing Hammer FS to expand it's capacity. After taking a look at newfs_hammer,
it seems to be pretty easy to do that:


  * run format_volume on the new disk
  * ondisk->vol_num += 1 (number of volumes)
    for each volume of the filesystem.

I think that would be enough and I can hack it. My question is more API-oriented. How would the command line look like?

How about this:

hammer newfs label [... specify some defaults...]

will create the following file:

/etc/hammer/label

which will list all devices that make filesytem "label".

Now add a volume:

hammer add-volume label /dev/ad0

  This will format /dev/ad0 and attach it to the filesystem
  "label" by iterating over all volumes in /etc/hammer/label and
   increasing the volume count.

  Of course it would be more beautiful if the root volume would
  store those device names. That would also ease mounting of
  a multi-volume HAMMER fs:

    # create multi-volume Hammer FS
    newfs_hammer /dev/ad0 /dev/ad1

    # mount multi-volume Hammer FS by specifying the root volume
    mount_hammer /dev/ad0

    # add /dev/ad2 to the filesystem specified by the root volume ad0
    hammer add-volume /dev/ad0 /dev/ad2

Any suggestions?

Regards,

Michael




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