LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-01-2019, 03:14 AM   #1
isolatedsh33p
LQ Newbie
 
Registered: Dec 2009
Posts: 13

Rep: Reputation: 2
Sudo & su is slow


Hi guys, recently I deleted the /var partition since I wrongly resize it. After deleting, the sudo & su command are now slow. Any idea what I can do to fix this?
 
Old 02-01-2019, 07:49 AM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,839

Rep: Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198
Quote:
Originally Posted by isolatedsh33p View Post
Hi guys, recently I deleted the /var partition since I wrongly resize it. After deleting, the sudo & su command are now slow. Any idea what I can do to fix this?
Ok, I rather hope that this is a joke (it did make me laugh). If it is not, you are very lucky that your system still runs at all: you have wiped out a LOT of critical locations and removed a running resource for many processes.

DO YOU HAVE A BACKUP? If you can recreate /var and restore the contents before you reboot it may get you back.

If no backup, you might try recreating /var using ownership root/root permissions 755.
Under that the contents depend upon what version of what distribution you have, and what features you have installed.
Most of it is not likely to be recoverable without a backup. To get it REALLY right you may need a reinstall, but recreating SOME of it will give you a better running system and time to back up critial settings and files.

Under /var I would create run a symbolic link to /run, and lock a link to /run/lock.
You might also create folders cache, log, snap, and spool. (root/root and 755 each) it is probably poinless to recreate mail, lib, local, backups, or other possible folders as you have no content to populate them.
Try anyway. Also create /var/tmp with premissions 777.

This is not a recovery, only a quick fix of enough to help. Please let us know how you get on.
 
2 members found this post helpful.
Old 02-07-2019, 03:17 PM   #3
isolatedsh33p
LQ Newbie
 
Registered: Dec 2009
Posts: 13

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by wpeckham View Post
Ok, I rather hope that this is a joke (it did make me laugh). If it is not, you are very lucky that your system still runs at all: you have wiped out a LOT of critical locations and removed a running resource for many processes.

DO YOU HAVE A BACKUP? If you can recreate /var and restore the contents before you reboot it may get you back.

If no backup, you might try recreating /var using ownership root/root permissions 755.
Under that the contents depend upon what version of what distribution you have, and what features you have installed.
Most of it is not likely to be recoverable without a backup. To get it REALLY right you may need a reinstall, but recreating SOME of it will give you a better running system and time to back up critial settings and files.

Under /var I would create run a symbolic link to /run, and lock a link to /run/lock.
You might also create folders cache, log, snap, and spool. (root/root and 755 each) it is probably poinless to recreate mail, lib, local, backups, or other possible folders as you have no content to populate them.
Try anyway. Also create /var/tmp with premissions 777.

This is not a recovery, only a quick fix of enough to help. Please let us know how you get on.
No I didn't backup.

All the symlinks are apparently created for me once I reboot. If there are programs that failed to run due to folder not found, I'd created it for the app and restart the program and then it'll work. Since I've removed my dnf cache (I'm using Fedora), I have to rebuild the cache and install programs one by one (e.g. the kernel, sudo, ssd, etc.)

I still haven't solve the sudo & su slow issue though.

* EDIT *

Ok, solved for this issue by reinstalling systemd services were that failed to be started.
Quote:
[root@localhost ~]# systemctl list-units --state=failed
UNIT LOAD ACTIVE SUB DESCRIPTION
● var-lib-nfs-rpc_pipefs.mount loaded failed failed RPC Pipe File System
● auditd.service loaded failed failed Security Auditing Service
● fprintd.service loaded failed failed Fingerprint Authentication Daemon
● gssproxy.service loaded failed failed GSSAPI Proxy Daemon
● upower.service loaded failed failed Daemon for power management

Last edited by isolatedsh33p; 02-07-2019 at 04:00 PM.
 
Old 02-07-2019, 03:35 PM   #4
sevendogsbsd
Member
 
Registered: Sep 2017
Distribution: None, just FreeBSD
Posts: 735

Rep: Reputation: Disabled
There are no applications under /var, it's a system directory. Almost would be easier to save off your data and just reinstall but if you got it working...
 
