LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   messed with swapfile (https://www.linuxquestions.org/questions/linux-newbie-8/messed-with-swapfile-4175529253/)

sushdba 12-26-2014 12:59 AM

messed with swapfile
 
1 Attachment(s)
I have messed with my swapfile , getting following errors.
******
1 logical volume(S) in volume group "VolGroup00" now actice0/LogVol00 rhgb qu
Unable to access resume devices (/dev/Volgroup00/LogVol01)
VFS: Cant find ext filesystem on dev dm-0.40]
mount: error mounting /dev/root on /sys/root as ext3 : invalid argument
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: mont failed: No such file or directory
kernel panic - not syncing : Attempted to kill init!

syg00 12-26-2014 01:16 AM

Well unmess it, and maybe you won't get those messages.

Ridiculous post - how can we even begin to help if we (you) don't know what you did.

sushdba 12-26-2014 01:38 AM

I tried to increase the swap space , unsuccesfuly . I given the command swapoff /dev/Volgroup00/LogVol01 , it says invalid argumnet. So I fired another command mkfs swap /dev/Volgroup00/LogVol01 .

syg00 12-26-2014 03:51 AM

Quote:

Originally Posted by sushdba (Post 5290591)
I given the command swapoff /dev/Volgroup00/LogVol01 , it says invalid argumnet.

That probably means you issued the command twice - no harm.
Quote:

So I fired another command mkfs swap /dev/Volgroup00/LogVol01 .
That should have failed, and not done anything.

I'd say you aren't telling us everything. So, I can't help you.

rknichols 12-26-2014 11:58 AM

From the looks of it you also clobbered your root filesystem on LogVol00. My guess is that you accidentally ran
Code:

mkswap /dev/Volgroup00/LogVol00
As long as that LV was not actually used as swap, that should be recoverable by booting from rescue media and running fsck on that LV. It should find one of the backup super blocks.

sushdba 12-27-2014 12:01 AM

Thank you rknichols Sir , You are right , this is what has happened. I request you to please provide me documentation or link for this to resolve.

fsck command says: The superblock could not be read or does not describes a correct ext2 filesystem. If the device is valid and it really contain ext2 filesystem(and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternative superblock : e2fsck -b 8193 <device>

rknichols 12-27-2014 10:47 AM

From what Linux distribution are you running the fsck? What is the version of fsck.ext3 (should be in the first line of output when you run "fsck.ext3 /dev/Volgroup00/LogVol00")? The versions of fsck that I have all look automatically for backup super blocks.

Also, let's be sure of these VG and LV names. There is some inconsistency in your posts ("VolGroup00" vs. "Volgroup00"). What is the output when you run "lvs"?


All times are GMT -5. The time now is 03:26 AM.