Hello
Is it possible to rename a HDD ?
Regard
Hello
Is it possible to rename a HDD ?
Regard
If it is ext3/4, use e2label command.
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?
It is easy to fix. Rename the HDD back to the original name and restore the root filsystem from backup.
i Renamed it back , then deleted the extra HDD "rm dev-disk-by-label-name" and it seems ok now.
what is the correct way to rename a HDD label in OMV?
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!