Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a disk on a server: /dev/VolGroup00/LogVol02 that is about 5TB.

I would like to format and partition it to make 2 500GB mount points. It doesn't even have to be in LVM. How can I take this disk out of LVM so that I can use a tool such as parted to break up the disk to the needed 500GB mount points?

lvs:

 LV       VG         Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 -wi-ao  30.00G
  LogVol01 VolGroup00 -wi-ao 127.91G
  LogVol02 VolGroup00 -wi-ao   4.76T

pvs:

PV                  VG         Fmt  Attr PSize   PFree
  /dev/cciss/c0d0p2   VolGroup00 lvm2 a--    1.64T    0
  /dev/cciss/c0d1p1   VolGroup00 lvm2 a--    3.27T    0
  /dev/mpath/mpath0p2 VolGroup00 lvm2 a--  405.88G    0

vgs:

VG         #PV #LV #SN Attr   VSize   VFree
  VolGroup00   1   2   0 wz--n- 405.88G    0
  VolGroup00   2   3   0 wz--n-   4.91T    0

df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       30G  7.4G   21G  27% /
/dev/cciss/c0d0p1      99M   30M   65M  32% /boot
tmpfs                  63G     0   63G   0% /dev/shm
/dev/mapper/mpath6p1  551G  151G  373G  29% /oracletest/r12
/dev/mapper/mpath2p1  4.5T  2.1T  2.2T  48% /oracletest/r12/db/apps_st/data
/dev/mapper/mpath3p1  1.5T  674G  762G  47% /oracletest/r12/db/apps_st/index
/dev/mapper/mpath4p1   92G   31G   57G  35% /oracletest/r12/db/apps_st/undo
/dev/mapper/mpath5p1  276G  151G  111G  58% /oracletest/r12/db/apps_st/temp
remoteserver.domain.com:/oaprod/dir
                      6.3T  3.8T  2.3T  63% /oaprod/dir
/dev/mapper/VolGroup00-LogVol02
                      4.7T  3.0T  1.5T  67% /oracletest_old << this one
share|improve this question
    
Thats not a disk, its a device map block device. It could already be made from multiple disks in its own right. Provide the result of 'lvs', 'pvs' and 'vgs'. –  Matthew Ife Mar 10 at 1:36
    
Updated with more information. –  에이바 Mar 10 at 1:45

1 Answer 1

up vote 1 down vote accepted

I think you've missed the point of LVM entirely.

If you don't want a 4.76TB logical volume, then shrink it or delete it and make your own in whatever sizes you want.

lvremove /dev/VolGroup00/LogVol02
lvcreate -L 500G -n myfirstvolume VolGroup00
lvcreate -L 500G -n mysecondvolume VolGroup00

mkfs -t ext4 /dev/VolGroup00/myfirstvolume
mkfs -t ext4 /dev/VolGroup00/mysecondvolume
share|improve this answer
    
lvremove /dev/mapper/VolGroup00-LogVol02 Can't remove open logical volume "LogVol02" –  에이바 Mar 10 at 1:48
    
You obviously have to unmount it first before you can destroy it. –  Michael Hampton Mar 10 at 1:49
    
Ah, it was some folders that were using bind to the old device-mapper... Thanks. –  에이바 Mar 10 at 2:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.