Solved

problem creating new luks volume on new VM disk

Posted on 2016-10-24
5
144 Views
Last Modified: 2016-11-01
Running RHEL 6 on ESXI 6


I am running into problems.... see below... I have a new disk sdc.  I add a single primary partition, then I run luksFormat, seems OK but when I try to run luksUUID it tells me "Device /dev/sdc1 is not a valid LUKS device."

What am I doing wrong?



[root@server.vm.domain.com] /root # ls -l /dev/sd*
brw-rw---- 1 root disk    8,   0 Oct 24 04:30 /dev/sda
brw-rw---- 1 root disk    8,   1 Oct 24 03:46 /dev/sda1
brw-rw---- 1 root disk    8,  16 Oct 24 04:30 /dev/sdb
brw-rw---- 1 root disk    8,  17 Oct 24 03:46 /dev/sdb1
brw-rw---- 1 root disk    8,  32 Oct 24 04:32 /dev/sdc



[root@server.vm.domain.com] /root # parted /dev/sdc
GNU Parted 2.1
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.


(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sdc: 1100GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags


(parted) mkpart primary 1 -1s

(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sdc: 1100GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  1100GB  1100GB  primary


(parted) quit
Information: You may need to update /etc/fstab.

[root@server.vm.domain.com] /root # cryptsetup -c aes-xts-plain64 luksFormat /dev/sdc1

WARNING!
========
This will overwrite data on /dev/sdc1 irrevocably.

Are you sure? (Type uppercase yes): yes
[root@server.vm.domain.com] /root # cryptsetup luksUUID /dev/sdc1
Device /dev/sdc1 is not a valid LUKS device.

[root@server.vm.domain.com] /root # ls -l /dev/sd*
brw-rw---- 1 root disk    8,   0 Oct 24 04:30 /dev/sda
brw-rw---- 1 root disk    8,   1 Oct 24 03:46 /dev/sda1
brw-rw---- 1 root disk    8,  16 Oct 24 04:30 /dev/sdb
brw-rw---- 1 root disk    8,  17 Oct 24 03:46 /dev/sdb1
brw-rw---- 1 root disk    8,  32 Oct 24 04:32 /dev/sdc
brw-rw---- 1 root disk    8,  33 Oct 24 04:31 /dev/sdc1
0
Comment
Question by:Xetroximyn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 38

Accepted Solution

by:
Gerwin Jansen, EE MVE earned 500 total points
ID: 41856814
Did you type YES ?


>> Are you sure? (Type uppercase yes): yes
0
 

Author Comment

by:Xetroximyn
ID: 41857246
facepalm.jpg
In my defense I've never seen a linux utility require an uppercase yes.   And in linux "no output" commonly means "success".  How hard would it be a print a message "aborting..." or something like that.
0
 
LVL 17

Expert Comment

by:Gerald Connolly
ID: 41858484
Just another reason why i hate Linux!
0
 
LVL 38

Assisted Solution

by:Gerwin Jansen, EE MVE
Gerwin Jansen, EE MVE earned 500 total points
ID: 41859767
A message would have been nice, yes. You can try showing the return code after the program exist using:

echo $?

Did you manage getting it setup?
0
 

Author Closing Comment

by:Xetroximyn
ID: 41869558
To answer if I got this done yet.... The change got put on hold for a couple weeks because we are in a critical production period and can't risk ANY downtime.    But I have followed the same instructions before a few months ago and been just fine... so I think I should be good :-)  Apparently I was being a little more observant the first time around.
0

Featured Post

Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question