[SOLVED] [Debian] Why is Debian looking for a deleted LV on boot?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
[Debian] Why is Debian looking for a deleted LV on boot?
I've decided to resize my LVM LV volumes and reduce my PV to free up some space for an experimental installation of Windows XP.
I used Parted Magic to firstly do an lvresize/lvreduce to shrink my root LV, and that went fine.
I then went to do a pvreduce but that errored out saying there were extents already allocated -- so I figure that it was the swap LV -- named "swap_1".
So I did an lvremove then lvcreate and called the new swap space it "swaparea". All good, and the pvreduce then worked OK. I mounted my local disk and updated the fstab to point to the new swap LV. Saved and rebooted.
It booted fine, but I noticed that during the boot, Debian complained about being unable to find the LV swap_1.
So, what I'm curious about is why is Debian looking for swap_1 when I deleted it and made sure fstab reflected that? If I rename it back to swap_1, it doesn't complain, but is there another location that Debian stores LV information aside from fstab?
It would appear to me that Debian is designed to look for the LV swap_1 when it boots, you might have to dive deeper into the OS to fix the problem; possibly changing the kernel around to reflect the changes that you wish to have in your Swap file.
I have no idea what the problem might be, as I haven't run into anything like that, but I do know that Debian is designed to look for whatever swap partition it is directed to upon install; it's not hardwired to anything. My swap is on /dev/sda5.
By default, Debian does not use LVM.
You might find something in your log files, in particular in /var/log/messages or /var/log/message.1 (if your log files have recently rotated). If you can find where a something referring to "swap_1" that might help.
You could try rebooting and then, after logging in,
cat /var/log/messages | grep swap_1
tail -10000 /var/log/messages | grep swap_1
If you find relevant messages, post them here, being sure to surround them with "code" tags, which become available when you click the "Go Advanced" button at the bottom of the quick reply window.
Is it possible to rename the new swap back to swap_1?
Yes, and that's how I've removed the warning message at the moment, but I like to know why errors or warnings pop up in the first place. I need to resize my PV some more anyway, so I'll do the rename with that and try frankbell's suggestions and see what turns up.
Jun 19 05:16:49 NC6320 kernel: [ 3834.995941] Adding 3997692k swap on /dev/mapper/NC6320-swap_1. Priority:-1 extents:1 across:3997692k
Jun 19 05:17:30 NC6320 kernel: [ 3875.845050] Adding 3997692k swap on /dev/mapper/NC6320-swap_1. Priority:-1 extents:1 across:3997692k
Jun 19 18:04:29 NC6320 kernel: [ 5797.237267] Adding 3997692k swap on /dev/mapper/NC6320-swap_1. Priority:-1 extents:1 across:3997692k
But these were from before I resized and renamed the swap. Now, after that, there's one mention of "swaparea" (which is my new swap partition name):
Jun 19 19:27:28 NC6320 kernel: [ 10.896174] Adding 4038652k swap on /dev/mapper/NC6320-swaparea. Priority:-1 extents:1 across:4038652k
So the logs indicate it is OK, but I did get the error during boot regarding Debian being unable to find a specified logical volume: swap_1, so mystery is still there - the LV doesn't exist, but Debian still looks for it.
Yes, most operating systems are pre-programmed to look for a SWAP partition and to scream if there isn't one installed. The only way that you can get around the problem is to program the kernel itself not to look for the SWAP partition. You might try the Debian mailing lists as well to see if any one else has any ideas.