The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Backup drive died

Discussion in 'General Discussion' started by sonicsam, Mar 26, 2013.

  1. sonicsam

    sonicsam Member

    Joined:
    Apr 5, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I am running Centos 6 as a VM on hyper-v.

    I have a backup iSCSI drive attached to my Hyper-V server which I store backup .vhd drives for VMs. This iSCSI device recently died and had to be reattached and reformatted so loosing all the data on the drive, luckily it is only backup data.

    I reformatted and recreated the drives for the VMs, however I am now stuck as a linux noob I don't know how to remove the old drive and re-attach the new drive to centos.

    From ssh i see

    # ls /dev/sd*
    /dev/sda /dev/sdb /dev/sdb1 /dev/sdc /dev/sdc1 /dev/sdc2

    /sdb is the backup drive with /backup mounted to /sdb1

    Obviously this is the old non-existent drive, it does not seem to see the new drive (I think I need to reboot the VM and give permissions for accessing the new drive to the vm before it will show up). It will then need reformatting and remounting /backup to the new drive.

    What I am not sure about is safely removing the old device and adding the new device/formatting within Centos.

    Any help appreciated.
     
  2. Jeff Shotnik

    Jeff Shotnik Well-Known Member

    Joined:
    Oct 10, 2012
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Denver, Colorado, United States
    cPanel Access Level:
    DataCenter Provider
    If you setup and attached a scsi drive via Hyper-v, you'll likely need to restart your VM as you stated. Make sure you edit the /etc/fstab and remove the backup drive line before restarting or else you may be dumped to the maintenance shell upon reboot. Once you reboot, find which device is the new iscsi device with `fdisk -l`, then setup your partitions with `fdisk /dev/sdX`. Once partitions are written, format your new partition with `mkfs.ext4 /dev/sdXY`. Once formatted you can edit /etc/fstab to create your filesystem entry, then mount.

    If you need more detailed steps let me know.
     
  3. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Have you access to hyperv node ? I think you will also have to take help of hyperv control panel in case of reattaching new .vhd file
    Your host will help you in this case.
     
Loading...

Share This Page