Hello, there was a vmfs6 datastore, where while clear installing ESXi7 on USB Flash, was configured Scratch "ScratchConfig.ConfiguredScratchLocation = /vmfs/volumes/5ee3e9a8-68963958-785a-90b11c4fb057/.locker"
I whanted to delete this datastore, but always reciaved message about it is locked. So, i enable maintanence mode, created new datastore, on this datastore i created .locker directory, and changed parameter ScratchConfig.ConfiguredScratchLocation to new dadastore. System told me that everything is OK. I unmaunted old datastore, deleted it, rebooted server, and after reboot i reciave old value of "ScratchConfig.ConfiguredScratchLocation = /vmfs/volumes/5ee3e9a8-68963958-785a-90b11c4fb057/.locker". But for now, datastore 5ee3e9a8-68963958-785a-90b11c4fb057 dont even exists in system . I also tryed to change ScratchConfig.ConfiguredScratchLocation from SSH, everytime after reboot, the value return to "ScratchConfig.ConfiguredScratchLocation = /vmfs/volumes/5ee3e9a8-68963958-785a-90b11c4fb057/.locker" . Please, help me
Hi
syntax for backup.sh : - as far as I figured out by reading baclup.sh
backup.sh par1 par2 par3 par4
par1 is required. Options are 0 or 1. 0 means TRUE and 1 means FALSE.
par1 sets wether a reboot is planned or not - dont know more at the moment.
par2 apparently defaults to /bootbank/
Useful command for further investigations: backup.sh 1 /tmp/
This writes state.tgz and jumpstrt.tgz to /tmp
par3 seems to be used to specify a file or a list of files to be excluded in the backup routine.
Have not figured out how to specify something yet
par4 specifies a delay - no idea how this works - have not noticed a delay so far
Valid calls are for example:
backup.sh 0
backup.sh 1
backup.sh 0 /tmp/
But forget that for a while - I had the same trouble with ESXi 7.
Editing locker.conf and running backup.sh did not work.
Try this approach ...
mkdir /vmfs/volumes/5efe6b71-df532573-341e-000c2936fb37/.locker-localhost/
vim-cmd hostsvc/advopt/update ScratchConfig.ConfiguredScratchLocation string /vmfs/volumes/5efe6b71-df532573-341e-000c2936fb37/.locker-localhost
check if it worked with
vim-cmd hostsvc/advopt/view ScratchConfig.ConfiguredScratchLocation
put host into maintenance mode and reboot.
For me this was the first procedure that worked.
Ulli
That setting is stored in /etc/vmware/locker.conf.
That file is part of the stuff that gets stored in state.tgz every now and then.
If you set the parameter make sure your settings get stored - so next time run backup.sh before you delete the datastore
I am doing next steps:
1) Login to web client
2) Right click on host and enter maintanence mode
3) Go to Host > Services > Enable SSH
4) Connect to esxi via SSH and than vi /etc/vmware/locker.conf . I see here old datastore
5) n web client go to Host > Manage > System > Advanced Settings and change
ScratchConfig.ConfiguredScratchLocation= /vmfs/volumes/5ee3e9a8-68963958-785a-90b11c4fb057/.locker (old and not existing datastore)
to
ScratchConfig.ConfiguredScratchLocation=/vmfs/volumes/5efad201-b628bed0-fc92-90b11c4fb057/.locker (newly created datastore)
6) System accepts my changes, and i going to SSH to look to the locker conf. And i see there my new datastore that i whant to use for scratch
7) I reboot sesrver
😎 And agein, i have old datastore in locker and in interface
What i am doing wrong? Where i can find backup.sh and how to use it?
backup.sh is in your path - so just enter
backup.sh via putty
I am trying to use backup.sh but cannot understand or google, how to do int
[root@localhost:~] /bin/backup.sh
Usage: /bin/backup.sh IsShutdown [PATH_NAME]
[root@localhost:~] /bin/backup.sh /etc/vmware/locker.conf
Invalid parameter for is_shutdown: /etc/vmware/locker.conf
[root@localhost:~] /bin/backup.sh true
Invalid parameter for is_shutdown: true
Is there any special syntaxis?
Current version of ESXi: 7.0.0 (Build 15843807)
Any ideas why scratch location return to default after reboot?
Hi
syntax for backup.sh : - as far as I figured out by reading baclup.sh
backup.sh par1 par2 par3 par4
par1 is required. Options are 0 or 1. 0 means TRUE and 1 means FALSE.
par1 sets wether a reboot is planned or not - dont know more at the moment.
par2 apparently defaults to /bootbank/
Useful command for further investigations: backup.sh 1 /tmp/
This writes state.tgz and jumpstrt.tgz to /tmp
par3 seems to be used to specify a file or a list of files to be excluded in the backup routine.
Have not figured out how to specify something yet
par4 specifies a delay - no idea how this works - have not noticed a delay so far
Valid calls are for example:
backup.sh 0
backup.sh 1
backup.sh 0 /tmp/
But forget that for a while - I had the same trouble with ESXi 7.
Editing locker.conf and running backup.sh did not work.
Try this approach ...
mkdir /vmfs/volumes/5efe6b71-df532573-341e-000c2936fb37/.locker-localhost/
vim-cmd hostsvc/advopt/update ScratchConfig.ConfiguredScratchLocation string /vmfs/volumes/5efe6b71-df532573-341e-000c2936fb37/.locker-localhost
check if it worked with
vim-cmd hostsvc/advopt/view ScratchConfig.ConfiguredScratchLocation
put host into maintenance mode and reboot.
For me this was the first procedure that worked.
Ulli
Thank you very much! I will try it immidiatly. Sorry for long response time
After all manipulations, /bootbank was diaaspeared. If i create this location manualy and store with backup.sh backup there, it anyway deletes after reboot. No matter if i turn off maintanence mode before backup, server is in permanentry maintanence mode now :smileygrin:. Will reinstall hypervisor and try agein
i found that if i esxi installed on usb flash disk, and vmfsl partition was deleted to create vmfs datastore on its place instead, then esxi will not accept any .locker configuration and no matter what and how user define, scratch will be located on ram disk. Even if user tryes to relocate scratch to HDD. The onely way to return ability to reconfigure scratch location i found is to reinstal esxi on the flash and dont touch vmfsl partition