I can't seem to change the / partition through the shell because it is always busy. Instead I created a /var partition using the guide Falko linked in an earlier post.
When I 'mount /dev/VolGroup/lv_var /var' everything mounted properly.
I replaced the line that was in /etc/fstab using the same configuration that the /home LV had and put it in exactly the same place in the file:
Code:
/dev/mapper/VolGroup-lv_var /var ext4 defaults 1 2
I then do a reboot and after about 5 minutes of booting, it comes to a shell that is continuously giving me the error message:
Code:
fcoemon: failed to connect to lldpad
fcoemon: error 111 Connection refused
I am still able to log in despite the contant error message overwriting my input, but when I look at /var contents this is all I see are three folders:
Code:
backup lock lost+found
At this point I'm thinking OH NO! I've lost all my data! All is lost!
So I rebooted with the disk and entered in recovery mode to try to find my lost data. It was still gone...
But, I was able to edit /etc/fstab and comment out the /var partition and then I tried to reboot from the local drive. It worked! My /var partition was back and all services were up and running seemingly normally!
I don't know for sure why this is so, but I'm assuming its because I'm now looking at the / partition version of /var. So I did:
/var backup:
Code:
cp -R /var /var_tmp
Mount the lv_var partition
Code:
mount /dev/VolGroup/lv_var /var
copied into the newly mounted version of /var
Code:
cp -R /var_tmp /var
Uncomment the lv_var partition in /etc/fstab then roboot
Code:
vi /etc/fstab
reboot
Failure.... I was back to the 5 minutes reboot and the constantly spamming 'fcoemon: Error' over my shell.
I logged in and saw that indeed the var_tmp directory had copied into my /var directory, but it copied the folder and not the contents.
So I spent some time researching cp more and found that I had done a couple things wrong. First, I should have used -a to make the backup and then to copy back onto the new partition to not only recursively copy, but to preserve links and file attributes. Second, I found that I should have used '/.' to copy contents.
So I tried to use vi to edit /etc/fstab but that constantly spamming fcoemon error was causing issues with vi. I really didn't want to have to use the cd again and boot into recovery mode, so i looked up fcoemon docs and found the process is called fcoe, and stopped it, and then commented out the /var partition so I could go back and copy correctly.
Code:
service fcoe stop
vi /etc/fstab
reboot
And then once rebooted, I backed up the / version of /var correctly, mounted the /var partition, and copied the backup correctly into /var. I had to click y to overwrite twice, i think they were hidden files, I clicked yes hoping that was the right thing to do. Then I uncommented out the /var partition in /etc/fstab, rebooted, and crossed my fingers:
Code:
cp -a /var /var_tmp2
mount /dev/VolGroup/lv_var /var
cp -a /var_tmp2/. /var
vi /etc/fstab
reboot
There were lots of shut down errors shutting down processes and umounting things, which didn't look promising at all... I think it was because I mounted the /var partition when services will still running on /var and didn't umount it before I rebooted. Hopefully there is no harm done....
Success! I have rebooted with all services up and running seeming well, and the /var partition now has most the space that the /home partition had. 'df -h' shows 864G, but 'lvdisplay' shows 877.39, just like I had entered it when creating it. I've lost 13.39G somewhere. I'm not sure why. Maybe someone can explain this?
I also still don't understand how I am supposed to be able to change the size of the / logical volume when there are tons of unstoppable processes on it? If someone can please explain that too.
Thanks! Hope my troubles save someone else some!
Recent comments
11 hours 21 min ago
16 hours 20 min ago
17 hours 46 min ago
18 hours 39 min ago
20 hours 22 min ago
1 day 46 min ago
1 day 1 hour ago
1 day 3 hours ago
1 day 16 hours ago
1 day 18 hours ago