If someone struggles with backup & OS disk containing LVM: please have a look at https://www.howtoforge.com/linux_lvm_snapshots
It explains how to create a snapshot-backup and to restore.
Cheers
Johan.
If someone struggles with backup & OS disk containing LVM: please have a look at https://www.howtoforge.com/linux_lvm_snapshots
It explains how to create a snapshot-backup and to restore.
Cheers
Johan.
Hi
Thanks for the info.
For your info: in my setup I had a hard time to install "OMV iso" to a USB stick to put it on my terramaster NAS. I struggled with efi boot support, NIC 10gbit driver support and USB stick creation. So after a while I bought myself an USB enclosure with a SSD. A separate debian install with omv on top seems the most easy way to get the task done. The use of LVM on my OS? -> no particular reason. I can't remember why I choose it over ext4.
my /boot is indeed on /dev/sdc, a LVM volume.
Disk /dev/sdc: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Disk model: Generic
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 8EE3F8F9-7C51-461D-889C-BE354D5F1144
Device Start End Sectors Size Type
/dev/sdc1 2048 1050623 1048576 512M EFI System
/dev/sdc2 1050624 2050047 999424 488M Linux filesystem
/dev/sdc3 2050048 488396799 486346752 231.9G Linux LVM
Alles anzeigen
Hi
I don't blame anyone anything. It's just hard to find doc on the plugin what to put where.
I was not aware I'm using special setup: my debian is on an SSD with default layout. My data on a raid 1 volume consisting out of 2 disks, standard formatted with btfrs on the debian install process. I assume you refer to "btfrs" as "non standard LVM".
Am I correct the "/dev/terramaster-vg/root" is the root device I should fill in?
root@openmediavault:/srv/dev-disk-by-label-vol1# lvscan
ACTIVE '/dev/terramaster-vg/root' [<27.94 GiB] inherit
ACTIVE '/dev/terramaster-vg/swap_1' [976.00 MiB] inherit
ACTIVE '/dev/terramaster-vg/home' [203.00 GiB] inherit
root@openmediavault:/srv/dev-disk-by-label-vol1# blkid
/dev/sda: UUID="a8a59497-5254-e264-7dcc-23d02864984c" UUID_SUB="91755205-6b7d-10fe-0c9a-5eb00b680f53" LABEL="terramaster:mirror1" TYPE="linux_raid_member"
/dev/md127: LABEL="vol1" UUID="b314241b-85fa-408e-96b9-d43c5e697c20" UUID_SUB="0d5c1ddc-5fbf-4325-86f4-3da3131e1bdc" TYPE="btrfs"
/dev/sdb: UUID="a8a59497-5254-e264-7dcc-23d02864984c" UUID_SUB="bb58e724-1d83-1049-b587-9a3a8d3135d1" LABEL="terramaster:mirror1" TYPE="linux_raid_member"
/dev/sdc1: UUID="8E1A-2580" TYPE="vfat" PARTUUID="e362a67d-151a-4e7f-9417-52eef9db46b6"
/dev/sdc2: UUID="2f060f8e-2d01-4b0c-a8d6-c8b446eed109" TYPE="ext2" PARTUUID="322f24ae-41ad-4596-8a0e-2ca054e4c4a2"
/dev/sdc3: UUID="D8MS0q-HFid-2sdu-0MJ3-1c8s-QJLb-pWC9Rr" TYPE="LVM2_member" PARTUUID="e8c969dc-dbb4-488b-98e8-833023ecdbbb"
/dev/mapper/terramaster--vg-root: UUID="46c3433f-08f3-4af7-94fe-029d5900370f" TYPE="ext4"
/dev/sdd1: UUID="6c89a123-0ecb-4f46-a0cb-abee74e19a2c" TYPE="ext4" PARTUUID="380f83d1-01"
/dev/mapper/terramaster--vg-home: UUID="6a2c88c6-2d65-4e03-a688-2d6080dc05f9" TYPE="ext4"
Alles anzeigen
Thanks!
Johan.
Hi
I'm afraid he is not the only one: I use omv 5.6.7.1 and the rood devide is not found as well.
I tried it twith and without the the openmediavault-sharerootfs plugin. No change.Error #0:
OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; /usr/sbin/omv-backup 2>&1': Method: fsarchiver
Device file: /dev/mapper/terramaster--vg-root
Root drive: /dev/
fdisk: cannot open /dev/: Is a directory in /usr/share/openmediavault/engined/rpc/backup.inc:72
Stack trace:
#0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(588): OMVRpcServiceBackup->{closure}('/tmp/bgstatusbg...', '/tmp/bgoutputNm...')
#1 /usr/share/openmediavault/engined/rpc/backup.inc(74): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#2 [internal function]: OMVRpcServiceBackup->doBackup(NULL, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('doBackup', NULL, Array)
#5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Backup', 'doBackup', NULL, Array, 1)
#6 {main}
Alles anzeigen
your code findmnt -n / | awk '{ print $2 }' give me:
root@openmediavault:/srv/dev-disk-by-label-vol1# findmnt -n / | awk '{ print $2 }'
/dev/mapper/terramaster--vg-root
root@openmediavault:/srv/dev-disk-by-label-vol1# ll /dev/mapper/terramaster--vg-root
lrwxrwxrwx 1 root root 7 May 18 21:43 /dev/mapper/terramaster--vg-root -> ../dm-0
root@openmediavault:/srv/dev-disk-by-label-vol1# findmnt -n -o SOURCE /
/dev/mapper/terramaster--vg-root
root@openmediavault:/srv/dev-disk-by-label-vol1# sudo cat /etc/fstab | grep '\s\/\s'
/dev/mapper/terramaster--vg-root / ext4 noatime,nodiratime,errors=remount-ro 0 1
root@openmediavault:/srv/dev-disk-by-label-vol1#
What should I give as "root device" manually? /dev/mapper/terramaster--vg-root is working fine.
Hi
After weeks of searching, I managed to get most of it working:
- my omv has 3 nic's (terramaster):
-> 2x 1Gb, bonded to one 2 Gbit line. It is connected to a Gb switch/router. (192.168.30.12/24)
- >1x 10Gb link directly connected to my main PC without switch/routing. (omv 192.168.60.1/24 and .2 on my main PC)
- my main PC has a several nics. One is connected to the a Gb switch/router. (192.168.30.xxx/24) and the 10Gb card. Directly connected to my ovm.
Problems I ran into:
- network stack of my main pc (win10 was corrupt). I had to reset.
- configuring bonding on my switch zyxel and omv via 802.3ad. -> check bonding info:
- making sur omv respons to the same interface as the tcp package is comming from. -> using routing tables in netplan. I debugged with wireshark on my main pc an iftop on linux.
- OMV only supports simple network setups. More advanced onces should be handled via ssh and /etc/netplan. Use netplan starting with 60 so OMV generated netplan files are overwritten. I did not define any interface in omv gui.
- wrong MTU values. Please start with the default "1500" and if this is working, change it to the desired value. In my case 9014 on a Marvell AQtion 10Gbit Network Adapter set to "mtu = 9000". (header bytes should be taken into account on omv)
Working config om my OMV: /etc/netplan/60.yaml
- omv connected to 2 subnets
- unknown ip's are rerouted to the default gateway.
ethernets:
enp2s0:
match:
macaddress: 6c:bf:b5:01:4d:53
set-name: enp2s0
#mtu: 9000
enx6cbfb5014d54:
match:
macaddress: 6c:bf:b5:01:4d:54
set-name: enx6cbfb5014d54
#mtu: 9000
enp1s0:
match:
macaddress: 6c:bf:b5:01:54:09
addresses:
- 192.168.60.1/24
set-name: enp1s0
mtu: 9014
dhcp4: false
dhcp6: false
link-local: []
routes:
- to: 192.168.60.0/24
via: 192.168.60.1
table: 102
routing-policy:
- from: 192.168.60.0/24
table: 102
bonds:
bond0:
#mtu: 9000
dhcp4: true
dhcp6: false
interfaces: [ enp2s0, enx6cbfb5014d54 ]
#addresses : [192.168.30.12/24]
gateway4: 192.168.30.1
nameservers:
search: [network.lan]
addresses: [192.168.30.1]
parameters:
mode: 802.3ad
lacp-rate: slow
mii-monitor-interval: 100
routes:
- to: 192.168.30.0/24
via: 192.168.30.1
table: 101
routing-policy:
- from: 192.168.30.0/24
table: 101
Alles anzeigen
I abandon the use of vlans.
Hi
Have a look at https://www.youtube.com/watch?v=p39mFz7ORco
Overhead when using non aligned or small jumboframes is no longer neglectable in 10g. especially when using older cpu's in combination with cheaper nic's. Indeed it can double your speed. Or should I say: divde your speed by 2.
Hi
I don't know if it can help: beginning of OMV5, netplan is used. The gui is creating files in /etc/netplan. These files are loaded into
systemd-networkd.
omv-firstaid is a textual manner to create new files in /etc/netplan. I don't know how docker is handling the network creating, but no doubt it creates an own network.
Have look in netplan and try these commands to check and revert a netplan, generate the resulting set of the network and apply the new config. The last command reloads the netplan into the network.
Finally I can tell the neplan files are executed from a till z. The last config overwrites the first one. You may safely add a file to the end: e.g. 60.yaml.
Hi
with 10gig nics, several items are very important:
- jumboframes must be set to as high as possible in your entire network: nic and switch. size e.g.: 9k
. This item alone, can double to tripple your speed.
- offloading could help.
- Can you describe how you test your speed: is the nic the problem, or the HDD/OS combination after it?
Hi
May I suggest to give some basic info? your system, your OS, your kernel, OMV version,...
error: what is dmesg telling you when you insert your nic-to-usb? Can you give me some output
If no firmware driver is available, you need to check if the kernel module is available and loaded.
You could try: or something simular
and like always: google is your friend.
cheers
Johan.
Hi
First 2 points accomplished:
- I like to block regular access and only keep the tagged vlan3 traffic.
- I need to bond 2 nic on this vlan3. this can't be done via gui. LACP protocol used.
1) first point: my bonding port bond0 has no explicitly assigned ip address. See config below. In theorie a hacker could gain access on my terramaster, reconfigure my network and assign himself an regular address. It is not blocked on switch level. (If I do so, the vlan 3 subnet won't work anymore)
2) second point: Define on switch level a LAG with 802.3ad (also called LACD) support.
3) for backup purposes, I keep a simple config created via the omv5 gui. This will be overwritten afterwards.
root@terramaster:/etc/netplan# ls
10-openmediavault-default.yaml 20-openmediavault-enp2s0.yaml 50-openmediavault-enp2s0.3.yaml
root@terramaster:/etc/netplan# cat 20-openmediavault-enp2s0.yaml
network:
ethernets:
enp2s0:
match:
macaddress: 6c:bf:b5:01:4d:53
addresses:
- 192.168.1.14/24
gateway4: 192.168.1.1
dhcp4: false
dhcp6: false
link-local: []
nameservers:
addresses:
- 192.168.1.1
search: [local.lan]
root@terramaster:/etc/netplan# cat 50-openmediavault-enp2s0.3.yaml
network:
vlans:
enp2s0.3:
addresses:
- 192.168.30.18/24
gateway4: 192.168.30.1
dhcp4: false
dhcp6: false
link-local: []
nameservers:
addresses:
- 192.168.30.1
search: [local.lan]
id: 3
link: enp2s0
root@terramaster:/etc/netplan# cat 10-openmediavault-default.yaml
network:
version: 2
renderer: networkd
root@terramaster:/etc/netplan#
Alles anzeigen
I created a 60-myconfig.yaml file. This file is executed after the other one. Pay attention, you may no longer apply network config via the gui. It will may clear /etc/netplan/*
root@terramaster:/etc/netplan# cat 60-myconfig.yaml
network:
version: 2
renderer: networkd
ethernets:
enp2s0:
match:
macaddress: 6c:bf:b5:01:4d:53
set-name: enp2s0
mtu: 9000
enx6cbfb5014d54:
match:
macaddress: 6c:bf:b5:01:4d:54
set-name: enx6cbfb5014d54
mtu: 9000
bonds:
bond0:
mtu: 9000
dhcp4: false
dhcp6: false
interfaces: [ enp2s0, enx6cbfb5014d54 ]
parameters:
mode: 802.3ad
lacp-rate: slow
mii-monitor-interval: 100
vlans:
bond0.3:
id: 3
link: bond0
addresses : [192.168.30.14/24]
gateway4: 192.168.30.1
nameservers:
search: [network.lan]
addresses: [192.168.30.1]
mtu: 9000
Alles anzeigen
execute and apply network:
netplan --debug try
netplan --debug generate
netplan --debug apply
systemctl restart networking
The last point is remaining. Keep you posted.
And my original question: still stands. omv doesn't like vlan tagging on my switch. I found a workaround by using bond0.3 subnetting without giving the bon0 interfaces an IP in the main subnet.
Hi
I did some more research:
- complete new install starting from my subnet (192.168.30.x): on vmware level everythings works fine. After that I need to convert to an img file, write it to my SD-card and put it on my omv nas.
- I connected a laptop to my omv network cable to check if my switch is configured well.
- my switch (zyxel 1900, L2 switch) is setup to tag all packages with vlan ID 3.
--> conclusion: I have the same issues: on ssh shell: dns is blocking; omv is not reachable from outsite; I can get dhcp addresses.
lesson: I learned omv is not blocking some IP's / IP's are not hardcoded insite. However, vlan tagging is not working as expected on omv.
Second experiment:
- create nic enp2s0 without vlan: 192.168.1.12 using omv-firstaid
- create vlan port on enp2so.3 (192.168.30.17)
- config switch to be on default (no vlan) network, be a trunk and let pass tagged ID3 traffic.
root@terramaster:/etc/netplan# cat 20-openmediavault-enp2s0.yaml
network:
ethernets:
enp2s0:
match:
macaddress: 6c:bf:b5:01:4d:53
addresses:
- 192.168.1.12/24
gateway4: 192.168.1.1
dhcp4: false
dhcp6: false
link-local: []
nameservers:
addresses:
- 192.168.1.12
search: [local.lan]
root@terramaster:/etc/netplan# cat 50-openmediavault-enp2s0.3.yaml
network:
vlans:
enp2s0.3:
addresses:
- 192.168.30.17/24
gateway4: 192.168.30.1
dhcp4: false
dhcp6: false
link-local: []
nameservers:
addresses:
- 192.168.30.1
search: [local.lan]
id: 3
link: enp2s0
Alles anzeigen
conclusion: both interfaces are working fine. Nice. It seems tagging traffic down the road on the switch is not a good idea with omv. However it works fine for other devices.
to be continued:
- I like to block regular access and only keep the tagged vlan3 traffic.
- I need to bond 2 nic on this vlan3. this can't be done via gui. LACP protocol used.
- I have a third 10Gbit nic which should directly connect, without switch, to one of my PC's.
Johan.
Hi
Maybe you cans describe exactly what you like to configure. Or what problem you encounter. The OVM5 gui let you create bonding out of the box. And via ssh interface you can extend the netplan config file with your own config.
Can that help?
Hi, I have a simular issue I think: omv5 or OS blocking network after subnet change
changing the ip is not the issue, reaching gui or internet from within my nas it is.
Hi
Problem: after changing subnet of omv5, the external connection to my nas and dns is no longer working
- I installed the latest omv5 on SD card (terramaster nas F4-422: intell cpu, 12Gb ram and 3 nic's insite) by creating an vmware image, convert the image, update grub, update os, (...) I used DHCP address with fixed lease of 192.168.1.12/24. Gateway and DNS given by dhcp: 192.168.1.1. Everything is working fine.
- I switched my server subnet 192.168.30.x/24 (by gui or omv-firstaid).
- Reboot.
Problem:
- DNS no longer working: on ssh prompt nlookup http://www.google.be -> no server found.
- external connection is no longer possible (e.g. ping)
However:
- after reboot: I got my dhcp addresses 192.168.30.12
- after reboot the ssh message is telling me my gui is available on 192.168.30.12:80
- on the ssh prompt I see my gui is listening on *:80. with telnet I can check this: ok. site reachable
What I tried:
network:
- omv-firstaid: nic fix addresses. somethimes it gave me errors back, sometimes not.
- omv-firstaid: reconfigure gui port
--> I checked /etc/netplan/* and applied netplan. It is not here where it is going wrong.
- restart nginx, reconfigure nginx: "omv-salt stage run deploy"
- I make sure apache is off.
- iptables => alle chains accept. No firewall configured.
- routing: my routes for the new subnet looks fine.
DNS:
- manual overwrite dns in /etc/resolv.conf by adding my dns server
I slowly realised it is propably not the omv install itself, but somewhere in my OS level, my subnet is hardcoded. When I go back to the old subnet, everything is working fine.
Can someone point me out where else I can dig?
regards
Johan.