using /sbin/gpart to add GPT volume
n dhert
ndhertbsd at gmail.com
Tue Oct 11 03:01:00 UTC 2011
In jan 2009 when /sbin/gpt still existed, this is what I did on a multi-boot
test PC, after creatng unallocated spac, booting into my freebsd partition:
# sysinstall
Disk name: ad0 FDISK Partition
Editor
DISK Geometry: 5005 cyls/255 heads/63 sectors = 80405325 sectors (39260MB)
Offset Size(ST) End Name PType Desc Subtype
Flags
0 63 62 - 12 unused 0
63 29414952 29415014 ad0s1 4 NTFS/HPFS/QNX 7
29415015 3116610 32531624 ad0s4 4 ext2fs 131
32531625 62 32531686 - 12 unused 0
32531687 14313853 46845539 ad0s3 8 freebsd 165
46845540 33559785 80405324 ad0s2 4 extended DOS, LBA 15
80405325 12915 80418239 - 12 unused 0
ad0s4 was the unallocated space
# gpt create -f /dev/ad0s4
# gpt show /dev/ad0s4
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 3116543
3116577 32 Sec GPT table
3116609 1 Sec GPT header
# gpt add /dev/ad0s4
/dev/ad0s4p1 added
# gpt show /dev/ad0s4
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 3116543 1 GPT part - FreeBSD UFS/UFS2
3116577 32 Sec GPT table
3116609 1 Sec GPT header
# newfs /dev/ad0s4p1
# mkdir /ghome
# mount /dev/ad0s4p1 /ghome
# df -k
Filesystem 1024-blocks Used Avail Capacity Mounted on
/dev/ad0s3a 380654 170430 179772 49% /
devfs 1 1 0 100% /dev
/dev/ad0s3e 317166 56 291738 0% /tmp
/dev/ad0s3f 5144698 3167822 1565302 67% /usr
/dev/ad0s3d 571118 28080 497350 5% /var
/dev/ad0s4p1 1504908 4 1384512 0% /ghome
My problem is, what are the equivalent instructions using gpart ???
2011/10/10 illoai at gmail.com <illoai at gmail.com>
> On 10 October 2011 11:33, n dhert <ndhertbsd at gmail.com> wrote:
> > I have a FreebSD 8.2 machine with 12 1-Tb disks used for making backups.
> > now I try to create
> > # gpart create -s GPT ad0s4
> > gpart: provider: Device not configured
>
> (NB I do not have a multi-boot system with an
> MBR scheme on it, so I'm not clear on the pre-
> cise details)
> You want some variation of
> # gpart add -t freebsd-ufs ad0[s4]
>
> "create" is for the disk-wise scheme
> "add" is for the individual slices/partitions
>
> Again, I haven't played with gpart on an MBR disk,
> so be careful.
>
> Aso, if you're muddling with the boot disk, you may
> have to work in single-user mode.
>
> --
> --
>
More information about the freebsd-questions
mailing list