Can I name a VeraCrypt volume on Mac OS? - macos

When Veracrypt 1.23 mounts a volume it is name NO NAME.
Is there a way to give these volumes a name?
I am using the console to create my containers
veracrypt -t -c $LOCATION --encryption=AES --hash=SHA-512 --filesystem=FAT --password=$PASSWORD --size=1G --volume-type=Normal --pim=$PIM --keyfiles=
I tried renaming the volume in /Volumes/NO\ NAME but that just removes the volume from the desktop.
And specifying a mount point.
Enter mount directory [default]: /Users/Test
But the volume still mounts as NO NAME

Using diskutil I can rename volumes, as below.
/usr/sbin/diskutil rename "NO NAME" "TEST2"
I am leaving the question open as this is a bit of a hack.

Related

Mac OSX mount smb to /Volumes from script

I can mount an smb share to /Volumes using the following
osascript -e "mount volume \"smb://user:pass#hal/share\""
But this only works if I have already logged into the Mac, otherwise I get a "FAILED TO establish the default connection to the WindowServer" error.
I can use the mount command to mount to a folder in my home directory, which works whether or not I have logged in:
mkdir ~/test
mount -t smbfs //user:pass#hal/share ~/test
But I can't do this with /Volumes as it is owned by root. How does the osascript call have the permission to write to a folder owned by root and how can I do the same thing without using AppleScript?
Thank you
Answering my own question:
Originally the AppleScript I was using was:
osascript -e 'tell application "Finder" to mount volume "smb://user:pass#hal/share"'
This gives a different error and the mount fails when the user has not logged:
29:78: execution error: An error of type -610 has occurred. (-610)
I found the simpler version that doesn't use Finder when I was composing this question:
osascript -e ‘mount volume "smb://user:pass#hal/share”’
As I said this also gives an error when the user has not logged in:
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
BUT it does actually mount the network share in /Volumes, so I can use this and just ignore the error.

Docker for windows: Bind mounting an Azure SMB drive fail

I spent days on this issue, can't figure out how it's done?
Mounting the drive letter from Azure file share works fine using
New-PSDrive -Name T -PSProvider FileSystem -Root "\\xxxx.file.core.windows.net\share" -Scope Global -Persist
The drive can be accessed in both PowerShell and in explorer, even after windows reboot.
But when trying to mount that in a container fail to say the path does not exist.
docker run -d --name webserver1 -v T:\:c:\share -p 80:80 microsoft/iis
Error response from daemon: invalid volume specification: 'T:\:c:\share': invalid mount config for type "bind": bind source path does not exist: t:\.
I also tried to add the SMB drive via
New-SmbGlobalMapping -RemotePath "\\xxxx.file.core.windows.net\share" -Credential $credentialObject -LocalPath T: -FullAccess #( "NT AUTHORITY\SYSTEM", "NT AUTHORITY\NetworkService" ) -Persistent $true -RequirePrivacy $true
Then I can bind mount T: but get "access was denied" instead when trying to check c:\share inside the container. What am I doing wrong? Also referring to this: https://github.com/moby/moby/issues/37863
If there is another way to mount the SMB share directly into the container without first mounting it in windows, that would be fine too. I solved it with Linux but doesn't seem to be possible in windows.

Is there a way to move the location of ICP private image registry of an installed ICP?

I am running low on diskspace on the drive where the ICP private image registry is located. I know it's possible to specify a location for "/var/lib/registry" using a bind mount BEFORE ICP installation. Is there a procedure to safely move the location of ICP private image registry on an existing ICP cluster?
How to move /current/directory to another partition/disk
Once you have added extra disk, partitioned it, created the filesystem, and are ready to move /current/directory to it; take the following steps:
Assuming /dev/xvdc11 is the created partition with ext4 file system
# create a temp mount point and mount your new partition
mkdir /mnt/dirName
mount /dev/xvdc11 /mnt/dirName
# confirm that it is mounted.
df -h
# copy current directory content to the temp mount point
rsync -aqxP /current/directory/* /mnt/dirName
# use bind mount to set the new location
mount --rbind /mnt/dirName /dirName
# unmount and delete the temp mount point
umount /mnt/dirName
rm -rf /mnt/dirName
# persist this change across system reboots
echo "/dev/xvdc11 /current/directory ext4 defaults 0 0" >> /etc/fstab
Yes, you can do this activity, please look at for more details on image management:
https://www.ibm.com/support/knowledgecenter/en/SSBS6K_3.1.2/manage_images/image_manager.html
Also it is possible to complete this task by using the API
https://www.ibm.com/support/knowledgecenter/en/SSBS6K_3.1.2/apis/image_management.html

How can I find all the volumes mounted by Time Machine

I try to find all the volumes mounted by Time Machine.
I found the tmutil destinationinfo which list all Time Machine volumes. If those are mounted I can find the local path by looking at the Mount Point entry.
This works well for external HDD. If a network backup is used, I saw that Time Machine mount another volume (generally named: "Time Machine Backup"), and I'm unable to find a command or some api which list this volume.
So, is a command, api which can list all the volumes which contains Time Machine backups?
tmutil destinationinfo lists the network drives as well. What are you seeing?
$ tmutil destinationinfo
====================================================
Name : TMBackup
Kind : Network
URL : afp://TimeMachine#camel(TimeMachine)._afpovertcp._tcp.local/TMBackup
Mount Point : /Volumes/TMBackup
ID : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Checking for availability of network disk on mac

I'm creating myself a script to automate the backing up of certain directories on my mac to an airdisk (usb disk on my airport extreme).
I was reading up about rsync. It seems that if the airdisk isn't mounted, rsync creates the directory in "/Volumes/the name of the disk".
This could fill up my hard drive and it isn't supposed to make the backup on my local drive.
Therefore I want to check if the mounted drive is available before I start the rsync command.
Can anyone help?
I would check to see if a file located in the mount exists. As long as you mount the disk in the same location each time, this should work.
if [ -f /Volumes/AirDisk/foo.txt ];
then
echo "AirDisk mounted. Starting backup"
#Put backup script here
else
echo "File does not exists"
exit 1
fi

Resources