Tag Archives: LVM

openSUSE 12.3 installer formatting encrypted devices

Hi, this morning I wanted to replace my openSUSE 12.2 by openSUSE 12.3 doing a fresh installation from a USB-stick (using a recent image of a KDE-live system). I am using an encrypted partition to store the volumes of a LVM-volume group (root, home and swap). root should get reformatted (from btrfs back to ext4), but of course I chose to keep my home-partition, it should get reused without being formatted. I entered this setup in the graphical installation program (YaST installer). I had done that before, quite often, what should go wrong? I went on not noticing the entry “Set up encrypted DM device on /dev/sda2”. What does that mean? Will it create some entries in configuration files for handling the encrypted device? No, it means that it will try to reformat the entire encrypted partition using “cryptsetup luksFormat” thus wiping out all volumes stored there although it was only told to format a single volume. Of course my last backup was quite old… but I was lucky: When reinstalling I always mount my home-partition–for accessing my files but also for noting when the installation program tries to touch the volume. I could not imagine that this would happen and thought this would be a quite useless precautionary measure–but actually this saved my day and not only this day: The installer (or cryptsetup or some layer in-between) noticed that there was a mounted partition using this device and refused to format /dev/sda2. First I did not understand the error messages but then–when realising the situation–I was shocked. Nervously unmounting the partition would have caused a total loss.

Afterwards there were even more surprises: This is a known bug! It had been reported before the release of 12.3. According to the report it can even wipe out your data although you did not press the button to start the installation! And it also causes the formatting of luks-encrypted devices which are completely unrelated to the installation—they just have to be open (later I retried the installer, I had plugged in an external hard drive containing an open encrypted LVM containing ext4/btrfs-volumes, I did not select it in the installation, but the installer wanted to format the partition (and it still wanted to format the partition containing my root-volume, although there was no btrfs-volume left iirc)). The bug had been marked as critical and as a potential “ship stopper”–but then somebody decided that encountering this bug would be too unlikely! Well, they might not have known all situations where this bug can occur and the particular steps to reproduce described in the report may appear unlikely and the bug may have been there before without anybody complaining. But, seriously, they wanted to risk total data loss just because a particular situation seems to be unlikely–although it actually happened? And of course you never know for sure whether such a critical bug may affect more situations than you thought.

The bug has been fixed in the libstorage-codebase before the release. However, it

From: http://the-user.org/post/opensuse-12-3-installer-formatting-encrypted-devices

Configure LVM to gain access to the data on disks

By prvnrk

Hello friends,

We had to upgrade RHEL 4.x to 5.7 so we took complete backup. Since DIRECT UPGRADE not possible, we rebuilt 5.7 from scratch.

We had lvm configuration on DATA disks in previous OS and now we need to configure such that we should be able to have same old LVM configuration (like VGs and LVs etc.) so that we could access the data on those volumes.

Could any kind soul provide me step-by-step on how to do this? (Yes, I have backup of /etc/lvm etc. of previous OS).

I thought of just copying Old /etc/lvm into new one and start lvm daemon. will it work?

TIA

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Ryan Kavanagh: Setting up full-disk encryption in OpenBSD 5.3

Steps 1 through 4

I recently decided to try out a snapshot of OpenBSD 5.3, intrigued by the notice that

softraid(4) RAID1 and crypto volumes are now bootable on i386 and amd64 (full disk encryption).

I’ve always used an encrypted LVM (as setup by the alternate CD) with a fully encrypted root on my netbook and laptop when running Debian/Kubuntu and never noticed much a performance hit. Unfortunately, I’m not the only one who has noticed a significant drop in performance with full-disk encryption on OpenBSD.

Although the steps required to setup full-disk encryption (as opposed to requiring manual intervention at boot or the equivalent of loop-mounted encrypted images via vnconfig(8)) on OpenBSD are not explicitly documented anywhere, searching through the mailing lists, man pages, and trial and error provided the following steps:

  1. Boot from your install media. Select the (S)hell option.
  2. Assuming the disk you’re installing to is ”wd0”, run fdisk -i
    wd0
    if you’re on an i386. If I’m not mistaken, you can skip to the following step otherwise.
  3. Run disklabel -E wd0. Create a label (typically b) of the appropriate size of type swap for swap, and then add a label a using the remainder of the space of type RAID. We aren’t going to put swap on our crypto device since OpenBSD has encrypted the swap partition by default since 2005.
  4. Setup the crypto volume as described in bioctl(8). You will be prompted for a passphrase and presented with a message along the lines of softraid0: SR CRYPTO volume attached as sd0 on successful setup. I used bioctl -c C -l /dev/wd0a softraid0 where – -c C specifies a device with raidlevel “CRYPTO”, – -l /dev/wd0a specifies the label of type RAID created in step 3 to use for the CRYPTO device, and – softraid0 is the softraid device to configure (this value should work unless you already have a softraid0 device).
  5. exit from the shell and (I)nstall as normal, installing to the disk sd0 (or whichever disk the crypto volume got attached as). In the partitioning dialog, you may need to manually adjust things since the auto-partitioning creates an additional swap label on sd0, which we don’t need given we already have wd0b.
  6. Using ed(1), add the line 1a8bab44e9cc178d.b none swap
    sw
    to /mnt/etc/fstab, assuming that 1a8bab44e9cc178d is the DUID associated with wd0 (you can find this out by running sysctl hw.disknames, which will output something like hw.disknames=wd0:1a8bab44e9cc178d,cd0:,rd0:6ce80c78714fa32f,sd0:fce7bfa23c8ec20d; just search for the DUID associated with wd0). Alternatively, wait until you boot into your system, and add it to your /etc/fstab using vi(1) or mg(1).
  7. Reboot, and you’ll be prompted for your passhprase. You’re done!

