Operating System - HP-UX
1753449 Members
6342 Online
108794 Solutions
New Discussion юеВ

Re: Removing logical volume has not freed up disk space on the volume group

 
SOLVED
Go to solution
Mark Parsons
Valued Contributor

Removing logical volume has not freed up disk space on the volume group

Hi,

 

I have removed a logical volume from a volume group via SAM but because our /tmp area was full it has only removed the entry from fstab and not freed up the disk space on the volume group. I have since manually removed the entries from /dev/"volume-group-name". Is there an easy way to do this - other than reboot?

 

Many thanks - Mark P.

5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: Removing logical volume has not freed up disk space on the volume group

What exactly were you trying to accomplish by removing an LV from a VG?  How did you you expect that to effect the /tmp area?

 

If /tmp is getting full, you need to remove files from it.

 

# cd /tmp

# du -ks * | sort -n

 

Will show you the items using the most disk space in /tmp.

Matti_Kurkela
Honored Contributor

Re: Removing logical volume has not freed up disk space on the volume group

I assume the LV removal was not a reaction to /tmp being full: more likely it was a planned and correct operation which just happened to fail because /tmp was full.

 

If the LVM data structures (in binary format, both on the disk and in /etc/lvmtab) have not been changed properly, a reboot won't cause the disk space to be freed.

 

As the LV is apparently now unmounted and removed from /etc/fstab, the only remaining step would have been removing it with the lvremove command:

lvremove /dev/<VGname>/<LVname>

 

However, removing the lvol/rlvol entries from /dev/<VGname> manually may have complicated the LV removal. Can you restore the entries? If you can, you should be able to just run the lvremove command as above.

MK
Mark Parsons
Valued Contributor

Re: Removing logical volume has not freed up disk space on the volume group

You obviously need a tiny bit of space on /tmp to be able to remove logical volumes / volume groups using SAM.

Mark Parsons
Valued Contributor

Re: Removing logical volume has not freed up disk space on the volume group

Sorry - lvremove command didn't work:

 

# ls
group           lvEAYP          lvdata          lvreports       rlvCLICON       rlvWHDBS        rlvoralogs      rlvtrace
lvBUSOBJ        lvEYFAS         lvlogs          lvsafety        rlvDEVBUSOB     rlvadmin        rlvproduct
lvCAST          lvPRDPTRFN      lvops           lvsoftware      rlvDEVPTRFN     rlvarchivelogs  rlvproduction
lvCLICON        lvWHDBS         lvoralogs       lvtrace         rlvEAYP         rlvdata         rlvreports
lvDEVBUSOB      lvadmin         lvproduct       rlvBUSOBJ       rlvEYFAS        rlvlogs         rlvsafety
lvDEVPTRFN      lvarchivelogs   lvproduction    rlvCAST         rlvPRDPTRFN     rlvops          rlvsoftware
# lvremove /dev/vgEVA/lvCAST
lvremove: Couldn't delete logical volume "/dev/vgEVA/lvCAST":
The supplied lv number refers to a non-existent logical volume.
Volume Group configuration for /dev/vgEVA has been saved in /etc/lvmconf/vgEVA.conf
# ls
group           lvEAYP          lvdata          lvreports       rlvCLICON       rlvWHDBS        rlvoralogs      rlvtrace
lvBUSOBJ        lvEYFAS         lvlogs          lvsafety        rlvDEVBUSOB     rlvadmin        rlvproduct
lvCAST          lvPRDPTRFN      lvops           lvsoftware      rlvDEVPTRFN     rlvarchivelogs  rlvproduction
lvCLICON        lvWHDBS         lvoralogs       lvtrace         rlvEAYP         rlvdata         rlvreports
lvDEVBUSOB      lvadmin         lvproduct       rlvBUSOBJ       rlvEYFAS        rlvlogs         rlvsafety
lvDEVPTRFN      lvarchivelogs   lvproduction    rlvCAST         rlvPRDPTRFN     rlvops          rlvsoftware

Mark Parsons
Valued Contributor
Solution

Re: Removing logical volume has not freed up disk space on the volume group

Sorry - meant to say that I restored the logical volumes file(s) from backup.