resize2fs not resizing the filesystem size equal to disk size? - filesystems

While trying online file system resize. I see the file system size is less than the disk size by 2MB.
Can not figure out what is the issue.
Tried with ext3/ext4 file system. I see same issue.
I see these logs in dmesg again and again.
dmesg,
[Fri Feb 10 04:12:11 2023] EXT4-fs (nvme1n1): resizing filesystem from 168460288 to 168460800 blocks
[Fri Feb 10 04:12:11 2023] EXT4-fs (nvme1n1): resized filesystem to 168460800
[Fri Feb 10 04:13:34 2023] EXT4-fs (nvme1n1): resizing filesystem from 168460288 to 168460800 blocks
[Fri Feb 10 04:13:34 2023] EXT4-fs (nvme1n1): resized filesystem to 168460800
[Fri Feb 10 04:15:36 2023] EXT4-fs (nvme1n1): resizing filesystem from 168460288 to 168460800 blocks
[Fri Feb 10 04:15:36 2023] EXT4-fs (nvme1n1): resized filesystem to 168460800
[Fri Feb 10 04:17:38 2023] EXT4-fs (nvme1n1): resizing filesystem from 168460288 to 168460800 blocks
[Fri Feb 10 04:17:38 2023] EXT4-fs (nvme1n1): resized filesystem to 168460800
[Fri Feb 10 04:19:40 2023] EXT4-fs (nvme1n1): resizing filesystem from 168460288 to 168460800 blocks
[Fri Feb 10 04:19:40 2023] EXT4-fs (nvme1n1): resized filesystem to 168460800
[Fri Feb 10 04:21:42 2023] EXT4-fs (nvme1n1): resizing filesystem from 168460288 to 168460800 blocks
[Fri Feb 10 04:21:42 2023] EXT4-fs (nvme1n1): resized filesystem to 168460800
[Fri Feb 10 04:23:44 2023] EXT4-fs (nvme1n1): resizing filesystem from 168460288 to 168460800 blocks
[Fri Feb 10 04:23:44 2023] EXT4-fs (nvme1n1): resized filesystem to 168460800
[Fri Feb 10 04:25:47 2023] EXT4-fs (nvme1n1): resizing filesystem from 168460288 to 168460800 blocks
[Fri Feb 10 04:25:47 2023] EXT4-fs (nvme1n1): resized filesystem to 168460800
Online resize of file system ext3/4

Related

How to use Selenium with Firefox browser when I have no display

