• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Examples of using vxdiskunsetup command

by admin

– vxdiskunsetup command is used to remove the vxvm configuration from the disk. Its works the opposite way of the command vxdisksetup.
– vxdiskunsetup command remove the public and private regions created by the command vxdisksetup command.
– vxdiskunsetup command turns the disk flags from online to error.

check the options available in the vxdiskunsetup command :

# /etc/vx/bin/vxdiskunsetup  -h
VxVM vxdiskunsetup INFO V-5-2-6407 
vxdiskunsetup - remove a disk from use by the volume manager

Usage: vxdiskunsetup [-C] [-f] [-o shred[=1|3|7]] device ...

Options:
    -C  Clear import locks
    -o  shred[=1|3|7]
	Shred user data on the disk using 1, 3 or 7 pass overwrite
	Defaults to 1-pass overwrite if none is specified.
    -f  Forceful operation. When used with the shred operation,
	allows shredding of SSD disks.

Disk status (emc0_caca) before vxdiskunsetup :

DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:none       -            -            online invalid
disk_1       auto:LVM        -            -            online invalid
emc0_caca    auto:cdsdisk    -            -            online

Disk Status after vxdiskunsetup

DEVICE       TYPE            DISK         GROUP        STATUS
disk_0       auto:none       -            -            online invalid
disk_1       auto:LVM        -            -            online invalid
emc0_caca    auto:none       -            -            online invalid

Examples

Here are few examples,
1. To perform a basic vxdiskunsetup with -C option which remove any host locks presents and forces the de-configuration of the disk :

# /etc/vx/bin/vxdiskunsetup -C emc0_caca

2. To perform a vxdiskunsetup on a disk that is member of a deported disk group :

# /etc/vx/bin/vxdiskunsetup -f emc0_caca

3. You can also overwrite the datab on the disk while doing the vxdiskunsetup, e.g. shred the disk with 3 passes :

# /etc/vx/bin/vxdiskunsetup -o shred=3 emc0_caca

Filed Under: VxVM

Some more articles you might also be interested in …

  1. VxVM tutorials : Volume layouts and layered volumes
  2. VxVM tutorials : Volume resize with vxassist and vxresize
  3. VxVM Tutorials : Creating Volume and file system
  4. VxVM tutorials : Replacing a failed disk under VxVM
  5. VxVM tutorials : Comparing layered and non-layered volumes
  6. VxVM Tutorials : Installing VxVM in a VMware Workstation virtual machine
  7. VxVM tutorials : Root disk Encapsulation and Mirroring

You May Also Like

Primary Sidebar

Recent Posts

  • “az storage blob” Command Examples (Manage blob storage containers and objects in Azure)
  • “az storage account” Command Examples (Manage storage accounts in Azure)
  • “az sshkey” Command Examples (Manage ssh public keys with virtual machines)
  • “az redis” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright