Rename Harddisk ?

  • Hello


    Is it possible to rename a HDD ?


    Regard

    Server:
    BitFenix Phenom M - ASRock B75 Pro3-M - 8GB Crucial B.S. - Intel G2140 - Corsair CX430M - 1x 64GB SanDisk SDSSDP (system) - 2x 2TB WD20EARX (data) - 1x 3TB WD30EFRX (Snapraid) - TBS6981 DVB-S2 - OMV 0.5x

    • Offizieller Beitrag

    If it is ext3/4, use e2label command.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Hi guys


    This is something I would also like to do as I have a drive /dev/sdd1 which doesn't have a drive name at all could you give me the command I would need to use to give it the name "movies"



    Many thanks




    Graeme

  • e2label


    Usage of e2label is simple. manpage for e2label shows following command line options,


    e2label device [ new-label ]


    device can be the entire drive or a partition.
    eg.
    /dev/sda is the entire drive
    /dev/sda1 is the first partition of device /dev/sda
    /dev/sda2 is the second partition of device /dev/sda


    eg. to show the label of /dev/sda1 and /dev/sda3


    # e2label /dev/sda1
    /boot


    # e2label /dev/sda3
    /


    To change the label for /dev/sda3, do as follows,
    # e2label /dev/sda3 changed-label


    and to confirm the change was done sucessfully,
    # e2label /dev/sda3
    changed-label


    if you want a / in front of the label,


    # e2label /dev/sda3 /changed-label


    to verify that the change was done,


    # e2label /dev/sda3
    /changed-label


    if you want the server to be able to boot next time round, ensure changes are made to /etc/fstab as well. Otherwise, on the next boot, you may be prompted with errors, eg.


    fsck.ext3: Unable to resolve 'LABEL=/boot'
    fsck.ext3: Unable to resolve 'LABEL=/'


    in which case, you can boot up with a rescue disk, eg. CentOS installation disk, enter "linux rescue" at prompt; chroot /mnt/sysimage and edit /etc/fstab accordingly. Alternatively, if you are prompted for root password, and gets a shell, you may be able to edit /etc/fstab. If the filesystem is readonly, remount the filesytem readwrite. eg. mount -o remount,rw /

  • Thank you very much for the instructions it worked perfectly


    I haven't tried rebooting yet or made any changed to the /etc/fstab file as I don't really know what to change, the drive I renamed was not a boot drive or have / at the beginning, will it still be necessary to edit /etc/fstab




    Many thanks




    Graeme

  • Hi


    I tried the e2label command but now i seem to have two srv subdirectories for one single HDD


    i had a directory called
    '/srv/disk-bylabel-3TB'
    which corresponds to a single HDD called /dev/sdc1


    and i used
    # e2label /dev/sdc1 3TBE


    now i have two direcotories
    '/srv/disk-bylabel-3TB'
    and
    '/srv/disk-bylabel-3TB'


    what gives? how do i fix this?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!