OpenMediaVault: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
 
(51 intermediate revisions by the same user not shown)
Line 1: Line 1:
Before start the '''installation process''', please read the '''[[#Precaution|Precaution]]''' section carefully.
<source lang="bash">
<source lang="bash">
cat <<EOF >> /etc/apt/sources.list.d/openmediavault.list
cat <<EOF >> /etc/apt/sources.list.d/openmediavault.list
Line 18: Line 20:
export DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
export APT_LISTCHANGES_FRONTEND=none
wget -qO - https://packages.openmediavault.org/public/archive.key | apt-key add -


wget -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" \
apt update
https://packages.openmediavault.org/public/archive.key
apt list --upgradable


apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc"
apt --yes \
apt-get update
 
apt-get --yes \
--auto-remove \
--auto-remove \
--show-upgraded \
--show-upgraded \
Line 40: Line 40:
# login information
# login information
cat /etc/issue
cat /etc/issue
adduser pi ssh
</source>
==Warning==
{|
| valign="top" |
'''Password Issue:'''
─┬────────────────────────────────────
  ├─ 1. '''Access Rights Management'''
  ├─ 2. User    » Select » Edit
  ├─ 3. Password » Confirm
  └─ 4. Save    » Apply
| valign="top" |
'''SSH Access:'''
─┬────────────────────────────────────
  ├─ 1. '''Access Rights Management'''
  ├─ 2. User    » Select » Edit
  ├─ 3. Groups  » ssh    » checked
  └─ 4. Save    » Apply
|}
==Admin==
<source lang="bash">
cat /etc/issue
http://cid.chorke.org
user: admin
pass: openmediavault
</source>
==Precaution==
curl -sSL https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
Keep in mind before start installation with '''curl|bash''' or '''wget|bash''', your host name should be as simple as like '''pi03'''. Don't use host name like '''pi03.dev.shahed.biz'''. Else following error will be occurred! It would be quite difficult to resolve if you have to relay on '''ssh''' without any '''Physical Monitor'''!
----
<source lang="bash">
: <<'END_COMMENT'
      ID: configure_netplan_ethernet_eth0
Function: file.managed
    Name: /etc/netplan/20-openmediavault-eth0.yaml
  Result: False
Comment: Unable to manage file: Jinja error: hostname: The value 'pi03.dev.shahed.biz' is not a valid hostname.
          Traceback (most recent call last):
          --more-skipped--
            File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 419, in _check_format
              name, "The value '%s' is not a valid hostname." % value
          openmediavault.json.schema.SchemaValidationException: hostname: The value 'pi03.dev.shahed.biz' is not a valid hostname.
          --more-skipped--
Started: 12:12:05.781514
Duration: 87.883 ms
Changes:
END_COMMENT
</source>
----
<source lang="bash">
: <<'END_COMMENT'
      ID: configure_netplan_wifi_wlan0
Function: file.managed
    Name: /etc/netplan/30-openmediavault-wlan0.yaml
  Result: False
Comment: Unable to manage file: Jinja error: hostname: The value 'pi03.dev.shahed.biz' is not a valid hostname.
          Traceback (most recent call last):
          --more-skipped--
            File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 419, in _check_format
              name, "The value '%s' is not a valid hostname." % value
          openmediavault.json.schema.SchemaValidationException: hostname: The value 'pi03.dev.shahed.biz' is not a valid hostname.
          --more-skipped--
Started: 12:12:05.869744
Duration: 68.04 ms
Changes:
END_COMMENT
</source>
==Config OMV==
<code>vim /etc/openmediavault/config.xml</code>
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<config>
  <version>0.1</version>
  <system>
    <fstab>
      <mntent>
        <uuid>ba953ce2-1095-40ce-92fa-6d996493e53d</uuid>
        <fsname>/dev/disk/by-id/usb-External_USB3.0_DISK04_20170331000C3-0:0-part1</fsname>
        <dir>/nas/nas_00</dir>
        <type>ext4</type>
        <opts>defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl</opts>
        <freq>0</freq>
        <passno>2</passno>
        <hidden>0</hidden>
      </mntent>
    </fstab>
  </system>
</config>
</source>
<code>vim /etc/fstab</code>
<source lang="ini" start="6" line>
# >>> [openmediavault]
/dev/disk/by-id/usb-External_USB3.0_DISK04_20170331000C3-0:0-part1 /nas/nas_00 ext4 defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
# <<< [openmediavault]
</source>
==Samba Share==
systemctl status smbd
systemctl restart smbd
apt install smbclient
smbclient -L 10.20.13.10
smbclient \\\\10.20.13.10\\academia
vim /etc/samba/smb.conf
cat /var/log/samba/log.nmbd.1
tail -f /var/log/samba/log.nmbd.1
useradd -s /sbin/nologin academia
smbpasswd -a academia
smbpasswd -x academia
==Good To Know==
<source lang="bash">
df -h
apt update
apt upgrade
apt list --upgradable
vcgencmd measure_temp
ls -lah /etc/apt/trusted.gpg.d/
ls -lah /etc/apt/sources.list.d/
rsync -avuzb --exclude '*~' samba:sourcedir/ targetdir/
rsync -av --exclude={'*.txt','dir3','dir4'} sourcedir/ targetdir/
rsync -av --exclude-from={'/chorke/academia/ignore/rsync.txt'} sourcedir/ targetdir/
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
wget -qO - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -
curl -sSL https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
</source>
</source>


==References==
==References==
* [http://wagnerstechtalk.com/rpi4omv/ RPi 4B NAS with OpenMediaVault]
{|
* [https://www.openmediavault.org/ What is OpenMediaVault?]
| valign="top" |
* [https://forum.openmediavault.org/index.php?thread/19820-how-to-modify-omv-mount-point-and-add-shared-folders/ Modify OMV Mount Point & add Shared Folders]
* [https://serverfault.com/questions/917846/ Samba share Accessible but Access denied]
* [http://wagnerstechtalk.com/rpi4omv/ Raspberry Pi 4 NAS with OpenMediaVault]
* [https://dbtechreviews.com/2019/12/how-to-install-openmediavault-on-raspberry-pi-4/ Install OpenMediaVault on Raspberry Pi 4]
* [https://forum.openmediavault.org/index.php?thread/31163 Pi Password Changed After Install OMV]
* [https://phoenixnap.com/kb/rsync-exclude-files-and-directories Rsync To Exclude Files And Directories]
* [https://github.com/OpenMediaVault-Plugin-Developers/installScript OpenMediaVault Plugin Developers]
* [https://openmediavault.readthedocs.io/en/5.x/development/internaltools.html OpenMediaVault Internal Tools]
* [https://www.openmediavault.org/ OpenMediaVault]
* [https://github.com/bobafetthotmail/folder2ram Folder To RAM]
 
| valign="top" |
* [https://serverfault.com/questions/744312/ Samba share Access denied from Windows 10]
* [https://openmediavault.readthedocs.io/en/latest/administration/services/samba.html OpenMediaVault Samba]
 
|}

Latest revision as of 09:33, 12 August 2021

Before start the installation process, please read the Precaution section carefully.

cat <<EOF >> /etc/apt/sources.list.d/openmediavault.list
deb https://packages.openmediavault.org/public usul main
# deb https://downloads.sourceforge.net/project/openmediavault/packages usul main
## Uncomment the following line to add software from the proposed repository.
# deb https://packages.openmediavault.org/public usul-proposed main
# deb https://downloads.sourceforge.net/project/openmediavault/packages usul-proposed main
## This software is not part of OpenMediaVault, but is offered by third-party
## developers as a service to OpenMediaVault users.
# deb https://packages.openmediavault.org/public usul partner
# deb https://downloads.sourceforge.net/project/openmediavault/packages usul partner
EOF

Install

export LANG=C.UTF-8
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
wget -qO - https://packages.openmediavault.org/public/archive.key | apt-key add -

apt update
apt list --upgradable

apt --yes \
--auto-remove \
--show-upgraded \
--allow-downgrades \
--allow-change-held-packages \
--no-install-recommends \
--option Dpkg::Options::="--force-confdef" \
--option DPkg::Options::="--force-confold" \
install openmediavault-keyring openmediavault

# populate the database
omv-confdbadm populate

# login information
cat /etc/issue
adduser pi ssh

Warning

Password Issue:
─┬────────────────────────────────────
 ├─ 1. Access Rights Management
 ├─ 2. User     » Select » Edit
 ├─ 3. Password » Confirm
 └─ 4. Save     » Apply
SSH Access:
─┬────────────────────────────────────
 ├─ 1. Access Rights Management
 ├─ 2. User     » Select » Edit
 ├─ 3. Groups   » ssh    » checked
 └─ 4. Save     » Apply

Admin

cat /etc/issue
http://cid.chorke.org

user: admin
pass: openmediavault

Precaution

curl -sSL https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
Keep in mind before start installation with curl|bash or wget|bash, your host name should be as simple as like pi03. Don't use host name like pi03.dev.shahed.biz. Else following error will be occurred! It would be quite difficult to resolve if you have to relay on ssh without any Physical Monitor!

: <<'END_COMMENT'
      ID: configure_netplan_ethernet_eth0
Function: file.managed
    Name: /etc/netplan/20-openmediavault-eth0.yaml
  Result: False
 Comment: Unable to manage file: Jinja error: hostname: The value 'pi03.dev.shahed.biz' is not a valid hostname.
          Traceback (most recent call last):
          --more-skipped--
            File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 419, in _check_format
              name, "The value '%s' is not a valid hostname." % value
          openmediavault.json.schema.SchemaValidationException: hostname: The value 'pi03.dev.shahed.biz' is not a valid hostname.
          --more-skipped--
 Started: 12:12:05.781514
Duration: 87.883 ms
 Changes:
END_COMMENT

: <<'END_COMMENT'
      ID: configure_netplan_wifi_wlan0
Function: file.managed
    Name: /etc/netplan/30-openmediavault-wlan0.yaml
  Result: False
 Comment: Unable to manage file: Jinja error: hostname: The value 'pi03.dev.shahed.biz' is not a valid hostname.
          Traceback (most recent call last):
          --more-skipped--
            File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 419, in _check_format
              name, "The value '%s' is not a valid hostname." % value
          openmediavault.json.schema.SchemaValidationException: hostname: The value 'pi03.dev.shahed.biz' is not a valid hostname.
          --more-skipped--
 Started: 12:12:05.869744
Duration: 68.04 ms
 Changes:
END_COMMENT

Config OMV

vim /etc/openmediavault/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
  <version>0.1</version>
  <system>
    <fstab>
      <mntent>
        <uuid>ba953ce2-1095-40ce-92fa-6d996493e53d</uuid>
        <fsname>/dev/disk/by-id/usb-External_USB3.0_DISK04_20170331000C3-0:0-part1</fsname>
        <dir>/nas/nas_00</dir>
        <type>ext4</type>
        <opts>defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl</opts>
        <freq>0</freq>
        <passno>2</passno>
        <hidden>0</hidden>
      </mntent>
    </fstab>
  </system>
</config>

vim /etc/fstab

# >>> [openmediavault]
/dev/disk/by-id/usb-External_USB3.0_DISK04_20170331000C3-0:0-part1		/nas/nas_00	ext4	defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl	0 2
# <<< [openmediavault]

Samba Share

systemctl status smbd
systemctl restart smbd
apt install smbclient
smbclient -L 10.20.13.10
smbclient \\\\10.20.13.10\\academia
vim /etc/samba/smb.conf
cat /var/log/samba/log.nmbd.1
tail -f /var/log/samba/log.nmbd.1
useradd -s /sbin/nologin academia
smbpasswd -a academia
smbpasswd -x academia

Good To Know

df -h
apt update
apt upgrade
apt list --upgradable
vcgencmd measure_temp

ls -lah /etc/apt/trusted.gpg.d/
ls -lah /etc/apt/sources.list.d/

rsync -avuzb --exclude '*~' samba:sourcedir/ targetdir/
rsync -av --exclude={'*.txt','dir3','dir4'} sourcedir/ targetdir/
rsync -av --exclude-from={'/chorke/academia/ignore/rsync.txt'} sourcedir/ targetdir/

rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
wget -qO - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -

curl -sSL https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

References