I am newly assigned to this shared hosting (ssh access only). Have no sudo or yum facility. I am trying to scrape some data from a dynamically loaded website [So, can't use scrapy or bs]. When I am using Selenium, it gives an error:
/home/sanelywr/voyager-bot/app.py:28: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
driver = webdriver.Firefox(options=options, executable_path=gecko_path)
Traceback (most recent call last):
File "/home/sanelywr/voyager-bot/app.py", line 28, in <module>
driver = webdriver.Firefox(options=options, executable_path=gecko_path)
File "/home/sanelywr/virtualenv/voyager-bot/3.9/lib/python3.9/site-packages/selenium/webdriver/firefox/webdriver.py", line 180, in __init__
RemoteWebDriver.__init__(
File "/home/sanelywr/virtualenv/voyager-bot/3.9/lib/python3.9/site- packages/selenium/webdriver/remote/webdriver.py", line 275, in __init__
self.start_session(capabilities, browser_profile)
File "/home/sanelywr/virtualenv/voyager-bot/3.9/lib/python3.9/site- packages/selenium/webdriver/remote/webdriver.py", line 365, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/sanelywr/virtualenv/voyager-bot/3.9/lib/python3.9/site- packages/selenium/webdriver/remote/webdriver.py", line 430, in execute
self.error_handler.check_response(response)
File "/home/sanelywr/virtualenv/voyager-bot/3.9/lib/python3.9/site- packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 1
When checking the geckodriver.log it says,
1653393333249 geckodriver INFO Listening on 127.0.0.1:33457
1653393333256 mozrunner::runner INFO Running command: "/home/sanelywr/voyager-bot/firefox/firefox" "--marionette" "--headless" "--no-sandbox" "-headless" "--disable-dev-shm-usage" "--remote-debugging-port" "37442" "--remote-allow-hosts" "localhost" "-no-remote" "-profile" "/tmp/rust_mozprofilei8tj67"
(firefox:28332): Gtk-WARNING **: 07:55:33.285: Locale not supported by C library.
Using the fallback 'C' locale.
**Error: no display specified**
Apparently, I have no screen on this server as I have checked by the following command:
$ echo $DISPLAY
It displays nothing.
I have already set the browser option to headless mode [within the python code].
And, I have also done the following:
$ export MOZ_HEADLESS = 1
And yes, I cannot use the virtual screen like xvfb because even when I am able to pip install the related wrapper, I still cannot install xvfb because I don't have sudo or yum [and cannot find a .tar.bz2 or tar.gz file].
How can I run the selenium browser without having to open the browser on any screen altogether? [Tried PhantomJS() too, even that's not working]
My python script :
import os
from credentials import API_KEY, API_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
#from pyvirtualdisplay.xephyr import XephyrDisplay
#from pyvirtualdisplay import Display
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
import tweepy
auth = tweepy.OAuthHandler(API_KEY, API_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
api = tweepy.API(auth)
options = Options()
options.add_argument("--headless")
options.add_argument('--no-sandbox')
options.headless= True
#options = webdriver.ChromeOptions()
#options.add_argument('--no-sandbox')
options.add_argument("--disable-dev-shm-usage")
#options.binary_location = '/home/sanelywr/voyager-bot'
#driver = webdriver.Chrome(executable_path='./chromedriver', options=options)
#driver = webdriver.PhantomJS()
gecko_path = '/home/sanelywr/voyager-bot/geckodriver'
options.binary=FirefoxBinary('/home/sanelywr/voyager-bot/firefox/firefox')
#display = XephyrDisplay()
#display = Display(visible=0, size=(800, 600))
#display.start()
driver = webdriver.Firefox(options=options, executable_path=gecko_path)
url=""
driver.get(url)
#<-----------Some code for extracting some elements from the page----------------->
#driver.quit()
#display.stop()
My script folder:
drwxr-xr-x 4 sanelywr sanelywr 4.0K Jan 24 2016 phantomjs-2.1.1-linux-x86_64
-rw-rw-r-- 1 sanelywr sanelywr 23M Jan 24 2016 phantomjs-2.1.1-linux-x86_64.tar.bz2
drwxr-xr-x 7 sanelywr sanelywr 4.0K Apr 7 2016 firefox
-rw-rw-r-- 1 sanelywr sanelywr 50M Apr 11 2016 firefox-45.0.2.tar.bz2
-rwxr-xr-x 1 sanelywr sanelywr 8.3M Apr 6 11:54 geckodriver
drwxr-xr-x 2 sanelywr sanelywr 4.0K May 23 02:09 public
drwxr-xr-x 2 sanelywr sanelywr 4.0K May 23 02:09 tmp
-rw-r--r-- 1 sanelywr sanelywr 145 May 23 02:09 passenger_wsgi.py
-rw-r--r-- 1 sanelywr sanelywr 326 May 23 02:30 credentials.py
-rw-r--r-- 1 sanelywr sanelywr 0 May 23 02:31 temp.txt
-rw-r--r-- 1 sanelywr sanelywr 16 May 23 02:36 requirements.txt
drwxrwxr-x 2 sanelywr sanelywr 4.0K May 23 06:29 __pycache__
-rw-r--r-- 1 sanelywr sanelywr 8.3M May 24 05:26 geckodriver-v0.31.0-linux64.tar
-rw-r--r-- 1 sanelywr sanelywr 1.9K May 24 07:24 app.py
-rw-rw-r-- 1 sanelywr sanelywr 4.8K May 24 07:55 geckodriver.log

How to change user/group uid/gid in LXC container and affecting the used files/directorys

In a fresh Debian 11 container I installed urbackup.
In the container the uid/gid from urbackup is 107/115.
I needed to bind mounted a zfs dataset to store the actual backups..
Therefore I changed in lxc the urbackup user/group.
root#urBackup:~# usermod -u 1005 urbackup
root#urBackup:~# groupmod -g 1005 urbackup
It seems though that some directory's stil had old uid/gid
root#urBackup:~# ls -al /var/urbackup
total 108012
drwxr-xr-x 3 nobody 115 4096 Apr 19 05:54 .
drwxr-xr-x 12 root root 4096 Apr 19 05:46 ..
-rwxr-x--- 1 nobody 115 35044777 Apr 19 05:47 UrBackupUpdate.exe
-rwxr-x--- 1 nobody 115 40 Apr 19 05:47 UrBackupUpdate.sig
-rwxr-x--- 1 nobody 115 102 Apr 19 05:47 UrBackupUpdata.sig2
Is there a easy way to change also the directory's and files belonging to a certain user/group.
Thanks for reading
Guy

How to install Aerospike on Mac?

I tried following: https://www.aerospike.com/docs/operations/install/vagrant/mac/
and did following:
mkdir aerospike-vm
cd aerospike-vm
vagrant init aerospike/aerospike-ce
This creates Vagrantfile in the same directory.
Next I try:
vagrant up
Getting error:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'aerospike/aerospike-ce' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'aerospike/aerospike-ce' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/aerospike/aerospike-ce"]
Error: The requested URL returned error: 404 Not Found
What is the proper procedure to install Aerospike on Mac?
Thanks
I recorded this few months ago along with two other videos in this set. See if this youtube video helps you out: https://www.youtube.com/watch?v=qm42c0juam4&list=PLGo1-Ya-AEQDa32hFggyB0yIIOldxUFwv&index=3
Here is the output from my run:
Administrators-MacBook-Pro-4:aerospike-vm piyush$ ls -al
total 8
drwxr-xr-x 4 piyush staff 128 Apr 9 2018 .
drwxr-xr-x+ 54 piyush staff 1728 Jan 18 10:56 ..
drwxr-xr-x 3 piyush staff 96 Apr 9 2018 .vagrant
-rw-r--r-- 1 piyush staff 3029 Apr 9 2018 Vagrantfile
Administrators-MacBook-Pro-4:aerospike-vm piyush$ mv Vagrantfile Vagrantfile_old
Administrators-MacBook-Pro-4:aerospike-vm piyush$ vagrant init aerospike/aerospike-ce
==> vagrant: A new version of Vagrant is available: 2.2.3!
==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
Administrators-MacBook-Pro-4:aerospike-vm piyush$ ls -al
total 16
drwxr-xr-x 5 piyush staff 160 Jan 31 14:13 .
drwxr-xr-x+ 54 piyush staff 1728 Jan 18 10:56 ..
drwxr-xr-x 3 piyush staff 96 Apr 9 2018 .vagrant
-rw-r--r-- 1 piyush staff 3029 Jan 31 14:13 Vagrantfile
-rw-r--r-- 1 piyush staff 3029 Apr 9 2018 Vagrantfile_old
Administrators-MacBook-Pro-4:aerospike-vm piyush$

Why is goapp test is looking for files in /tmp?

I'm trying to get tests working on my local dev machine Cloud SDK version is: 159.0.0
Everything I've read says that I should no change GOROOT so I'm not sure how to fix this.
$ /Users/bryan/google-cloud-sdk/platform/google_appengine/goroot/bin/goapp test
go: cannot find GOROOT directory: /tmp/go_sdk887571938/appengine/go_appengine/goroot
bryan#Bryans-MacBook Thu Jun 15 10:22:37 ~/go/src/skincarereview
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/bryan/go/"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
bryan#Bryans-MacBook Thu Jun 15 10:22:57 ~/go/src/skincarereview
$ ls ~/google-cloud-sdk
total 408
drwxr-xr-x 30 bryan staff 1020 Jun 14 20:31 .install
-rw-r--r-- 1 bryan staff 980 Jun 14 20:30 LICENSE
-rw-r--r-- 1 bryan staff 673 Jun 14 20:30 README
-rw-r--r-- 1 bryan staff 162673 Jun 14 20:30 RELEASE_NOTES
-rw-r--r-- 1 bryan staff 8 Jun 14 20:30 VERSION
drwxr-xr-x 10 bryan staff 340 Jun 14 20:30 bin
-rw-r--r-- 1 bryan staff 2734 Jun 14 20:30 completion.bash.inc
-rw-r--r-- 1 bryan staff 2083 Jun 14 20:30 completion.zsh.inc
drwxr-xr-x 3 bryan staff 102 Jun 14 20:30 help
-rwxr-xr-x 1 bryan staff 1581 Jun 14 20:30 install.bat
-rwxr-xr-x 1 bryan staff 3471 Jun 14 20:30 install.sh
drwxr-xr-x 10 bryan staff 340 Jun 14 20:30 lib
-rw-r--r-- 1 bryan staff 308 Jun 14 20:30 path.bash.inc
-rw-r--r-- 1 bryan staff 1210 Jun 14 20:30 path.fish.inc
-rw-r--r-- 1 bryan staff 31 Jun 14 20:30 path.zsh.inc
drwxr-xr-x 6 bryan staff 204 Jun 14 20:30 platform
-rw-r--r-- 1 bryan staff 40 Jun 14 20:30 properties
bryan#Bryans-MacBook Thu Jun 15 10:24:22 ~/go/src/skincarereview
$ find / -name goroot 2>/dev/null
/Users/bryan/google-cloud-sdk/platform/google_appengine/goroot
bryan#Bryans-MacBook Thu Jun 15 10:28:43 ~/go/src/skincarereview
$ echo $PATH
/Users/bryan/google-cloud-sdk/bin:/Users/bryan/go/src/:/Users/bryan/google-cloud-sdk/platform/google_appengine/goroot/bin/:/Users/bryan/google-cloud-sdk/bin/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
Looking at main.go line 155, where I think the error is being thrown, I don't see where "goroot" is being set .
if fi, err := os.Stat(goroot); err != nil || !fi.IsDir() {
fmt.Fprintf(os.Stderr, "go: cannot find GOROOT directory: %v\n", goroot)
os.Exit(2)
}
You can try and follow the recommendation of this answer:
If your install is messed up beyond reason (happened to me once), just remove the cloud SDK and any references to it in your $PATH. Also completely uninstall the regular Go installation.
Then start from scratch. Install Go, unpack google-cloud-sdk, run installer (add to $PATH if needed), gcloud components install app-engine-go.
Voila.
As mentioned in that same answer, you don't set GOROOT anywhere, it is set for you.
You might want to read up on how go run/test works. The program basically builds into a temporary location and then runs, so that might be why it's complaining about your goroot.
This question could possibly help you: Golang: tests and working directory
I believe you are calling wrong goapp. You should be calling one that is directly in google_appengine folder as follows:
/Users/bryan/google-cloud-sdk/platform/google_appengine/goapp test
If you don't have goapp in google_appengine for some reason, I'll be quite surprised, but then following should work too. (Still the above is the correct way of calling it. goapp resolves appengine's goroot as a relative path from it's own location, so it's important where goapp itself is located.)
GOROOT=/Users/bryan/google-cloud-sdk/platform/google_appengine/goroot /Users/bryan/google-cloud-sdk/platform/google_appengine/goapp test

syslog-ng : accept using same fd before former connection close (then open fd reaches the limit)

My program use a main thread accept comming connections(so there is no accept racing!),then give it to 4 slave threads ,they will close when r/w return 0.
but some times the log print like this.....
Feb 27 00:13:31 mx59 lp_server.c[62] __lp_listening_handler: "<-1195489312> [INFO] accept fd(105), ready for register, inode(-1031324988)"
Feb 27 00:13:31 mx59 lp_server.c[69] __lp_listening_handler: "<-1195489312> [INFO] ldapproxy accept new connection succ!"
Feb 27 00:13:33 mx59 lp_server.c[62] __lp_listening_handler: "<-1195489312> [INFO] accept fd(105), ready for register, inode(-1031324792)"
Feb 27 00:13:33 mx59 lp_server.c[69] __lp_listening_handler: "<-1195489312> [INFO] ldapproxy accept new connection succ!"
Feb 27 00:13:33 mx59 lp_ldap.c[603] lp_ldap_io_event_handler: "<-1217919232> [INFO] task type: ..., ..."
Feb 27 00:13:36 mx59 lp_server.c[62] __lp_listening_handler: "<-1195489312> [INFO] accept fd(105), ready for register, inode(-1031324295)"
Feb 27 00:13:36 mx59 lp_server.c[69] __lp_listening_handler: "<-1195489312> [INFO] ldapproxy accept new connection succ!"
Feb 27 00:13:38 mx59 lp_server.c[62] __lp_listening_handler: "<-1195489312> [INFO] accept fd(105), ready for register, inode(-1031324102)"
Feb 27 00:13:38 mx59 lp_server.c[69] __lp_listening_handler: "<-1195489312> [INFO] ldapproxy accept new connection succ!"
Feb 27 00:13:38 mx59 lp_ldap.c[603] lp_ldap_io_event_handler: "<-1196939520> [INFO] task type: ..., ..."
Feb 27 00:13:41 mx59 lp_server.c[62] __lp_listening_handler: "<-1195489312> [INFO] accept fd(105), ready for register, inode(-1031323906)"
Feb 27 00:13:41 mx59 lp_server.c[69] __lp_listening_handler: "<-1195489312> [INFO] ldapproxy accept new connection succ!"
Feb 27 00:13:43 mx59 lp_server.c[62] __lp_listening_handler: "<-1195489312> [INFO] accept fd(105), ready for register, inode(-1031323852)"
Feb 27 00:13:43 mx59 lp_server.c[69] __lp_listening_handler: "<-1195489312> [INFO] ldapproxy accept new connection succ!"
Feb 27 00:13:43 mx59 lp_ldap.c[603] lp_ldap_io_event_handler: "<-1217919232> [INFO] task type: ..., ..."
Feb 27 00:13:46 mx59 lp_server.c[62] __lp_listening_handler: "<-1195489312> [INFO] accept fd(105), ready for register, inode(-1031323694)"
there are some points to be pointed out:
1)fd 105 used more then one time(inode different),but i see no connetion closing info!
2)Some time after the log above,program printing "accept fail" all the time.
I check and see "cat /proc/$pid/fd/*|wc -l == ulimit -n",that is: not long after this log,open fds reaches the current limitation.
Is there any relation between the log pasted above and the "accept fail"?
3)or just the syslog-ng bugs so it did’nt print connection closing info?

Resources