Apr 5, 2012
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.

Jeff Shotnik

Well-Known Member
Oct 10, 2012
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.