Bug 691338 - add fixes/enhancements to mount, fdisk, cfdisk with regard to *BSD slices/partitions
Summary: add fixes/enhancements to mount, fdisk, cfdisk with regard to *BSD slices/pa...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 14
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-28 09:59 UTC by jurek.bajor
Modified: 2011-10-20 10:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-20 10:51:46 UTC
Type: ---


Attachments (Terms of Use)

Description jurek.bajor 2011-03-28 09:59:26 UTC
Description of problem:

1. fix df and mount displays after fake mount of *BSD slice/partition
No fs should be shown as mounted.

2. update man page mount(8) with UFS2.

3. add *BSD slices/partitions to fdisk and cfdisk displays
This is a request for enhancement to, as a minimum, make the displays complete
and comprehensible, and thus to reduce the danger of a mistake by the user
(sys admin).

Version-Release number of selected component (if applicable):

util-linux-ng.i686          2.18-4.8.fc14                     @updates

How reproducible:
as below.

Steps to Reproduce:
1. as below.
2.
3.
  
Actual results:

1.
# fdisk -l /dev/sda
...
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63    81920159    40960048+   7  HPFS/NTFS
/dev/sda2   *    81920160   111222719    14651280   a5  FreeBSD
...

# mount -vf -t auto /dev/sda2 /media/
/dev/sda2 on /media type auto (rw)

# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda7             14420896   7413796   5541976  58% /
tmpfs                  1025992       448   1025544   1% /dev/shm
/dev/sda2             14420896   7413796   5541976  58% /media     <====== ???

# mount
...
/dev/sda2 on /media type auto (rw)                                 <====== ???

# cat /proc/mounts
...                                                                <======

2.
$ man mount
...
Mount options for ufs
      ufstype=value
...

3.
# dmesg | grep bsd
[    1.550749]  sda2: <bsd: sda10 sda11 sda12 sda13 sda14 >

# fdisk -l /dev/sda
...
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63    81920159    40960048+   7  HPFS/NTFS
/dev/sda2   *    81920160   111222719    14651280   a5  FreeBSD
/dev/sda3       111222720   140525279    14651280   83  Linux
/dev/sda4       140525280   246017519    52746120    5  Extended
/dev/sda5       140525343   146391839     2933248+  82  Linux swap / Solaris
/dev/sda6       146391903   158109839     5858968+  83  Linux
/dev/sda7       158109903   187412399    14651248+  83  Linux
/dev/sda8       187412463   216714959    14651248+  83  Linux
/dev/sda9       216715023   246017519    14651248+  83  Linux

# cfdisk /dev/sda
...
    Name        Flags	   Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
    sda1                    Primary   ntfs                             41943.13 
    sda2        Boot        Primary   ufs                              15002.92
    sda3                    Primary   ext4                             15002.92
    sda5                    Logical   swap				3003.68
    sda6                    Logical   ext3             [backup]		5999.62
    sda7                    Logical   ext4             [Fedora]        15002.92
    sda8                    Logical   ext4             [spare]         15002.92
    sda9                    Logical   ext4	[_SL-60-i386-Live]     15002.92
                            Logical   Free Space                       34080.92*

Expected results:

1.
# fdisk -l /dev/sda
...
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63    81920159    40960048+   7  HPFS/NTFS
/dev/sda2   *    81920160   111222719    14651280   a5  FreeBSD
...

# mount -vf -t auto /dev/sda2 /media/
/dev/sda2 on /media type auto (rw)

# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda7             14420896   7413796   5541976  58% /
tmpfs                  1025992       448   1025544   1% /dev/shm

# mount
...

2.
$ man mount
...
Mount options for ufs
      ufstype=value
...
             ufs2   For   filesystems   created   by   a   BSD-like    system
                    (FreeBSD).
...

3.
# dmesg | grep bsd
[    1.550749]  sda2: <bsd: sda10 sda11 sda12 sda13 sda14 >

Proposal:
# fdisk -l /dev/sda
...
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63    81920159    40960048+   7  HPFS/NTFS
/dev/sda2   *    81920160   111222719    14651280   a5  FreeBSD
/dev/sda3       111222720   140525279    14651280   83  Linux
/dev/sda4       140525280   246017519    52746120    5  Extended
/dev/sda5       140525343   146391839     2933248+  82  Linux swap / Solaris
/dev/sda6       146391903   158109839     5858968+  83  Linux
/dev/sda7       158109903   187412399    14651248+  83  Linux
/dev/sda8       187412463   216714959    14651248+  83  Linux
/dev/sda9       216715023   246017519    14651248+  83  Linux
/dev/sda10-sda14 reserved for /dev/sda2 slices; verify 'df and 'mount'

# cfdisk /dev/sda
...
    Name        Flags	   Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
    sda1                    Primary   ntfs                             41943.13 
    sda2        Boot        Primary   ufs                              15002.92
    sda3                    Primary   ext4                             15002.92
    sda5                    Logical   swap				3003.68
    sda6                    Logical   ext3             [backup]		5999.62
    sda7                    Logical   ext4             [Fedora]        15002.92
    sda8                    Logical   ext4             [spare]         15002.92
    sda9                    Logical   ext4	[_SL-60-i386-Live]     15002.92
                            Logical   Free Space                       34080.92*
sda10-sda14 reserved for sda2 slices; verify 'df and 'mount'

Additional info:

Discussion threads summary:
http://www.spinics.net/lists/util-linux-ng/index.html
http://www.spinics.net/lists/util-linux-ng/msg04203.html
http://www.spinics.net/lists/util-linux-ng/msg04204.html

Comment 1 Karel Zak 2011-06-14 21:33:48 UTC
The mount.8 man page has been fixed by upstream commit 8c20c0ad4ae3c520f78faa190fb852bc1a3b8b16 -- updated package for fedora will be available in Fedora-16 (I guess it's not urgent issue).

Comment 2 Karel Zak 2011-06-14 21:39:50 UTC
The request for fdisks makes sense -- unfortunately, it requires very invasive changes to to code.

For now it's probably better to use the partx(8) command to list partitions, it parses and prints nested partition tables (e.g. bsd).

Comment 3 Karel Zak 2011-10-20 10:51:46 UTC
This has to be fixed in upstream code.


Note You need to log in before you can comment on or make changes to this bug.