FS#29538 - /dev/dm-0, /dev/dm-1, /dev/dm-2 offered for reformatting

Attached to Project: Release Engineering
Opened by erdbeer (erdbeer) - Thursday, 19 April 2012, 14:13 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:52 GMT
Task Type Bug Report
Category AIF
Status Closed
Assigned To Dieter Plaetinck (Dieter_be)
Architecture All
Severity Medium
Priority Normal
Reported Version testbuild (specify!)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

(using 2012.04.12_04-00-01 x86_64 netinstall iso)

I am not sure about the purpose of the /dev/dm-x (x being 0, 1 or 2) devices, but their contents seem to be related to the installation CD, although mount and df say they're not mounted.
However, they are offered in the menu "Manually Configure block devices, filesystems and mountpoints" for reformatting, which doesn't make sense on a CD. Please remove these options from the list.
This task depends upon

Closed by  Gerardo Exequiel Pozzi (djgera)
Monday, 26 November 2012, 04:52 GMT
Reason for closing:  Deferred
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 19 April 2012, 14:40 GMT
@Dieter: I can fix this from archiso hook since /dev/mapper/arch_root-image (that is listed at used_block_devices) is a symlink to /dev/dm-0, etc... do you want this?
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 19 April 2012, 14:46 GMT
Now instead of symlinks /dev/mapper/arch_*, device nodes are used /dev/dm-* in used_block_devices.
Comment by Dieter Plaetinck (Dieter_be) - Thursday, 19 April 2012, 14:49 GMT
both /dev/mapper/${dm_snap_name} AND $(readlink -f /dev/mapper/${dm_snap_name}) should be ignored by AIF.
and yes, I think it makes sense to list both of them in /run/archiso/used_block_devices, at least if you can reliably know the right name for all devices at that stage.
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 19 April 2012, 14:57 GMT
I think you need to canonicalize all symlinks while scanning, and used_block_devices should only list device nodes only (like now with the patch)
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 19 April 2012, 15:02 GMT
(in other words, I want to avoid at all, duplicate entries that points to the same device on used_block_devices. (example /dev/disk/by-*/->)
Comment by Dieter Plaetinck (Dieter_be) - Thursday, 19 April 2012, 15:06 GMT
alright, fair enough. i'll test this later. thanks
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 19 April 2012, 15:09 GMT
Nice, pushed to master.
Comment by Dieter Plaetinck (Dieter_be) - Thursday, 19 April 2012, 15:11 GMT
oops.
s#I'll test this later#I'll implement this later in AIF#
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 19 April 2012, 15:15 GMT
With this change all devices listed at used_block_devices are now canonicalized ;)
Comment by Thomas Hebb (tchebb) - Sunday, 20 May 2012, 19:33 GMT
I've written a patch for AIF to resolve symlinks of block devices before checking them against ignore_block_devices: https://mailman.archlinux.org/pipermail/arch-releng/2012-May/002549.html
Comment by Dave Reisner (falconindy) - Sunday, 20 May 2012, 19:59 GMT
Just a thought... if the blacklist of devices is created by ArchISO from a "snapshot" of /proc/self/mountinfo, you'd be able to leverage findmnt to do the lookup without concerns of whether or not the source is canoncalized.

Loading...