2013-06-13 18:55:20

by Autif Khan

[permalink] [raw]
Subject: /dev/disk/by-label missing after upgrade to 1.42.7

Hi,

We are using /dev/disk/by-label/OURLABEL to mount USB disk partitions.

We were using Ubuntu 12.04 with 1.42 version of e2fsprogs - where we
encountered SSD corruption issues on unclean powerdown. It was
suggested that we upgrade to the latest e2fsprogs
(http://marc.info/?l=linux-ext4&m=137035378614543&w=2).

After the upgrade to 1.42.7, we do not have /dev/disk/by-label

I am not sure if this is the right place to ask this - but I thought
that I should start here and ask in udev mailing list later - (that
whole thing about correlation mumble causation).

I am still researching how /dev/disk/by-label comes into existence -
please advice if there is something obvious that I am missing.

Thanks

Autif


2013-06-13 19:45:07

by Autif Khan

[permalink] [raw]
Subject: Re: /dev/disk/by-label missing after upgrade to 1.42.7

On Thu, Jun 13, 2013 at 2:55 PM, Autif Khan <[email protected]> wrote:
> Hi,
>
> We are using /dev/disk/by-label/OURLABEL to mount USB disk partitions.
>
> We were using Ubuntu 12.04 with 1.42 version of e2fsprogs - where we
> encountered SSD corruption issues on unclean powerdown. It was
> suggested that we upgrade to the latest e2fsprogs
> (http://marc.info/?l=linux-ext4&m=137035378614543&w=2).
>
> After the upgrade to 1.42.7, we do not have /dev/disk/by-label
>
> I am not sure if this is the right place to ask this - but I thought
> that I should start here and ask in udev mailing list later - (that
> whole thing about correlation mumble causation).
>
> I am still researching how /dev/disk/by-label comes into existence -
> please advice if there is something obvious that I am missing.
>

Thanks djwong#ext4 for all the help on IRC

It seems like blkid -o udev /dev/sdb1 displays info about the volume -
which is used by udev rules to populates /dev/disk/by-label

The output when e2fsprogs version 1.42 was used:

ubuntu@mac0013950af6fb:/lib/udev/rules.d$ sudo blkid -o udev -p /dev/sdb1
ID_FS_LABEL=KOKO
ID_FS_LABEL_ENC=KOKO
ID_FS_UUID=56D8-F5EE
ID_FS_UUID_ENC=56D8-F5EE
ID_FS_VERSION=FAT32
ID_FS_TYPE=vfat
ID_FS_USAGE=filesystem
ID_PART_ENTRY_SCHEME=dos
ID_PART_ENTRY_TYPE=0xb
ID_PART_ENTRY_FLAGS=0x80
ID_PART_ENTRY_NUMBER=1
ID_PART_ENTRY_OFFSET=32
ID_PART_ENTRY_SIZE=251616
ID_PART_ENTRY_DISK=8:16


The output when e2fsprogs version 1.42.7 was used:
ubuntu@mac001395089897:~$ sudo blkid -o udev /dev/sda1
Invalid output format udev. Choose from value,
device, list, or full

BTW, sudo blkid -o full /dev/sdb1 worked just fine - had the LABEL and
everything.

Also - looks like 1.42.7 does not support the -p option. From the man page:

-p Switch to low-level superblock probing mode (bypass cache).

Is there a configuration option that will allow blkid to display udev
output formats? I could not find with ./configure --help

Thanks

Autif

2013-06-13 21:35:58

by Eric Sandeen

[permalink] [raw]
Subject: Re: /dev/disk/by-label missing after upgrade to 1.42.7

On 6/13/13 2:45 PM, Autif Khan wrote:
> On Thu, Jun 13, 2013 at 2:55 PM, Autif Khan <[email protected]> wrote:
>> Hi,
>>
>> We are using /dev/disk/by-label/OURLABEL to mount USB disk partitions.
>>
>> We were using Ubuntu 12.04 with 1.42 version of e2fsprogs - where we
>> encountered SSD corruption issues on unclean powerdown. It was
>> suggested that we upgrade to the latest e2fsprogs
>> (http://marc.info/?l=linux-ext4&m=137035378614543&w=2).
>>
>> After the upgrade to 1.42.7, we do not have /dev/disk/by-label
>>
>> I am not sure if this is the right place to ask this - but I thought
>> that I should start here and ask in udev mailing list later - (that
>> whole thing about correlation mumble causation).
>>
>> I am still researching how /dev/disk/by-label comes into existence -
>> please advice if there is something obvious that I am missing.
>>
>
> Thanks djwong#ext4 for all the help on IRC
>
> It seems like blkid -o udev /dev/sdb1 displays info about the volume -
> which is used by udev rules to populates /dev/disk/by-label
>
> The output when e2fsprogs version 1.42 was used:
>
> ubuntu@mac0013950af6fb:/lib/udev/rules.d$ sudo blkid -o udev -p /dev/sdb1

ubuntu isn't using blkid from util-linux?

That's really where it's maintained these days, a little surprised that
blkid's still in use from e2fsprogs, though I don't know my ubuntu
releases. Maybe this is Crufty Crow? ;)

Fedora has been building w/ --disable-libblkid for quite a while,
just FWIW.

-Eric

> ID_FS_LABEL=KOKO
> ID_FS_LABEL_ENC=KOKO
> ID_FS_UUID=56D8-F5EE
> ID_FS_UUID_ENC=56D8-F5EE
> ID_FS_VERSION=FAT32
> ID_FS_TYPE=vfat
> ID_FS_USAGE=filesystem
> ID_PART_ENTRY_SCHEME=dos
> ID_PART_ENTRY_TYPE=0xb
> ID_PART_ENTRY_FLAGS=0x80
> ID_PART_ENTRY_NUMBER=1
> ID_PART_ENTRY_OFFSET=32
> ID_PART_ENTRY_SIZE=251616
> ID_PART_ENTRY_DISK=8:16
>
>
> The output when e2fsprogs version 1.42.7 was used:
> ubuntu@mac001395089897:~$ sudo blkid -o udev /dev/sda1
> Invalid output format udev. Choose from value,
> device, list, or full
>
> BTW, sudo blkid -o full /dev/sdb1 worked just fine - had the LABEL and
> everything.
>
> Also - looks like 1.42.7 does not support the -p option. From the man page:
>
> -p Switch to low-level superblock probing mode (bypass cache).
>
> Is there a configuration option that will allow blkid to display udev
> output formats? I could not find with ./configure --help
>
> Thanks
>
> Autif
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>


2013-06-13 22:56:39

by Darrick J. Wong

[permalink] [raw]
Subject: Re: /dev/disk/by-label missing after upgrade to 1.42.7

On Thu, Jun 13, 2013 at 04:35:55PM -0500, Eric Sandeen wrote:
> On 6/13/13 2:45 PM, Autif Khan wrote:
> > On Thu, Jun 13, 2013 at 2:55 PM, Autif Khan <[email protected]> wrote:
> >> Hi,
> >>
> >> We are using /dev/disk/by-label/OURLABEL to mount USB disk partitions.
> >>
> >> We were using Ubuntu 12.04 with 1.42 version of e2fsprogs - where we
> >> encountered SSD corruption issues on unclean powerdown. It was
> >> suggested that we upgrade to the latest e2fsprogs
> >> (http://marc.info/?l=linux-ext4&m=137035378614543&w=2).
> >>
> >> After the upgrade to 1.42.7, we do not have /dev/disk/by-label
> >>
> >> I am not sure if this is the right place to ask this - but I thought
> >> that I should start here and ask in udev mailing list later - (that
> >> whole thing about correlation mumble causation).
> >>
> >> I am still researching how /dev/disk/by-label comes into existence -
> >> please advice if there is something obvious that I am missing.
> >>
> >
> > Thanks djwong#ext4 for all the help on IRC
> >
> > It seems like blkid -o udev /dev/sdb1 displays info about the volume -
> > which is used by udev rules to populates /dev/disk/by-label
> >
> > The output when e2fsprogs version 1.42 was used:
> >
> > ubuntu@mac0013950af6fb:/lib/udev/rules.d$ sudo blkid -o udev -p /dev/sdb1
>
> ubuntu isn't using blkid from util-linux?
>
> That's really where it's maintained these days, a little surprised that
> blkid's still in use from e2fsprogs, though I don't know my ubuntu
> releases. Maybe this is Crufty Crow? ;)
>
> Fedora has been building w/ --disable-libblkid for quite a while,
> just FWIW.

<shrug> /me runs Ubutnu 12.04 w/ e2fsprogs 1.42.7 (by stealing the 1.42.5
package and mashing 1.42.7 into it, muahahha) and it works fine for me:

$ which blkid
/sbin/blkid
$ sudo /sbin/blkid -o udev -p /dev/sdb2
ID_FS_LABEL=blackbox-boot
ID_FS_LABEL_ENC=blackbox-boot
ID_FS_UUID=c5487a72-cb84-4ed9-b44c-50850fba11dd
ID_FS_UUID_ENC=c5487a72-cb84-4ed9-b44c-50850fba11dd
ID_FS_VERSION=1.0
ID_FS_TYPE=ext4
ID_FS_USAGE=filesystem
ID_PART_ENTRY_SCHEME=gpt
ID_PART_ENTRY_UUID=55b7a0e7-5135-4e34-b8a0-2371e580e926
ID_PART_ENTRY_TYPE=0fc63daf-8483-4772-8e79-3d69d8477de4
ID_PART_ENTRY_NUMBER=2
ID_PART_ENTRY_OFFSET=133120
ID_PART_ENTRY_SIZE=524288
ID_PART_ENTRY_DISK=8:16

--D
>
> -Eric
>
> > ID_FS_LABEL=KOKO
> > ID_FS_LABEL_ENC=KOKO
> > ID_FS_UUID=56D8-F5EE
> > ID_FS_UUID_ENC=56D8-F5EE
> > ID_FS_VERSION=FAT32
> > ID_FS_TYPE=vfat
> > ID_FS_USAGE=filesystem
> > ID_PART_ENTRY_SCHEME=dos
> > ID_PART_ENTRY_TYPE=0xb
> > ID_PART_ENTRY_FLAGS=0x80
> > ID_PART_ENTRY_NUMBER=1
> > ID_PART_ENTRY_OFFSET=32
> > ID_PART_ENTRY_SIZE=251616
> > ID_PART_ENTRY_DISK=8:16
> >
> >
> > The output when e2fsprogs version 1.42.7 was used:
> > ubuntu@mac001395089897:~$ sudo blkid -o udev /dev/sda1
> > Invalid output format udev. Choose from value,
> > device, list, or full
> >
> > BTW, sudo blkid -o full /dev/sdb1 worked just fine - had the LABEL and
> > everything.
> >
> > Also - looks like 1.42.7 does not support the -p option. From the man page:
> >
> > -p Switch to low-level superblock probing mode (bypass cache).
> >
> > Is there a configuration option that will allow blkid to display udev
> > output formats? I could not find with ./configure --help
> >
> > Thanks
> >
> > Autif
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> > the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2013-06-14 01:26:09

by Theodore Ts'o

[permalink] [raw]
Subject: Re: /dev/disk/by-label missing after upgrade to 1.42.7

On Thu, Jun 13, 2013 at 04:35:55PM -0500, Eric Sandeen wrote:

> ubuntu isn't using blkid from util-linux?

Ubuntu and Debian does use blkid from util-linux. I'm guessing Autif
compiled e2fsprogs by hand.

For the record, what I recommend for people who are using debian or
Ubuntu systems (of whatever vintage) is:

tar xvfz e2fsprogs-1.42.7.tar.gz
cd e2fsprogs-1.42.7
./debian/rules
fakeroot dpkg-buildpackage

This will build .deb packages that are suitable for whatever version
of Debian or Ubuntu (including really ancient ones before blkid was
moved to util-linux) you happen to be using.

> That's really where it's maintained these days, a little surprised that
> blkid's still in use from e2fsprogs, though I don't know my ubuntu
> releases. Maybe this is Crufty Crow? ;)
>
> Fedora has been building w/ --disable-libblkid for quite a while,
> just FWIW.

I plan to change the default for libblkid before I release 1.43.

- Ted

2013-06-20 23:08:37

by Autif Khan

[permalink] [raw]
Subject: Re: /dev/disk/by-label missing after upgrade to 1.42.7

I have updated our scripts to overwrite only those binaries that
originated from the e2fsprogs package. In our build/CI system it would
be (relatively) hard to build a debian package using fakeroot
dpkg-buildpackages, instead, we run dpkg -S /bin/binary to find if the
package originated in e2fsprogs and if it did, we copy it over,
otherwise not. For now this works, we will pay the technical debt
if/when we need to - chances are this will go away in Ubuntu 14.04 LTS
which should have the latest version of e2fsprogs.

Thanks for all the help - specially Eric, Ted and Darrick.

Autif

On Thu, Jun 13, 2013 at 9:26 PM, Theodore Ts'o <[email protected]> wrote:
> On Thu, Jun 13, 2013 at 04:35:55PM -0500, Eric Sandeen wrote:
>
>> ubuntu isn't using blkid from util-linux?
>
> Ubuntu and Debian does use blkid from util-linux. I'm guessing Autif
> compiled e2fsprogs by hand.
>
> For the record, what I recommend for people who are using debian or
> Ubuntu systems (of whatever vintage) is:
>
> tar xvfz e2fsprogs-1.42.7.tar.gz
> cd e2fsprogs-1.42.7
> ./debian/rules
> fakeroot dpkg-buildpackage
>
> This will build .deb packages that are suitable for whatever version
> of Debian or Ubuntu (including really ancient ones before blkid was
> moved to util-linux) you happen to be using.
>
>> That's really where it's maintained these days, a little surprised that
>> blkid's still in use from e2fsprogs, though I don't know my ubuntu
>> releases. Maybe this is Crufty Crow? ;)
>>
>> Fedora has been building w/ --disable-libblkid for quite a while,
>> just FWIW.
>
> I plan to change the default for libblkid before I release 1.43.
>
> - Ted

2013-06-21 00:23:18

by Theodore Ts'o

[permalink] [raw]
Subject: Re: /dev/disk/by-label missing after upgrade to 1.42.7

On Thu, Jun 20, 2013 at 07:08:35PM -0400, Autif Khan wrote:
> I have updated our scripts to overwrite only those binaries that
> originated from the e2fsprogs package. In our build/CI system it would
> be (relatively) hard to build a debian package using fakeroot
> dpkg-buildpackages, instead, we run dpkg -S /bin/binary to find if the
> package originated in e2fsprogs and if it did, we copy it over,
> otherwise not. For now this works, we will pay the technical debt
> if/when we need to - chances are this will go away in Ubuntu 14.04 LTS
> which should have the latest version of e2fsprogs.

If you're not willing to use dpkg-buildpackage, I strongly recommend
that you add the following configure options:

--disable-libblkid --disable-libuuid --disable-fsck --disable-uuidd

... especially if you are building with shared libraries. Otherwise,
you'll be building with one version of the shared libraries, and
running with a different shared libraries.

- Ted