Here’s a screenshot of steps 1 through 4.

Here’s a screenshot of the passphrase prompt, after successfully entering the passphrase:

Passphrase prompt

If I’ve made any errors in the steps above, please point them out in the comments below or by sending me an email.

…read more
Source: FULL ARTICLE at Planet Ubuntu

Is it possible to extend a extended partition raw space in harddisk thru rhel 6

By redhatlbug

File Type: png
hi all,

As going thru LVM concepts in rhel 6, got hit with a question about “how to use the raw partition of an harddisk which extended volume is taken a bit”

please find the attached diagram…

is it possible to use this raw space with previously created extended partition without data loss or do we have to delete the previously created extended partition and create again with raw space ?

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Philipp Kern: PSA: LVM, pvmove and SSDs

If you use LVM with Wheezy on a solid-state drive, you really want to install the latest lvm2 update (i.e. 2.02.95-6, which contains the changes of -5). Otherwise, if you set issue_discards=1 in /etc/lvm/lvm.conf, you will experience severe data loss when using pvmove. Happened to me twice, once I didn’t care (chroot data being lost), the second time (today) I did. Not fun, especially when the backup of the data was scheduled for the same day.

One has to wonder why it takes three months for a bug that trashes data to reach testing. (Obviously I know the answer, but they’re not particularly good reasons.) Other distributions, like Ubuntu, were much quicker to notice and incorporate that fix. And in the case of the named distribution not because they auto-synced it from unstable. If somebody notices such a grave bug, please yell at people to get the fix out there to our users. Thanks. …read more
Source: FULL ARTICLE at Planet Ubuntu

Expanding a volume group with system-config-lvm

By mmulqu

Good morning,

I’m working in a lab that generates a good amount of data and we’ve just about filled our 9.1TB RAID.

The system is a Dell PowerEdge 2950 running Scientific Linux 5.4 with a PERC H800 and a Dell PowerVault MD1200. The MD1200 has 12 bays, 6 of which were filled with 2TB drives that made up the original 9.1TB RAID5.

Recently, I purchased 6 new 2TB disks and added them to the 6 empty bays in the MD1200. Then, using Dell OpenManage, I reconfigured the virtual disk, adding the 6 new disks and converting to RAID6. That process took about two weeks and I ended up with about a 18.2TB virtual disk.

Now, the problem I’m having is expanding the volume group, which is still 9.1TB. I’m using the system-config-lvm package. The physical partition with all of my data is /dev/sdb1 and the volume group is called vg-home.

When I select ‘vg-home Physical view’ it shows me the volume group and a button below it that says ‘Extend Volume Group‘. I click on that button and a new window (title ‘Extend Volume Group‘) pops up. In this window, one of my choices is /dev/sdb 9312.50GB Uninitialized Disk Entity. The only other choices are my non-LVM /boot and / partitions, /dev/sda1 and /dev/sda3. My understanding is that the uninitialized disk entity on /dev/sdb is all of the newly added, non-LVM disk space.

However, once I click OK, I get a warning that states “All data on disk entity /dev/sdb will be lost! Are you certain that you wish to initialize it?”. Unfortunately, I don’t have a test system so I want to be absolutely sure I’m doing this correctly. Is this uninitialized disk entity the new space? Does the warning mean that I’ll lose the data on the LVM partition /dev/sdb1 as well or is it just saying that, if there is any data in the uninitialized space, it will be erased?

Thank you,
Matt

Source: FULL ARTICLE at The UNIX and Linux Forums

Now that Kaptan has been ported, YALI’s waiting

By finid

Borrowing code or programs written by others is an accepted practice in the Free Software community. It is perfectly legal, being one of the core principles that defines Free Software. For open source or free software coders, it makes sense. Why write something from scratch when somebody else has already written it? Just take it and run, or take it and extend it.

One area I think that distro developers are overlooking with regards to reusing code concerns installation programs. Many distributions, especially those that are based on Ubuntu, have very easy-to-use, but plain-vanilla installers. Even the latest edition of Ubuntu’s installer is still not good enough (see Note to EFF: FDE implementation in Ubuntu’s Ubiquity is only at 50% and The state of manual LVM and full disk encryption configuration in Ubuntu’s Ubiquity).

