Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

After adding a second drive to the VM in vSphere, follow these steps to mount the drive at a specified mount point.

short version

#Get the SCSI host# 
ls /sys/class/scsi_host

#Send a SCSI host rescan request; replace host# with the result above
echo "- - -" > /sys/class/scsi_host/host#/scan
#Verify that the second disk /dev/sdb shows up with specified size
fdisk -l
#Create a single partition for the drive
fdisk /dev/sdb

      #Create a new partitition
      n
      
      #Primary partition
      p

      #Partition #1
      1
      
      #First cylinder = 1
      <RETURN>

      #Last cylinder of drive = the rest of the drive
      <RETURN>

      #Print the partition table to verify      
      p

      #Write the table to disk
      w

#Format the drive with ext3 filesystem
mkfs.ext3 /dev/sdb1

#Create mount point
mkdir /mnt/backup

#Add the following line to /etc/fstab
/dev/sdb1      /mnt/backup    ext3    defaults       1 2

#Mount the drive
mount /mnt/backup

#Check disk usage (optional)
df –h

long version

see attached session stdout here

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.