CKB:Freeing Disk Space on a Cryptshare Server: Unterschied zwischen den Versionen

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
(New guide for disk expansion)
 
Zeile 67: Zeile 67:
==== Linux ====
==== Linux ====


{{Panel|title=|content=# Download the tool [https://sourceforge.net/projects/gparted/files/gparted-live-stable/0.23.0-1/gparted-live-0.23.0-1-i586.iso/download GParted] (as ISO) [http://gparted.org/download.php ] <br /># Change the virtual disk size in your vSphere environment<br /># Mount the downloaded GParted-image and boot the server from the CD<br /><br />[[File:8093736.png]]
}}


{{Panel|title=|content=4. Select the disk you want to extend<br />[[File:8093740.png]]
YaST offers the option of adapting the existing, enlarged disk in the system accordingly:
}}


{{Panel|title=|content=5. Select the swap partition and move it to the right<br />[[File:8093741.png]]<br />[[File:8093743.png]]
Open YaST with the command: <code>yast</code>
}}


{{Panel|title=|content=6. Apply changes<br />[[File:8093744.png]]
Go to '''System → Partitioner''' and press '''Enter'''
}}


{{Panel|title=|content=7. Select the partition /dev/sda1 and resize it to the maximum available space<br />[[File:8093746.png]]<br />[[File:8093748.png]]
[[Datei:System-Partitioner.png|900x900px]]
}}


{{Panel|title=|content=8. Apply the changes<br />[[File:8093749.png]]
}}


{{Panel|title=|content=9. Quit the GParted Application<br />[[File:8093750.png]]
[[Datei:Partitioner-Warning.png]]
}}


{{Panel|title=|content=10. Shutdown the System<br />[[File:8093751.png]]
}}


{{Panel|title=|content=11. Umount the GParted image in the vSphere Client<br />12. Start the server<br />13. Login as 'root' and check the settings using the command 'df -h'<br />[[File:8093752.png]]
Go to the enlarged hard disk and select the partition you want to enlarge
}}


==== Windows ====
[[Datei:Partitioner-DeviceOverview.png|900x900px]]
 
 
Go to '''Device''' and '''Resize...'''
 
[[Datei:Partitioner-DeviceResize.png|900x900px]]
 
 
Select '''Maximum Size'''
 
[[Datei:Partitioner-MaximumSize.png|712x712px]]
 
 
The desired change will be displayed. Now click on '''Next'''
 
[[Datei:Partitioner-OverviewNew.png|900x900px]]
 
 
Click '''Next''' again to make the change
 
[[Datei:Partitioner-Summary.png|900x900px]]
 
 
Finally, please quit YaST.
 
[[Datei:Partitioner-Quit.png|900x900px]]
 
====Windows====