A few distro developers have written new installers, but they are not even as good as Ubuntu’s plain-vanilla installer. A prime example is the installer on Linux Mint Debian Edition (LMDE). Another is Cinnarch‘s. That leaves me wondering why these new installers are being written when the developers could just port an existing one. I’m not a coder, so I do not know how easy or difficult the process is, but given that others have done it, I don’t think it should be that difficult, even when the installer that could be ported belongs to a distro from a different lineage.

Take Sabayon, a multi-purpose distribution based on Gentoo Linux. Its installer is a port of Anaconda, the Fedora Project’s installation program. So if Anaconda can be ported to Sabayon, it should not be that difficult to port YALI.

YALI (Yet Another Linux Installer) is the installer on Pardus, an original distribution (it is not based on any distribution). Development has, for now, ceased. And, as far as I know, it is not likely to be restarted, at least not by the original developers. Aside from YALI, Pardus has other applications that could be ported. The graphical firewall manager, the graphical package manager and Kaptan, the first boot application. Kaptan has already been ported to Chakra, a Linux distribution forked from Arch Linux.

So, what distribution could benefit the most from porting YALI? For one, Chakra, LMDE and Cinnarch could use YALI. Even Ubuntu and by extension, all the distributions that are derived and use its installer.

By my standards, YALI is not feature-complete, but it’s better than the installers of the above distributions. Aside from a beautiful user interface, it has support for LVM and RAID. It also has a restart feature, which is unique to it. The missing features are support for full disk encryption and boot loader password protection.

The following screen shots show most of the steps involved in using YALI.

YALI’s date picker.
Date Picker Pardus Linux

Time zone options on YALI.
Time zone settings

Setting up user accounts on YALI. The default user login setting is to require authentication to login.
User account configuration

Specifying the root account password and the hostname.
The root password and hostname

The four partitioning methods on YALI.
Partition methods

Disk partitioning schemes on YALI. LVM, the Linux Logical Volume Manager, and RAID are supported. LVM is the default partitioning scheme.
Partitioning schemes

LVM configuration options
LVM options

Selecting mount points.
Mount points

Supported file system types on YALI.
File system types on YALI

Boot loader configuration step on YALI. GRUB, the GRand Unufied Bootloader, is the boot loader on Pardus 2011. The GRUB version is 0.97, GRUB Legacy. Though YALI does not have support for setting a GRUB password, it is possible to do that after installation.
Boot loader options

I’m looking forward to the first distro developer who will port and extend YALI. Any takers?

Source: FULL ARTICLE at LinuxBSDos

Cinnarch preview

By finid

Cinnarch is a desktop Linux distribution based on Arch Linux and using the Cinnamon as the default and only supported desktop environment. Like Arch, it follows a rolling-release development model, which is an install-once-and-update-forever model that ensures that an installed system will never need to be reinstalled, even when a new version becomes available, except for those instances when, for one reason or the other, you just need to reinstall.

The project was started in the middle of last year and has been active since. This is my first look at this distribution, and from what I’ve seen, it is a beautiful distribution.

Here are just a few screen shots from a live system.

As with most distributions, you can test the Live system or install it on you hard drive without stopping at the Live desktop. Cinnarch offers two installation methods – CLI Installer and Graphical Installer. The graphical installer, called Cnchi, is still under development. That’s why it is not selectable in this window. You may read the latest news and some screen shots of it here.
CinnArch Live Installer

CLI Installer is actually a mouse-friendly ncurses installation program. This screen shot shows the options available.
CinnArch CLI Installer

The plain partitioning option (Auto-prepare), that is, no LVM, RAID or encryption configured, is very easy to use, even for new users.
CinnArch CLI Installer Partition

Cinnarch has a graphical package manager called PacmanXG.
CinnArch PacmanXG Graphical Installer

Here’s the main interface.
CinnArch PacmanXG Graphical Installer

And here are the options available.
CinnArch PacmanXG Graphical Installer

The package installer window could still use some work to make it more user-friendly.
CinnArch PacmanXG Packages

The default desktop.
CinnArch Cinnamon Desktop

The desktop showing the menu.
CinnArch Cinnamon Desktop Menu

The desktop with the menu showing installed Internet applications.
CinnArch Cinnamon Desktop Internet Apps

No Office suite or application is installed, just an installer for LibreOffice.
CinnArch Cinnamon Desktop Office Apps

Cinnamon desktop Settings options.
CinnArch Cinnamon Desktop Settings

You may download 32- and 64-bit installation images of Cinnarch here.

Source: FULL ARTICLE at LinuxBSDos

LVM Memory Usage

By ikn3

Hello
I am using LVM to create volumes.

After creating the volumes using “lvcreate” and then formating them as “ext3”.
I mounted these volumes to find around 40 -50GB space wasted.

Any suggestions why?

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 111G 16G 90G 15% /
/dev/sda1 99M 24M 71M 25% /boot
tmpfs 5.9G 0 5.9G 0% /dev/shm
/dev/mapper/vg_oracle-lv_u91
699G 197M 664G 1% /u91
/dev/mapper/vg_oracle-lv_u92
955G 200M 907G 1% /u92

Source: FULL ARTICLE at The UNIX and Linux Forums