Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to select log destination #240

Open
metaspace opened this issue Oct 17, 2022 · 10 comments
Open

Allow user to select log destination #240

metaspace opened this issue Oct 17, 2022 · 10 comments
Labels
good first issue Good for newcomers

Comments

@metaspace
Copy link
Contributor

Currently logs are stored in /tmp with a predefined name. We should allow users to select the log destination at mount time.

Maybe also allow syslog destination?

@metaspace metaspace added the good first issue Good for newcomers label Oct 19, 2022
@kekeMemory
Copy link

Thanks for your help.
I am sorry,I run ROCKSDB_PLUGINS=zenfs make -j48 db_bench dbg~~
I did not get log file with "Info(logger_, "New Zoned Block Device: %s", filename_.c_str());" info logs in /tmp.

@metaspace
Copy link
Contributor Author

I think that is the way to go. Maybe you need to make clean first. Are you building for rocksdb or terarkdb?

@kekeMemory
Copy link

I think that is the way to go. Maybe you need to make clean first. Are you building for rocksdb or terarkdb?

I built the rocksdb.

@metaspace
Copy link
Contributor Author

I just tested myself and I do see the log files appear in tmp. But rocksdb is a little difficult to build in debug mode. Here is what I did (checked out rocksdb in /home/aeh/rocksdb):

make ROCKSDB_PLUGINS=zenfs -j$(nproc) db_bench gen-pc DEBUG_LEVEL=2
mv librocksdb_debug.a librocksdb.a
cd plugin/zenfs/util
PKG_CONFIG_PATH=/home/aeh/tmp/rocksdb make EXTRA_CXXFLAGS="-I/home/aeh/src -I/home/aeh/src/rocksdb/include -L/home/aeh/src/rocksdb"
./zenfs mkfs --zbd nvme2n2 --aux_path=/home/aeh/tmp/rocks-aux --force
cd ../tests
FS_PARAMS=--fs-uri=zenfs://dev:nvme2n2 ./run.sh my-test smoke

And now I have a logfile:

ls /tmp/zenfs_nvme*
/tmp/zenfs_nvme2n2_2022-11-02_10:44:53.log

@kekeMemory
Copy link

@metaspace Hi, excuse me, still the log info issue.
I thought I did not get write log files like your file:

"zenfs_nvme*_year-month-day_time.log"

I can get this kind of log file:

I did :

./zenfs mkfs --zbd nvme* --aux_path=/home/tmp/rocks-aux --force
And I now have this two logfile:
$ ls /tmp/rocks-aux/rocksdbtest/dbbench
LOCK LOG  

I checked the LOG Info, but is not the same with zenfs_nvme*_year-month-day_time.loginfo,so how can I solve?

@kekeMemory
Copy link

I am sorry to bother you, since I really did not find the name like:
zenfs_nvme*_year-month-day_time.log

I have used the latest rocksdb and zenfs, and zenfs is embedded in /home/rocksdb/plugin/zenfs/
I wanna to see the file from the code /home/rocksdb/plugin/zenfs/fs/zbd_zenfs.cc:
Info(logger_, "New Zoned Block Device: %s", zbd_be_>GetFilename().c_str());

When I did db_bench test in /home/rocksdb, i have move the compiled zenfs util to the same path //home/rocksdb
I can only get the this two logfile:

$ ls /tmp/rocks-aux/rocksdbtest/dbbench
LOCK LOG 

So i do not know where to find?
@yhr @metaspace @royguo

@aravind-wdc
Copy link
Contributor

@kekeMemory when formatting the zenfs filesystem, did you use the "--enable-gc=true" option ?

@kekeMemory
Copy link

@kekeMemory when formatting the zenfs filesystem, did you use the "--enable-gc=true" option ?

Yes, I have set --enable-gc

@aravind-wdc
Copy link
Contributor

Did you run a smoke test or a dbbench workload and then check ?

@kekeMemory
Copy link

kekeMemory commented Dec 2, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants