LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   13.1 install LIBATA switch, LUKS, LVM, initrd, and lots of disks (https://www.linuxquestions.org/questions/slackware-installation-40/13-1-install-libata-switch-luks-lvm-initrd-and-lots-of-disks-818015/)

Z038 07-04-2010 08:25 PM

13.1 install LIBATA switch, LUKS, LVM, initrd, and lots of disks
 
I successfully upgraded to 13.1 on my smallest desktop system that has only one disk drive. The device name went from hda1 to sda1 in the process. I was expecting that because of the CHANGES_AND_HINTS.TXT. The LIBATA switchover tips steps 3 and 4 didn't work as described with my LUKS encryption and LVM setup, but I knew what I had to do, so no problem.

Now I'm going to upgrade my big desktop system, and I have a question about the LIBATA switchover and the device renaming that will occur. This system has six disk drives. My boot drive currently is /dev/sda1, and Linux is installed in sda and sdb drives using LUKS and LVM.

Quote:

# fdisk -l | grep GB
Disk /dev/hda: 81.9 GB, 81964302336 bytes
Disk /dev/hdc: 81.9 GB, 81964302336 bytes
Disk /dev/hdd: 80.0 GB, 80054059008 bytes
Disk /dev/sda: 300.0 GB, 300090728448 bytes
Disk /dev/sdb: 300.0 GB, 300090728448 bytes
Disk /dev/sdc: 250.0 GB, 250059350016 bytes
CHANGES_AND_HINTS says this in the LIBATA SWITCHOVER section:

Quote:

2. Edit /etc/fstab to reflect the change from hd* to sd*.

If you have multiple SATA devices, and especially if you have some of
both hd* and sd* devices present already, then you're basically going
to be playing a guessing game right now, and you probably want to
consider using some of the persistent symlinks in the /dev/disk/by-*/
directories instead of raw device nodes -- for example, the links in
/dev/disk/by-id/ should always point to the same device, even if its
raw device node changes from e.g. sda1 to sdc1 or some such across
reboots.

* If you are using one of the generic kernels (requiring an initrd),
then use the sd* name for the root device when creating the image.
I understand that this is saying that I should change any /dev/sd* or /dev/hd* names in my /etc/fstab to the corresponding /dev/disk/by-id/* name because it should remain the same. Will LVM names in fstab like /dev/vg00/root still work, or will I need to change those too?

Then it says to use the sd* name for the root device when creating the initrd. My current boot partition has raw device name /dev/sda1. Will this change at initial install with the LIBATA switchover, or during reboots? If it can change at any reboot, then how do you make an initrd to refer to the proper device? How do you know what the device will be in advance in order to make the initrd? If there's no way to know, then I believe I can boot from the install DVD after the upgrade is complete, run the cryptsetup LUKSOPEN, vgscan, vgmount, mount the encrypted LVM root, chroot into it, mount the /boot partition, and run fdisk -l to see what I have. Then build the initrd, update and run LILO, and boot. But if it could change at any reboot, that will be inconvenient.

If anyone can shed some light on what I might expect to see or answer any of my questions, I'd appreciate it. I'm hoping to minimize downtime on this system.

GazL 07-05-2010 04:28 PM

Best thing to do is boot the install cd and have a look at what changed to what from its command line. I can't say for certain as I didn't burn one this time, but I'd expect devices to have the same name in the install cd's shell as they will on your new running system after the install.

LVM won't care what device name it finds your PV on (it checks them all by default), but you'll need to find the correct names to pass to cryptsetup/luksopen via the mkinitrd -C option.


All times are GMT -5. The time now is 05:35 PM.