[CentOS] VM disk question

Fri Oct 21 15:26:11 UTC 2016
m.roth at 5-cent.us <m.roth at 5-cent.us>

Jerry Geis wrote:
> I have VMPlayer 12 running a CentOS 7 disk. Works fine.
>
> However I wish to change the disk from UUID booting (fstab) to the old
> style LABEL.
> (so I can export it and use on another machine).
<snip>
> however when I run:
> e2label /dev/sda1 /
> e2label: Bad magic number in super-block while trying to open /dev/sda1
> Couldn't find valid filesystem superblock.
<snip>
And the answer is that the mount handling is broken in 7, and I've filed a
bug over a year ago. The workaround solution is to *not* put slashes in
the LABEL; instead, do

e2label /dev/sda1 root

or, another filesystem, to use what we use,
e2label /dev/sdb1 export1
which we mount as /export/1.
Alternatively,
mkfs.xfs -L /dev/sdb1 export1

      mark