If partprobe does not find a partition table, it refuses to act but does not report an error

Bug #1104797 reported by Tristan Schmelcher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
parted (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

I ran shred on a hard drive (/dev/sdd) and then tried to run partprobe to make the device node for its sole partition disappear (/dev/sdd1). It was not mounted at the time. partprobe claimed to succeed, but in fact it did nothing. Running "blockdev --rereadpt /dev/sdd" worked.

$ sudo partprobe
$ ls /dev/sdd*
/dev/sdd /dev/sdd1
$ sudo partprobe /dev/sdd
$ ls /dev/sdd*
/dev/sdd /dev/sdd1
$ sudo blockdev --rereadpt /dev/sdd
$ ls /dev/sdd*
/dev/sdd
$

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: parted 2.3-10ubuntu2
ProcVersionSignature: Ubuntu 3.5.0-21.32-generic 3.5.7.1
Uname: Linux 3.5.0-21-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.6.1-0ubuntu9
Architecture: amd64
Date: Thu Jan 24 22:08:03 2013
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: parted
UpgradeStatus: Upgraded to quantal on 2012-10-28 (88 days ago)

Revision history for this message
Tristan Schmelcher (tschmelcher) wrote :
Revision history for this message
Phillip Susi (psusi) wrote :

I am unable to reproduce this. How did you remove the partition from the drive in the first place, and what partition table is it using?

Changed in parted (Ubuntu):
status: New → Incomplete
Revision history for this message
Tristan Schmelcher (tschmelcher) wrote :

I securely erased the drive's entire data with shred. i.e.:

sudo shred /dev/sdd

So after this there was no longer a partition table at all. (Prior to this, it was a DOS partition table.)

Changed in parted (Ubuntu):
status: Incomplete → New
Revision history for this message
Phillip Susi (psusi) wrote :

Ahh, then this is intentional. partprobe refuses to act if it can not recognize any partition table. Either remove the partition before shreding, or add a new but empty partition table after, or use the lower level delpart command.

Changed in parted (Ubuntu):
status: New → Invalid
Revision history for this message
Tristan Schmelcher (tschmelcher) wrote :

Gotcha. Refusing to act makes sense. However, exiting without any error seems like a valid bug to me.

Changed in parted (Ubuntu):
status: Invalid → New
summary: - partprobe silently fails where blockdev --rereadpt succeeds
+ If partprobe does not find a partition table, it refuses to act but does
+ not report an error
Phillip Susi (psusi)
Changed in parted (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Phillip Susi (psusi) wrote :

It appears I inadvertently fixed this in trusty; partprobe now returns an error if it finds no table.

Changed in parted (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.