Generate UUID from HDD with Systemfiles already installed

  • Hello,


    I did something wrong yesterday and removed /dev/sdc1 (which is one of my harddrive) from the menu Storage\Filesystems in OMV.
    I would like to know if all the data on this harddrive are lost ?
    If not, is there a way to generate or retrieve the UUID of this HDD without formatting it again and add it back to /etc/fstab, /etc/openmedaivault/config.xml and /media/{UUID} ?


    Thanks a lot for your help !


    M0zArT.


    Original post :

  • Hope it is not your system drive?


    First of all the partition table lacks the entry. Luckyly if you did nothing else with the parition table and filesystems, the data are still on the disk.


    PLEASE MAKE A BACKUP OF YOUR CURRENT PARTITION TABLE! (if it is empty, you can ignore that :) )


    You can search for deleted partitions with testdisk: http://www.cgsecurity.org/wiki/TestDisk


    If you want to run testdisk on OMV directly you need to install it:


    Code
    apt-get install testdisk


    You can also do a full dd of the disk in question and run the command on another linux box or you can put this disk into another linux box. I prefer running it in place.


    After you found the partition, you can recreate it with parted or fdisk or even sfdisk. You should backup your partition table with fsdisk before if there is anything else on that disk.


    The UUID is not part of the partitiontable, but stored IN the partition itself. So the data should be still there. You can look it up (after recoverying the partition table entry) with blkid.


    Example for my root disk:

    Code
    root@openmediavault:~# blkid /dev/sda1
    /dev/sda1: UUID="938b4767-55a3-4c29-9b59-9e6a169ba92c" TYPE="ext4"

    Everything is possible, sometimes it requires Google to find out how.

Jetzt mitmachen!

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