[Bug 203791] gpart cannot show/list gpt partitions inside a gpt partition

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Oct 15 15:01:42 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203791

            Bug ID: 203791
           Summary: gpart cannot show/list gpt partitions inside a gpt
                    partition
           Product: Base System
           Version: 10.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: la5lbtyi at aon.at

On a GPT-partitioned disk in my server (ada3) I have three partitions (ada3s11,
ada3s12, and ada3s13) for use in conducting experiments using VirtualBox. In
the VirtualBox client, these partitions show up as disks which can then be used
for various purposes.

In one test these partitions show up as ada0, ada1, and ada2 in the VB client,
respectively.

In the VB client, ada1 and ada2 have been MBR-partitioned, whereas ada0 has
been GPT-partitioned as follows.

(in the VB client; everything not containing "ada[012]" has been replaced by an
ellipsis)

# gpart show
=>      34  41942973  ada0  GPT  (20G)
        34         6        - free -  (3.0K)
        40      1024     1  freebsd-boot  (512K)
      1064       984        - free -  (492K)
      2048   4194304     2  freebsd-zfs  (2.0G)
   4196352   4194304     3  freebsd-swap  (2.0G)
   8390656  33550336     4  freebsd-zfs  (16G)
  41940992      2015        - free -  (1.0M)

=>      63  41942977  ada1  MBR  (20G)
        63   4194241     1  fat32  (2.0G)
   4194304  37748736     4  freebsd  [active]  (18G)

...

=>       0  37748736  ada1s4  BSD  (18G)
         0   4194304       1  freebsd-zfs  (2.0G)
   4194304   4194304       2  freebsd-swap  (2.0G)
   8388608  29360128       4  freebsd-zfs  (14G)

...

=>      63  41942977  ada2  MBR  (20G)
        63   4194241     1  fat32  (2.0G)
   4194304  37748736     4  freebsd  [active]  (18G)

...

=>       0  37748736  ada2s4  BSD  (18G)
         0   4194304       1  freebsd-zfs  (2.0G)
   4194304   4194304       2  freebsd-swap  (2.0G)
   8388608  29360128       4  freebsd-zfs  (14G)

...

[0]# 

(on the server, outside the VB client; the VB client has been shutdown to allow
access to the partitions; everything not containing "ada3" has been replaced by
an ellipsis)

# gpart show
...

=>        34  3907029101  ada3  GPT  (1.8T)
          34          30        - free -  (15K)
          64         192     1  freebsd-boot  (96K)
         256    41943040    11  freebsd  (20G)
    41943296    41943040    12  freebsd  (20G)
    83886336    41943040    13  freebsd  (20G)
   125829376    23068672        - free -  (11G)
   148898048  2684354560     3  freebsd-zfs  (1.3T)
  2833252608   536870912     4  freebsd-zfs  (256G)
  3370123520   536870912     5  freebsd-zfs  (256G)
  3906994432       34703        - free -  (17M)

...

=>      63  41942977  ada3s11  MBR  (20G)
        63  41942977           - free -  (20G)

...

=>      63  41942977  ada3s12  MBR  (20G)
        63   4194241        1  fat32  (2.0G)
   4194304  37748736        4  freebsd  [active]  (18G)

=>       0  37748736  ada3s12s4  BSD  (18G)
         0   4194304          1  freebsd-zfs  (2.0G)
   4194304   4194304          2  freebsd-swap  (2.0G)
   8388608  29360128          4  freebsd-zfs  (14G)

...

=>      63  41942977  ada3s13  MBR  (20G)
        63   4194241        1  fat32  (2.0G)
   4194304  37748736        4  freebsd  [active]  (18G)

=>       0  37748736  ada3s13s4  BSD  (18G)
         0   4194304          1  freebsd-zfs  (2.0G)
   4194304   4194304          2  freebsd-swap  (2.0G)
   8388608  29360128          4  freebsd-zfs  (14G)

...

# 

The problem is that for ada3s11, gpart (executed on the server, VB not running)
does not show the correct partitioning scheme (which is GPT), but only the
compatibility MBR scheme. For ada3s12 and ada3s13, which are MBR schemes
anyway, the output is the same (aside from naming differences) inside and
outside VB.

The suggested solution is that gpart should first probe for a GPT scheme and
only afterwards for an MBR scheme when probing for further partitioning schemes
inside partitions.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list