Read this [https://technet.microsoft.com/de-de/library/cc771473.aspx Microsoft Technet Article] for detailed instructions.
Read this [https://technet.microsoft.com/de-de/library/cc771473.aspx Microsoft Technet Article] for detailed instructions.
-----
-----


# Change the virtual disk size in your vSphere Client
#Change the virtual disk size in your vSphere Client
# Start your Windows Host
#Start your Windows Host
# Open the Windows Disk Manager
#Open the Windows Disk Manager
# Select the volume you want to extend
#Select the volume you want to extend
# Click 'extend Volume.' and follow the instructions
#Click 'extend Volume.' and follow the instructions


[[File:8093733.png]]
[[File:8093733.png]]


==== Azure ====
====Azure====


-----
-----


1. Attach a data disk to your VM like described in following article:
1. Attach a data disk to your VM like described in following article:
[https://docs.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal https://docs.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal]
https://docs.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal
Please note: you do not need to perform the task '''Connect to the Linux VM to mount the new disk'''
Please note: you do not need to perform the task '''Connect to the Linux VM to mount the new disk'''



Aktuelle Version vom 2. Januar 2025, 10:30 Uhr


Applies to

All versions of Cryptshare Server

Purpose

The Cryptshare Server has insufficient disk space to operate properly or requires more disk space to store files.

Solutions

Remove old Cryptshare Backups (Versions older than 3.12.x)

By default, the Cryptshare Server performs a Backup on a daily basis. These backups are not automatically deleted and therefore can occupy disk space. Please update to the actual Cryptshare Version In order to free disk space you can manually remove old backups from the file system.  The default location for Cryptshare Backups lies within the Cryptshare Installation folder in the sub directory 'backup'. Depending on your Operating System you can enable a backup rotation as described here: Activate Backup-Rotation on Cryptshare Appliances under openSUSE

Remove old kernels

During the lifecycle of an appliance, it may have gone through several updates, including kernel updates. The old kernels are not deleted by default and have to be removed manually. Each installed kernel takes up about 100–300 MB of disk space. This article explains how to remove these unused kernels from the appliance.

Creating a backup
If you're unfamiliar with managing Linux systems, it is strongly recommended creating a snapshot of the appliance. Removing the wrong kernel (e.g. the one currently in use) may result in a non-booting appliance.

To remove old kernels, please proceed as follows:

  1. Reboot the system to ensure that your system is booting the most recently installed kernel.
  2. Display the kernel version in use and write it down for the duration of this tutorial. The output may look as follows:
cryptshare:~ # uname -r
4.4.104-39-default
  1. Display all installed kernels.
cryptshare:~ # rpm -qa | grep -i kernel
kernel-default-4.4.104-39.1.x86_64
kernel-firmware-20170530-14.1.noarch
kernel-default-4.4.104-18.44.1.x86_64
  1. Only consider the entries containing "kernel-default" or "kernel-desktop". As you can see in this example, a kernel version older than the one currently in use is installed: kernel-default-4.4.104-18.44.1.x86_64
  2. Start with the oldest installed kernel and remove it from the system as follows.
cryptshare:~ # zypper rm kernel-default-4.4.104-18.44.1
Loading repository data...
Reading installed packages...
Resolving package dependencies...
 
The following package is going to be REMOVED:
  kernel-default-4.4.104-18.44.1
 
1 package to remove.
After the operation, 238.0 MiB will be freed.
Continue? [y/n/...? shows all options] (y):
  1. Carefully read through the package removal summary and, once confident with the correctness, confirm by pressing Enter. (Hint: additional packages such as vmware-guest-tools may also be listed for removal - this is fine.)
  2. Repeat the above step for all kernels that do not match the kernel currently in use
  3. After zypper has finished the removal process, you've successfully freed disk space.

Limit the size of journal logs

This article describes how to limit the size of the journal logs. Since the journal logs are likely to grow up to hundreds of MB, they might occupy a significant amount of disk space on your Cryptshare Server. To limit the size of the journal logs to 10MB, please follow the instructions below:

  1. Connect to your Cryptshare Server via SSH
  2. Verify current disk space usage:
df -h
  1. Limit the size of the journal:
sed -i -e 's/#SystemMaxUse=/SystemMaxUse=10M/' /etc/systemd/journald.conf
  1. Restart the journal daemon:
systemctl restart systemd-journald
  1. Verify that the disk space usage went down:
df -h

Extend the Disk Space of your Server

Linux

YaST offers the option of adapting the existing, enlarged disk in the system accordingly:

Open YaST with the command: yast

Go to System → Partitioner and press Enter

System-Partitioner.png


Partitioner-Warning.png


Go to the enlarged hard disk and select the partition you want to enlarge

Partitioner-DeviceOverview.png


Go to Device and Resize...

Partitioner-DeviceResize.png


Select Maximum Size

Partitioner-MaximumSize.png


The desired change will be displayed. Now click on Next

Partitioner-OverviewNew.png


Click Next again to make the change

Partitioner-Summary.png


Finally, please quit YaST.

Partitioner-Quit.png

Windows

Read this Microsoft Technet Article for detailed instructions.


  1. Change the virtual disk size in your vSphere Client
  2. Start your Windows Host
  3. Open the Windows Disk Manager
  4. Select the volume you want to extend
  5. Click 'extend Volume.' and follow the instructions

8093733.png

Azure


1. Attach a data disk to your VM like described in following article: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal Please note: you do not need to perform the task Connect to the Linux VM to mount the new disk

2. Perform the following commands:

wget https://update.cryptshare.com/cryptshare/scripts/cs-appliance/attachHDD.sh
sh attachHDD.sh