Fwd: Resize HAMMER filesystem

Charles Rapenne charles.rapenne at gmail.com
Fri May 3 02:26:04 PDT 2013


I succeeded installing DragonFly BSD on a OVH (www.ovh.com) Kimsufi
server, I become concrete now.

Now, I have a 2047 M partition, fdisk output this :

dragon# fdisk
******* Working on device /dev/da0 *******
parameters extracted from device are:
cylinders=60563 heads=256 sectors/track=63 (16128 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=60563 heads=256 sectors/track=63 (16128 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165,(DragonFly/FreeBSD/NetBSD/386BSD)
    start 63, size 4193217 (2047 Meg), flag 80 (active)
    beg: cyl 0/ head 1/ sector 1;
    end: cyl 259/ head 255/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>



Modify the partition size and put something like 2048 * 500000 if your
disk is 500 Gb, it may certainly be wrong, but fdisk will ask you to
automagically correct the size if it doesn't fit.

fdisk output after modification and reboot :

dragon# fdisk
----
sysid 165,(DragonFly/FreeBSD/NetBSD/386BSD)
    start 63, size 1003516353 (489998 Meg), flag 80 (active)
    beg: cyl 0/ head 1/ sector 1;
    end: cyl 1023/ head 255/ sector 63
---




Now, my disklabel :
dragon# disklabel -e da0s1

# /dev/da0s1:
#
# Informational fields calculated from the above
# All byte equivalent offsets must be aligned
#
# boot space:    1044992 bytes
# data space:    2095579 blocks # 2046.46 MB (2145873408 bytes)
#
# NOTE: If the partition data base looks odd it may be
#       physically aligned instead of slice-aligned
#
diskid: 0f8b31fc-b3d6-11e2-ad5d-090027524870
label:
boot2 data base:      0x000000001000
partitions data base: 0x000000100200
partitions data stop: 0x00007ff77000
backup label:         0x00007ff77000
total size:           0x00007ff78200    # 2047.47 MB
alignment: 4096
display block size: 1024        # for partition display only

16 partitions:
#          size     offset    fstype   fsuuid
  a:     204800          0    4.2BSD    #     200.000MB
  b:     204800     204800      swap    #     200.000MB
  d:    1685976     409600    HAMMER    #    1646.461MB
  a-stor_uuid: 238680cf-b3d6-11e2-ad5d-090027524870
  b-stor_uuid: 23868128-b3d6-11e2-ad5d-090027524870
  d-stor_uuid: 23868179-b3d6-11e2-ad5d-090027524870



my "df" :
dragon# df
Filesystem      1K-blocks   Used  Avail Capacity  Mounted on
ROOT              1138688 911216 227472    80%    /
devfs                   1      1      0   100%    /dev
/dev/da0s1a        201518 135978  49420    73%    /boot
/pfs/@@-1:00001   1138688 911216 227472    80%    /var
/pfs/@@-1:00002   1138688 911216 227472    80%    /tmp
/pfs/@@-1:00003   1138688 911216 227472    80%    /usr
/pfs/@@-1:00004   1138688 911216 227472    80%    /home
/pfs/@@-1:00005   1138688 911216 227472    80%    /usr/obj
/pfs/@@-1:00006   1138688 911216 227472    80%    /var/crash
/pfs/@@-1:00007   1138688 911216 227472    80%    /var/tmp
procfs                  4      4      0   100%    /proc



dragon# cat /etc/fstab
# Device        Mountpoint    FStype    Options        Dump    Pass#
/dev/da0s1a        /boot        ufs    rw        1    1
/dev/da0s1b        none        swap    sw        0    0
/dev/da0s1d        /        hammer    rw        1    1
/pfs/var        /var        null    rw        0    0
/pfs/tmp        /tmp        null    rw        0    0
/pfs/usr        /usr        null    rw        0    0
/pfs/home        /home        null    rw        0    0
/pfs/usr.obj    /usr/obj        null    rw        0    0
/pfs/var.crash    /var/crash        null    rw        0    0
/pfs/var.tmp    /var/tmp        null    rw        0    0
proc            /proc        procfs    rw        0    0



What is my best option to increase the size of the hammer partition ?
Do I need to create another "partition" with disklabel and add a new
hammer filesystem to the actual to extend it ? (this sound a bit odd
to me).

2013/5/3 Francis GUDIN <fgudin at sdf-eu.org>:
> Le 02-05-2013, Charles Rapenne <charles.rapenne at gmail.com> a écrit :
>> Let imagine you have dragonfly installed on a 250 Gb disk, and you
>> want to move it to a 500 Gb disk without reinstalling, how could you
>> dump your existing disk and grow the HAMMER partition ?
>>
>> I need this to install the system from a virtual machine to a remote
>> host, using DD (Already did it for OpenBSD and NetBSD and I would like
>> to do it with DragonFly so at least, we could install DragonFly on
>> dedicated servers).
>
> Hi,
>
> I think that another way could be useful to you: I installed my own server
> through QEMU (neither remote console nor user-provided boot media available on
> this cheap server).
> The notes were thrown there: http://fgudin.sdf-eu.org/QEMU_Install
>
> I'm still trying to think of a better way, now we've got an initrd mecanism,
> but it's still food for thought to me.
>
> Regards,
> --
> fgudin at sdf-eu.org
> SDF-EU Public Access UNIX System - http://sdf-eu.org
>
>




More information about the Users mailing list