Old 02-07-2019, 03:55 PM   #5
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 2,560

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
Quote:
Originally Posted by sevendogsbsd View Post
There are no applications under /var, it's a system directory. Almost would be easier to save off your data and just reinstall but if you got it working...
Um. I'm not sure that's true. On my server, /var is where all the qmail executables reside, also webmin and usermin. /var/log contains all the log files (which may be the reason things are slow...no log file location.

What you say might be true on another distro (mine is CentOS 7), tho.

I agree. Backup data and reinstall is probably the best fix. I don't think they've got it working.
 
Old 02-07-2019, 04:03 PM   #6
isolatedsh33p
LQ Newbie
 
Registered: Dec 2009
Posts: 13

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by sevendogsbsd View Post
There are no applications under /var, it's a system directory. Almost would be easier to save off your data and just reinstall but if you got it working...
Quote:
Originally Posted by scasey View Post
Um. I'm not sure that's true. On my server, /var is where all the qmail executables reside, also webmin and usermin. /var/log contains all the log files (which may be the reason things are slow...no log file location.

What you say might be true on another distro (mine is CentOS 7), tho.

I agree. Backup data and reinstall is probably the best fix. I don't think they've got it working.
I'm using Fedora. The reason that I'm so brave to delete the whole /var folder is because on Fedora, it's now on separate partition by default, and it contains files in order for application to run. If you delete it, your kernel will still there for you to survive.

Anyhow, I've solved this issue by reinstalling systemd services that were failed to be started (see my post above).
 
Old 02-07-2019, 04:11 PM   #7
sevendogsbsd
Member
 
Registered: Sep 2017
Distribution: None, just FreeBSD
Posts: 735

Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
Um. I'm not sure that's true. On my server, /var is where all the qmail executables reside, also webmin and usermin. /var/log contains all the log files (which may be the reason things are slow...no log file location.

What you say might be true on another distro (mine is CentOS 7), tho.

I agree. Backup data and reinstall is probably the best fix. I don't think they've got it working.
Interesting - I was always under the impression executables were exclusively under /bin /sbin and the corresponding directories under /usr, or under /opt. I always learn something new though so thanks for the info.
 
Old 02-07-2019, 04:13 PM   #8
sevendogsbsd
Member
 
Registered: Sep 2017
Distribution: None, just FreeBSD
Posts: 735

Rep: Reputation: Disabled
Quote:
Originally Posted by isolatedsh33p View Post
I'm using Fedora. The reason that I'm so brave to delete the whole /var folder is because on Fedora, it's now on separate partition by default, and it contains files in order for application to run. If you delete it, your kernel will still there for you to survive.
Just because /var is a separate partition does not mean it was meant to be deleted, but it's your system so you are free to break it if you wish. I have no earthly idea why someone would want to do that.
 
Old 02-07-2019, 04:22 PM   #9
isolatedsh33p
LQ Newbie
 
Registered: Dec 2009
Posts: 13

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by sevendogsbsd View Post
Just because /var is a separate partition does not mean it was meant to be deleted, but it's your system so you are free to break it if you wish. I have no earthly idea why someone would want to do that.
I didn't delete it for fun. I was trying to resize the /var partition but I didn't do it properly causing it to be corrupted (all I need to do is probably execute resize2fs before I restart), hence I delete the partition and created a new one. This is my home laptop so I don't worry that much.
 
1 members found this post helpful.
Old 02-09-2019, 09:36 AM   #10
sevendogsbsd
Member
 
Registered: Sep 2017
Distribution: None, just FreeBSD
Posts: 735

Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
Um. I'm not sure that's true. On my server, /var is where all the qmail executables reside, also webmin and usermin. /var/log contains all the log files (which may be the reason things are slow...no log file location.

What you say might be true on another distro (mine is CentOS 7), tho.

I agree. Backup data and reinstall is probably the best fix. I don't think they've got it working.
A little late but just FYI, in case you are curious...on FreeBSD, /var does not contain any executables. From the "hier" man page showing the file system:

Code:
/var/ multi-purpose log, temporary, transient, and spool files
Was curious myself so had to check...
 
Old 02-09-2019, 10:50 AM   #11
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,143

Rep: Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873
Have fun trying to update now that you have wiped out the RPM database in /var/lib/rpm and the PackageKit database in /var/lib/PackageKit. A lot of system utilities maintain state information under /var/lib, and you have lost all of that.

If you actually intend to use that system for something, you should reinstall.
 
2 members found this post helpful.
  


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
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
sudo apt-get update && sudo apt-get upgrade hallve_revera Linux - Newbie 6 01-10-2009 09:37 AM
AOL UK && BT Voyager 100 && Slackware 10.2 && RP-PPPoE pitt0071 Linux - Networking 3 01-17-2006 06:10 AM
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 12:39 PM
Gotta love those ٱٱٱٱٱٱٱ&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:26 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