LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 06-17-2013, 03:33 PM   #1
blenderfox
LQ Newbie
 
Registered: Apr 2013
Location: London, UK
Distribution: Debian, Ubuntu, Linux Mint, Fedora
Posts: 24

Rep: Reputation: Disabled
[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?
 
Old 06-17-2013, 08:29 PM   #2
Nbiser
Member
 
Registered: Oct 2012
Location: Maryland
Distribution: Fedora, Slackware, Debian, Ubuntu, Knoppix, Helix,
Posts: 302
Blog Entries: 7

Rep: Reputation: 44
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.

Cheers,
Nbiser
 
Old 06-18-2013, 12:09 AM   #3
blenderfox
LQ Newbie
 
Registered: Apr 2013
Location: London, UK
Distribution: Debian, Ubuntu, Linux Mint, Fedora
Posts: 24

Original Poster
Rep: Reputation: Disabled
I'd be surprised if that was the case, and Debian was "hard wired" to look for "swap_1". I'll have to hunt around some more.
 
Old 06-18-2013, 07:33 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,340
Blog Entries: 12

Rep: Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730
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,

Code:
cat /var/log/messages | grep swap_1
or

Code:
tail -10000 /var/log/messages | grep swap_1
for starts.

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.

Last edited by frankbell; 06-18-2013 at 07:35 PM.
 
Old 06-19-2013, 02:14 AM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Is it possible to rename the new swap back to swap_1?
 
Old 06-19-2013, 02:43 AM   #6
blenderfox
LQ Newbie
 
Registered: Apr 2013
Location: London, UK
Distribution: Debian, Ubuntu, Linux Mint, Fedora
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by EDDY1 View Post
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.
 
Old 06-19-2013, 02:43 PM   #7
blenderfox
LQ Newbie
 
Registered: Apr 2013
Location: London, UK
Distribution: Debian, Ubuntu, Linux Mint, Fedora
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
Code:
cat /var/log/messages | grep swap_1
or

Code:
tail -10000 /var/log/messages | grep swap_1
There are mentions of swap_1 in my log:

Code:
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):

Code:
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.
 
Old 06-19-2013, 03:08 PM   #8
blenderfox
LQ Newbie
 
Registered: Apr 2013
Location: London, UK
Distribution: Debian, Ubuntu, Linux Mint, Fedora
Posts: 24

Original Poster
Rep: Reputation: Disabled
Found something else as well. I did a bit more brute force rummaging by doing this:

Code:
# find -type f -exec echo {} \; -exec grep -Ei ".*swap_1.*" {} \; >searching
Crude, inefficient, but it gets the job done.

Then, I checked the output to see what (if anything was found). And I found something. Buried amongst loads of non-finds:

Code:
./etc/initramfs-tools/conf.d/resume
RESUME=/dev/mapper/NC6320-swap_1

./etc/blkid.tab.old
<device DEVNO="0xfe01" TIME="1371575580.303211" PRI="45" UUID="bf948a88-7be4-4517-a18a-afe97e26faac" TYPE="swap">/dev/mapper/NC6320-swap_1</device>

./etc/lvm/archive/NC6320_00001-86968445.vg
		swap_1 {

./etc/lvm/archive/NC6320_00003-2029671037.vg
		swap_1 {

./etc/lvm/archive/NC6320_00002-56847306.vg
		swap_1 {

./etc/lvm/archive/NC6320_00000-539896772.vg
		swap_1 {

./etc/lvm/backup/NC6320
		swap_1 {

./etc/blkid.tab
<device DEVNO="0xfe01" TIME="1371583077.85361" PRI="45" UUID="bf948a88-7be4-4517-a18a-afe97e26faac" TYPE="swap">/dev/mapper/NC6320-swap_1</device>
Maybe this might help pinpointing the problem.
 
Old 06-19-2013, 04:52 PM   #9
Nbiser
Member
 
Registered: Oct 2012
Location: Maryland
Distribution: Fedora, Slackware, Debian, Ubuntu, Knoppix, Helix,
Posts: 302
Blog Entries: 7

Rep: Reputation: 44
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.
 
Old 06-19-2013, 05:01 PM   #10
blenderfox
LQ Newbie
 
Registered: Apr 2013
Location: London, UK
Distribution: Debian, Ubuntu, Linux Mint, Fedora
Posts: 24

Original Poster
Rep: Reputation: Disabled
Okay, mailing list it is then. I'll update this thread if I find anything else in the meantime.
 
Old 06-20-2013, 12:38 PM   #11
blenderfox
LQ Newbie
 
Registered: Apr 2013
Location: London, UK
Distribution: Debian, Ubuntu, Linux Mint, Fedora
Posts: 24

Original Poster
Rep: Reputation: Disabled
Okay, after some email bouncing on the users mailing list, found the problem. In my system, inside the initramfs, it declares the resume location in

Code:
/etc/initramfs-tools/conf.d/resume
In my case, it was:

Code:
RESUME=/dev/mapper/NC6320-swap_1
Changing this to

Code:
RESUME=/dev/mapper/NC6320-swaparea
would change the location Debian goes to for the resume data.

You then need to rebuild the initramfs:

Code:
# update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.2.0-4-686-pae
So the error message I was getting on boot was the system looking for the resume data. This also explains why resuming broke when the swap partition was lvrename'd.

Last edited by blenderfox; 06-22-2013 at 07:36 AM.
 
Old 06-21-2013, 12:47 PM   #12
Nbiser
Member
 
Registered: Oct 2012
Location: Maryland
Distribution: Fedora, Slackware, Debian, Ubuntu, Knoppix, Helix,
Posts: 302
Blog Entries: 7

Rep: Reputation: 44
Quote:
Originally Posted by blenderfox View Post
Okay, after some email bouncing on the users mailing list, found the problem. In my system, inside the initramfs, it declares the resume location in

Code:
/etc/initramfs-tools/conf.d/resume
In my case, it was:

Code:
RESUME=/dev/mapper/NC6320-swap_1
You then need to rebuild the initramfs:

Code:
# update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.2.0-4-686-pae
So the error message I was getting on boot was the system looking for the resume data. This also explains why resuming broke when the swap partition was lvrename'd.
Makes sense! Thanks for posting the solution.

Cheers,
Nbiser
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub issues: dual boot Debian i386 & Debian amd64 ErrorBound Debian 1 03-09-2007 08:41 PM
Dual boot Debian Etch and XP with GRUB - Debian installed First - one HDD bence8810 Debian 11 01-07-2007 11:45 AM
Debian - launchers deleted when librxtx-java installed ben_dsr Linux - Newbie 2 02-22-2005 11:49 AM
Accidentally deleted debian partition PLZ HELP andymadigan Debian 7 09-01-2004 11:09 PM
Debian Woody - /etc/profile deleted Gumbo Linux - Distributions 1 10-15-2002 06:32 AM


All times are GMT -5. The time now is 02:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration