Change label of disk

  • Hi,


    If I'm correct it's not possible to change the label of a disk via the webconfig, but I suppose that I can do this via the terminal. Does this not cause trouble?

  • Since the disks are most likely mounted by label, it will cause issues.

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Oke, so you advice don't do it.. Thanks!

    If you remove the shared folders on the disk and unmount it in the web interface, you could re-label it and mount it again in the web interface if you really want to change it.

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Quote


    If you remove the shared folders on the disk and unmount it in the web interface, you could re-label it and mount it again in the web interface if you really want to change it.


    Oke, how do I re-label it because "xfs_admin" gives me a error.



    Quote


    You will likely find some helpful information in this thread where I asked a similar question.


    Thanks! Chenking...

  • re-label the disk is now working! User error.. :)


    Quote

    root@openmediavault:/srv# xfs_admin -L Disk21 /dev/sdb1
    writing all SBs
    new label = "Disk21"

    Update: you also have to umount the disk to make it work.

  • You can also label your OS drive. It's uses the ext4 filesystem.


    Quote

    root@openmediavault:/srv/dev-disk-by-label-Disk01# e2label /dev/sdj1 OS


    You can label a drive with ext4 filesystem mounted.

  • Better DO NOT USE filesystem labels.


    Is there a different system you'd recommend? All my data disks contain one partition of max size, and I use the filesystem label to indicate where the drive is physically in my case (A1 is top row, first column, C3 is third row, third column, etc.).

  • Better DO NOT USE filesystem labels.

    Please remind me what designator OMV writes into fstab if filesystem labels are not used. Thanx!

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

  • Please remind me what designator OMV writes into fstab if filesystem labels are not used. Thanx!

  • You can set them while creation in the CLI, but OMV does not support them anymore. When creating a filesystem via UI there is no ability to set a label, too.

    Thanks. Doing so (setting them up in CLI) won't mess up anything with OMV, right? I know OMV prefers config done through the GUI, and and not CLI. I'm a bit tired of reinstalling. I have probably done about 10 reinstalls over the last couple weeks, learning the system and messing up (all my fault). Also, in another thread, a user suggested using symlinks. Would this be a preferable option to using Labels?

    OMV is an amazing system--thanks for all your work. I can't believe I had never heard of it, before the last few weeks. It's really is a hidden gem--I was testing it on 10-12 year old hardware---and it was running flawlessly, and bring new life to hardware that crawls with windows.

  • Thanks. Doing so (setting them up in CLI) won't mess up anything with OMV, right?

    If you mount the filesystem via the GUI of OMV, they will be mounted by UUID (unless it is btrfs).

    You have to mount the filesystem using the GUI if you want to use them with OMV. Otherwise they will not be available when creating shared folders.

  • If you mount the filesystem via the GUI of OMV, they will be mounted by UUID (unless it is btrfs).

    You have to mount the filesystem using the GUI if you want to use them with OMV. Otherwise they will not be available when creating shared folders.

    The drives are already mounted in the GUI, and available for OMV. The "problem" is that for basic file backup, I am using OMV, but for other services, I am using Docker containers. And since I haven't found a way to setup/edit these in a GUI (in OMV 6), I am have to do a lot of this through CLI, and constantly referencing these long paths with UUID's. So I'm trying to figure out the best way to give them a persistent alias, that I can use to refer to them (the drives instead).
    Please bear with the noob questions. I am not a Linux guru--so what's obvious to someone who is knowledgeable, escapes me (for now)...

  • So I'm trying to figure out the best way to give them a persistent alias, that I can use to refer to them

    The Symlinks plugin hasn’t been ported to OMV6 yet, but Symlinks are super easy to set up from the command line:


    Code
    # Set a Symlink:
    ln -s /path/to/original /path/to/folder
    # Example:
    ln -s /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c/media /srv/media
    # Remove a Symlink:
    rm /path/to/folder

    Easy data backup: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, Wetty, & Heimdall - NanoPi M4 (v.1): backups using Rsync and Rsnapshot - Odroid XU4 (Using DietPi): PiHole - hc2, xu4, Pi 3B+, Odroid H2, and VirtualBox: Testing and playing - Mac user converting to Linux, Debian 10 KDE.

  • Or you could do it this way:


    ln -s /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c /srv/disk1


    Then you can use

    /srv/disk1/media

    /srv/disk1/appdata

    Easy data backup: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, Wetty, & Heimdall - NanoPi M4 (v.1): backups using Rsync and Rsnapshot - Odroid XU4 (Using DietPi): PiHole - hc2, xu4, Pi 3B+, Odroid H2, and VirtualBox: Testing and playing - Mac user converting to Linux, Debian 10 KDE.

  • The drives are already mounted in the GUI, and available for OMV. The "problem" is that for basic file backup, I am using OMV, but for other services, I am using Docker containers. And since I haven't found a way to setup/edit these in a GUI (in OMV 6), I am have to do a lot of this through CLI, and constantly referencing these long paths with UUID's. So I'm trying to figure out the best way to give them a persistent alias, that I can use to refer to them (the drives instead).
    Please bear with the noob questions. I am not a Linux guru--so what's obvious to someone who is knowledgeable, escapes me (for now)...

    A couple of things...


    1. OMV 6 is still beta software.. If you're this much of a newb, you should have started with omv 5


    2. As Agricola said.. the answer to your problem is symlinks. OMV 5 has a plugin to handle this, however as he pointed out, setting them up via command line, is not difficult.


    3. If you don't know, type the first few characters of your UUID, and hit the tab button to auto complete it. It will auto complete until' there is a duplicate (if there is one) or if there is no duplicate, it will complete the path.


    I created a simple directory on my root directory (NAS) and that is where I keep all my symlinks. You will need to give a user read/write permission to this directory to make this work (create a user in the webUI)...


    Code
    root@openmediavault:~# cd /
    root@openmediavault:/# sudo mkdir NAS
    root@openmediavault:/#
    root@openmediavault:/# sudo chown -R ken:users /NAS
    root@openmediavault:/# ls -l | grep NAS
    drwxr-xr-x 2 ken users 4096 Aug 29 11:52 NAS
    root@openmediavault:/#

    Once the user has read/write permission on the directory.. the symlinks are a breeze. I only have two directories symlinked.. 1 is AppData (where all my /config folders are for docker)... and the other is /Media. I basically symlinked all my Media folders (movies, tv shows, books, music, etc.).. most of which I use for docker... under the media folder... Just pay attention when creating directories, etc... as if you're not careful you'll create them on your OS disk, and that could cause you a problem, especially if you have a small OS drive... easy way to check your symlinks are working properly, is to cd into the directory and ls -l, and it should look something like this (you can see the path it's symlinked to after the ->


    Code
    root@openmediavault:/NAS/Media# cd /NAS
    root@openmediavault:/NAS# ls -l
    total 0
    lrwxrwxrwx 1 root root 33 Apr 30 07:50 AppData -> /srv/dev-disk-by-label-D1/AppData
    root@openmediavault:/NAS#

    Learn symlinks.. it will make your life way easier.

    Air Conditioners are a lot like PC's... They work great until you open Windows.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!