2

The virtual hard disk of one of my VPS has been enlarged, and I want to create a new ZFS slice using the extra space, but I couldn't be able to perform that.

# gpart add -s 10G -t freebsd-zfs da0
gpart: Invalid argument

# gpart show
=>      63  31457160  da0  MBR  (15G)
        63  10474317    1  freebsd  [active]  (5.0G)
  10474380  20982843       - free -  (10G)

=>       0  10474317  da0s1  BSD  (5.0G)
         0   9216000      1  freebsd-ufs  (4.4G)
   9216000   1258317      2  freebsd-swap  (614M)
4

This simply means that your /dev/da0 is not of the new "GPT" partition scheme, but of the old "MBR" partition scheme.

As from "man gpart", under the "PARTITION TYPES" section, you would see that there are no "zfs" related partition type for "MBR". Just use the "freebsd" type instead:

gpart add -s 10G -t freebsd da0

Then use the created "/dev/da0s2" device into your zfs.

By the way, why wanting to create a zfs from just 1 slice ? Would another ufs partition not being enough (my 2 cents) ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.