Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Veritas - remove disks

Status
Not open for further replies.

neuralnode

Technical User
Sep 12, 2007
59
PL
Hi All,

Situation: a 6.5TB veritas filesystem (/dev/vx/dsk/ln-dg/ln1vol) consisting of the following volumes and disks:

# vxdisk -o alldgs -e list | grep ln-dg
EMC2_0 auto ln-dg01 ln-dg online c6t60060480000290
EMC2_2 auto ln-dg02 ln-dg online c6t60060480000290
EMC2_3 auto ln-dg03 ln-dg online c6t60060480000290
EMC2_4 auto ln-dg04 ln-dg online c6t60060480000290
EMC2_5 auto ln-dg05 ln-dg online c6t60060480000290
EMC2_6 auto ln-dg07 ln-dg online c6t60060480000290
EMC2_7 auto ln-dg08 ln-dg online c6t60060480000290
EMC2_8 auto ln-dg09 ln-dg online c6t60060480000290
EMC2_9 auto ln-dg10 ln-dg online c6t60060480000290
EMC2_10 auto ln-dg06 ln-dg online c6t60060480000290
EMC2_11 auto ln-dg11 ln-dg online c6t60060480000290
EMC2_12 auto ln-dg12 ln-dg online c6t60060480000290
EMC2_13 auto ln-dg13 ln-dg online c6t60060480000290
EMC2_14 auto ln-dg14 ln-dg online c6t60060480000290
EMC2_15 auto ln-dg15 ln-dg online c6t60060480000290

The Task: Shrink the filesystem to 4TB, and free/remove the unused disks.

How do I do that?
How can I tell veritas to free specific disks of any data?
Or, how can I verify which disks have been freed of data and are ready to be safely removed?

Thank you in advance!

--
 
What is the layout of the volume? vxprint -thg ln-dg output would clarify.

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
-------

root@lotus1 /root # vxprint -thg ln-dg
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME RVG KSTATE STATE NVOLUME
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
EX NAME ASSOC VC PERMS MODE STATE
SR NAME KSTATE

dg ln-dg default default 7000 1247732452.32.lotus1

dm ln-dg01 EMC2_0 auto 65536 548562688 -
dm ln-dg02 EMC2_2 auto 65536 548562688 -
dm ln-dg03 EMC2_3 auto 65536 548562688 -
dm ln-dg04 EMC2_4 auto 65536 548562688 -
dm ln-dg05 EMC2_5 auto 65536 548562688 -
dm ln-dg06 EMC2_10 auto 65536 1097191168 -
dm ln-dg07 EMC2_6 auto 65536 1097191168 -
dm ln-dg08 EMC2_7 auto 65536 1097191168 -
dm ln-dg09 EMC2_8 auto 65536 1097191168 -
dm ln-dg10 EMC2_9 auto 65536 1097191168 -
dm ln-dg11 EMC2_11 auto 65536 1097191168 -
dm ln-dg12 EMC2_12 auto 65536 1097191168 -
dm ln-dg13 EMC2_13 auto 65536 1097191168 -
dm ln-dg14 EMC2_14 auto 65536 1097191168 -
dm ln-dg15 EMC2_15 auto 65536 1097191168 -

v ln1vol - ENABLED ACTIVE 13714725120 SELECT - fsgen
pl ln1vol-01 ln1vol ENABLED ACTIVE 13714725120 CONCAT - RW
sd ln-dg01-01 ln1vol-01 ln-dg01 0 548562688 0 EMC2_0 ENA
sd ln-dg02-01 ln1vol-01 ln-dg02 0 548562688 548562688 EMC2_2 ENA
sd ln-dg03-01 ln1vol-01 ln-dg03 0 548562688 1097125376 EMC2_3 ENA
sd ln-dg04-01 ln1vol-01 ln-dg04 0 548562688 1645688064 EMC2_4 ENA
sd ln-dg05-01 ln1vol-01 ln-dg05 0 548562688 2194250752 EMC2_5 ENA
sd ln-dg07-01 ln1vol-01 ln-dg07 0 1097191168 2742813440 EMC2_6 ENA
sd ln-dg08-01 ln1vol-01 ln-dg08 0 1097191168 3840004608 EMC2_7 ENA
sd ln-dg09-01 ln1vol-01 ln-dg09 0 1097191168 4937195776 EMC2_8 ENA
sd ln-dg10-01 ln1vol-01 ln-dg10 0 1097191168 6034386944 EMC2_9 ENA
sd ln-dg06-01 ln1vol-01 ln-dg06 0 1097191168 7131578112 EMC2_10 ENA
sd ln-dg11-01 ln1vol-01 ln-dg11 0 1097191168 8228769280 EMC2_11 ENA
sd ln-dg12-01 ln1vol-01 ln-dg12 0 1097191168 9325960448 EMC2_12 ENA
sd ln-dg13-01 ln1vol-01 ln-dg13 0 1097191168 10423151616 EMC2_13 ENA
sd ln-dg14-01 ln1vol-01 ln-dg14 0 1097191168 11520342784 EMC2_14 ENA
sd ln-dg15-01 ln1vol-01 ln-dg15 0 1097191168 12617533952 EMC2_15 ENA




-------
 
In that case it is a simple concatenated volume, which is good news for you. What type of filesystem is it? You can check using mount -v | grep ln1vol (paste the output here if you aren't sure.

The first thing you need to do is shrink the filesystem. Then shrink the volume. Then remove the unused disks from the disk group. The disks you'll free up will be ln-dg13, ln-dg14 and ln-dg15, and possibly ln-dg12 as well depending on whether you want just under or just over 4TB in the end.

If it is "vxfs", shrinking both the filesystem and the volume can be done in one step, using vxresize -bF vxfs -g ln-dg ln1vol 4t. Assuming that succeeds, if you run vxdg -g ln-dg free you should see the disks you can remove listed with free space starting at offset 0 and extending the length of the disk.

You can then remove them from the disk group using vxdg -g ln-dg rmdisk ln-dg15, for example.

If you then want to use them for something other than Volume Manager disk groups, you should unconfigure them using commands like vxdiskunsetup EMC2_15.


Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
Minor correction, change:

Code:
vxresize -bF vxfs -g ln-dg ln1vol 4t

to:

Code:
vxresize -bF vxfs -g ln-dg ln1vol 4096g

... since Symantec/Veritas don't seem to be keeping pace with technology lately!

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
I'm curious to know whether that worked for you?

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
Annihilannic,

Thank you for your help!
I will try it probably next weekend, when the works are given green light from our business.
I'll surely let you know! ;)

--
 
Just to make sure I'm giving you the right information regarding the filesystem, can you post the output of mount -v | grep ln1vol?

Note that all of this work should be possible online, no outage required, although I can understand if you choose to schedule it on a weekend to be sure, to be sure.

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
--

# mount -v | grep ln1vol

/dev/vx/dsk/ln-dg/ln1vol on /lotus type vxfs read/write/setuid/devices/delaylog/largefiles/ioerror=mwdisable/dev=4841b58 on Sun Jul 19 19:10:03 2009

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top