Add diskspace Univention


#1

Hello,

We run univention in Vsphere and want to add extra storage(from a lun) to system for shares etc., we already have the storage added to the univention system but how can we use it in the univention? mount?

Thanks.


#2

Hello,

as I have no Vsphere here to give you concrete hints, I’ll try to show you the general way.
Do you see the new device inside the ucs system? (You can use dmesg for example to determine after reboot.)
Did you create a file system for the new partition or is it already existing?
If you see the new device/partition and there is an existing file system on it, you should easily be able to mount it like in every other linux system too. To persistently add it you could make an entry in /etc/fstab instead of mounting it by hand after every boot.

Kind regards,
Tim Petersen


#3

With VMware, you just need to add strorage via the vmware client gui. You add it as a seperate hdd (usually the ucs vm will need to be powered off).
The rest is pretty much completed via the linux command line from the ucs server. The methods used to complete the process vary a bit depending on the intended outcome. You may want to extend the existing lvm partition, or add an entirely new partition. A quick google search should help with this part.


#4

Hello,

I already added the disk and made it that it not influenced by a snapshot, when i do “fdisk -l” i see:

[i]WARNING: GPT (GUID Partition Table) detected on ‘/dev/sda’! The util fdisk doesn’t support GPT. Use GNU Parted.

Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2611 20971519+ ee GPT

Disk /dev/sdb: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn’t contain a valid partition table

Disk /dev/dm-0: 12.5 GB, 12469665792 bytes
255 heads, 63 sectors/track, 1516 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000[/i]

I asume that /dev/sdb is the new diskspace?

What i want is to add the new diskspace as separate partition /data to store our files and folders. Also i like to change the mail storage from the standard folder to /data/mail .

I read that i need to specify a type i think ext4 is the best? or do u advice different?

How can i do it what are the commands?

Thanks.


#5

I think the default partitioning used my Univention creates an LVM partition. Therefore, you COULD just add the new ‘drive’ into the same LVM volume and effectively just extend the space.
OR
You can create a ext3 or 4 volume and mount it to /data.


#6

Hello,

I’ll try to sum the steps up:
[ul]
[li]Create partition table and partition at /dev/sdb (for example with fdisk)[/li]
[li]Create file system (mkfs - choosing either ext3 or ext4 is up to you)[/li]
[li]Mount it to /data (mount - or add it to /etc/fstab)[/li][/ul]

Have a look at the following article for an example:
how-to-create-ext3-filesystem-and-mount-it-to-linux
Please feel free to respond if you are facing problems with specific commands.

Kind regards,
Tim Petersen


#7

Hello,

I did the following:

fdisk /dev/sdb
fdisk -l /dev/sdb
mkfs -t ext4 -L /data -v /dev/sdb1
nano /etc/fstab:

[i]# /etc/fstab: static file system information.

UUID=c789aa92-72bb-44eb-ad97-84340f9ecf65 / ext4 acl,errors=remount-ro,user_xattr $
proc /proc proc defaults 0 0
UUID=fe80b118-f729-4904-b714-a7412b8b22f9 /boot ext4 defaults,acl,user_xattr 0 0 $
UUID=4ea503e0-ca13-4734-bef7-a3ad4c897b90 none swap sw 0 0
/dev/sr0 /cdrom auto user,noauto,exec 0 0
/dev/fd0 /floppy vfat user,noauto,exec 0 0
LABEL=/data /data ext4 defaults 1 2 [/i]

mkdir /data
mount -t ext4 LABEL=/data /data

When i do fdisk -l i get :

[i]Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2611 20971519+ ee GPT

Disk /dev/sdb: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3e3b14f7

Device Boot Start End Blocks Id System
/dev/sdb1 1 10443 83883366 83 Linux

Disk /dev/dm-0: 12.5 GB, 12469665792 bytes
255 heads, 63 sectors/track, 1516 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn’t contain a valid partition table[/i]

Looks like i did something wrong? see /dev/dm-0 doesn’t …

Is it save to reboot?


#8

Note: You should make sure your mounting uses “acl,user_xattr” or you will have issues with UCS and Samba4 permissions


#9

Hello,

as I am not sure how the system reacts when using something like “LABLE=/…” as destination… so please use /dev/sdb1" instead:

UUID=c789aa92-72bb-44eb-ad97-84340f9ecf65 / ext4 acl,errors=remount-ro,user_xattr $ proc /proc proc defaults 0 0 UUID=fe80b118-f729-4904-b714-a7412b8b22f9 /boot ext4 defaults,acl,user_xattr 0 0 $ UUID=4ea503e0-ca13-4734-bef7-a3ad4c897b90 none swap sw 0 0 /dev/sr0 /cdrom auto user,noauto,exec 0 0 /dev/fd0 /floppy vfat user,noauto,exec 0 0 /dev/sdb1 /data ext4 defaults 1 2

Did you already manage to mount it?

mount /dev/sdb1 /data

I don’t think that this is a problem… at least i think fdisk is not aware of LVM device-mapper files. If you didn’t do anything with the device-mapper this should be okay.

Kind regards,
Tim Petersen


#10

Hello,

Yes i already was able to mount it with “mount -t ext4 LABEL=/data /data”.

I changed the fstab to:

UUID=c789aa92-72bb-44eb-ad97-84340f9ecf65 / ext4 acl,errors=remount-ro,user_xattr 0 1
proc /proc proc defaults 0 0
UUID=fe80b118-f729-4904-b714-a7412b8b22f9 /boot ext4 defaults,acl,user_xattr 0 0
UUID=4ea503e0-ca13-4734-bef7-a3ad4c897b90 none swap sw 0 0
/dev/sr0 /cdrom auto user,noauto,exec 0 0
/dev/fd0 /floppy vfat user,noauto,exec 0 0
/dev/sdb1 /data ext4 defaults,acl,user_xattr 1 2

Do i have to remount the partition with “mount /dev/sdb1 /data” ? or does it automount after reboot with above settings?


#11

Hello,

you don’t have to remount it now - it should be mounted automatically next boot.

Kind regards,
Tim Petersen


#12

Sorry to drag this up after all this time, but is there another way to extend the disk space today?

I found this guide from 2015: http://sdb.univention.de/content/2/304/en/enlarge-file-system.html

Thank you for your reply