linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: device-mapper development <dm-devel@redhat.com>,
	LVM general discussion and development <linux-lvm@redhat.com>,
	John Stoffel <john@stoffel.org>
Subject: Re: [linux-lvm] fixing mangled UUIDs
Date: Thu, 10 Dec 2015 21:59:55 +0100	[thread overview]
Message-ID: <5669E7CB.5070900@redhat.com> (raw)
In-Reply-To: <22121.38685.702483.97696@quad.stoffel.home>

Dne 10.12.2015 v 16:15 John Stoffel napsal(a):
>>>>>> "Zdenek" == Zdenek Kabelac <zdenek.kabelac@gmail.com> writes:
>
> Zdenek> Dne 9.12.2015 v 21:39 John Stoffel napsal(a):
>>>>>>>> "Zdenek" == Zdenek Kabelac <zdenek.kabelac@gmail.com> writes:
>>>
> Zdenek> Dne 9.12.2015 v 17:40 John Stoffel napsal(a):
>>>>>
> Alasdair> Have you tried '--manglename none' if you aren't using a
> Alasdair> udev system that mangles names?  (Also available via
> Alasdair> environmnet variable - see man page.)
>>>>>
>>>>> That seems to be working, using the default Debbian Jessie lvm tools:
>>>>>
>>>>> dmsetup --manglename none status --target cache
>>>>> data-home: 0 1153433600 cache 8 2443/32768 128 54020/819200 80721
>>>>> 350897 64427 66938 0 23882 1 1 writeback 2 migration_threshold 2048
>>>>> smq 0 rw -
>>>>> data-local: 0 702545920 cache 8 2443/32768 128 1078/819200 6268 85795
>>>>> 1492 2715 0 1057 0 1 writeback 2 migration_threshold 2048 smq 0 rw -
>>>>>
>>>>>
>>>>> So now I can try to monitor my cache usage.
>>>>>
>>>>> So the question still remains, what is the long term fix so I don't
>>>>> have to deal with this breakage by default?  Do I have bad UUIDS on my
>>>>> volumes?
>>>
> Zdenek> Yep
>>>
> Zdenek> See supported charset:
>>>
> Zdenek> --
> Zdenek> Mangle any character not on a whitelist using mangling_mode when processing
> Zdenek> device-mapper device names and UUIDs. The names and UUIDs are mangled on
> Zdenek> input  and unmangled  on  output  where  the  mangling  mode  is one of: auto
> Zdenek> (only do the mangling if not mangled yet, do nothing if already mangled, error
> Zdenek> on mixed), hex (always do the mangling) and none (no mangling).  Default mode
> Zdenek> is auto.  Character whitelist: 0-9, A-Z, a-z, #+-.:=@_. This whitelist is also
> Zdenek> supported by udev. Any  character  not  on  a  whitelist  is replaced with its
> Zdenek> hex value (two digits) prefixed by \x.  Mangling mode could be also set
> Zdenek> through DM_DEFAULT_NAME_MANGLING_MODE environment variable.
> Zdenek> ---
>>>
> Zdenek> Udev create symlinks from UUID - so they need to be using udev-supported
> Zdenek> chars - and you   '!' in UUID -> unsupported and needs mangling.
>>>
>>> I'm happy to fix the UUIDs, the question is HOW.  Ideally without
>>> having to shutdown the system.
>>>
>>> As I explained in my earlier email, I tried using 'lvchange -an
>>> data/pete' to disable one of my LVs (after unmounting it) but then I
>>> can't see it to manage it with dmsetup to fix the UUIDs.
>>>
>
>
> Zdenek> dmsetup remove  unwanted-vg-lv-name
>
>
> Zdenek> vgcfgbackup
>
> Zdenek> vim   and fix UUID  (replace ! char) by hand
>
> Zdenek> vgcfgrestore
>
> Awesome, but can I do this with the system live?  Or do I need to boot
> into a rescue CD to make this?  Hidden assumptions are the killer
> here.


Yes - should be safe - as long as you  will not try to modify more things in 
parallel.

Anyway - this issue will need upstream fix.
But if you need something 'right now' - use the above sequence.

Regards

Zdenek

      reply	other threads:[~2015-12-10 20:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09 16:16 [linux-lvm] fixing mangled UUIDs John Stoffel
2015-12-09 16:27 ` [linux-lvm] [dm-devel] " Alasdair G Kergon
2015-12-09 16:40   ` John Stoffel
2015-12-09 19:24     ` [linux-lvm] " Zdenek Kabelac
2015-12-09 20:39       ` [linux-lvm] [dm-devel] " John Stoffel
2015-12-10  9:05         ` Zdenek Kabelac
2015-12-10 15:15           ` John Stoffel
2015-12-10 20:59             ` Zdenek Kabelac [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5669E7CB.5070900@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=john@stoffel.org \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).