- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Physically removing a file system?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 12:20 PM
11-19-2008 12:20 PM
Physically removing a file system?
I tried using "lvremove" then "lvcreate" but it still says the LV has a file system even though I'm not recreating one (i.e. I am NOT using newfs or mkfs). It's as though using "lvremove" doesn't actually erase the data even though the man page says it does.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 12:26 PM
11-19-2008 12:26 PM
Re: Physically removing a file system?
> I tried using "lvremove" then "lvcreate" but it still says the LV has a file system even though I'm not recreating one
Post (exactly) the sequence of commands you have used, please, including how you then attempt to create your swap.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 12:28 PM
11-19-2008 12:28 PM
Re: Physically removing a file system?
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 08:20 PM
11-19-2008 08:20 PM
Re: Physically removing a file system?
Thanks
SKR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2008 08:28 PM
11-19-2008 08:28 PM
Re: Physically removing a file system?
Please unmount the FS.
Do a lvremove then do a lvcreate. It will work.
Manoj K
Manoj K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2008 12:06 AM
11-20-2008 12:06 AM
Re: Physically removing a file system?
Add the Logical volume to your device swap, and I assure you that not much will be left of the filesystem that was on it as soon as the system starts swapping to the volume.
There is no need to driop an LV and create one specific for swap. an LV is an LV and is just a storage area. What you do with it is up to you. Device swap does not need any pre-formatting, just use it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2008 12:14 AM
11-20-2008 12:14 AM
Re: Physically removing a file system?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2008 04:12 AM
11-20-2008 04:12 AM
Re: Physically removing a file system?
Here's an experiment I just did (this works on 11.23 and 11.31):
=======================
# lvcreate -l 5 -n lvtest vg00
Logical volume "/dev/vg00/lvtest" has been successfully created with
character device "/dev/vg00/rlvtest".
Logical volume "/dev/vg00/lvtest" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# newfs -F vxfs /dev/vg00/rlvtest
version 5 layout
81920 sectors, 81920 blocks of size 1024, log size 1024 blocks
unlimited inodes, largefiles not supported
81920 data blocks, 80808 free data blocks
3 allocation units of 32768 blocks, 32768 data blocks
last allocation unit has 16384 data blocks
# mkdir /test
# mount /dev/vg00/lvtest /test
# echo "test data" > /test/file1
# cat /test/file1
test data
# umount /test
# lvremove /dev/vg00/lvtest
The logical volume "/dev/vg00/lvtest" is not empty;
do you really want to delete the logical volume (y/n) : y
Logical volume "/dev/vg00/lvtest" has been successfully removed.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvcreate -l 5 -n lvtest vg00
Logical volume "/dev/vg00/lvtest" has been successfully created with
character device "/dev/vg00/rlvtest".
Logical volume "/dev/vg00/lvtest" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# mount /dev/vg00/lvtest /test
# cat /test/file1
test data
=====================
Notice I did NOT rerun "newfs" the second time I made the LV.
Try the above commands yourself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2008 04:30 AM
11-20-2008 04:30 AM
Re: Physically removing a file system?
Please unmount the filesystem, stop using lvremove and lvcreate and start using swapon on the logical volume and go ahead with your extra device swap.
That was what you want to do, not ? Don't bother about the filesystem. It will be overwritten (and thereby destroyed) by swap activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2008 04:41 AM
11-20-2008 04:41 AM
Re: Physically removing a file system?
Simply issuing 'lvremove' does not do anything to the underlying physical disk's data as you found aside from destroying the metadata in the LVM header that relates to the logical volume. This is expected.
Did you do your device swap creation along these lines?
# lvcreate -C y -r n -l 5 -n lvolN /dev/vg00
# swapon -p 0 /dev/vg00/lvolN
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2008 04:42 AM
11-20-2008 04:42 AM
Re: Physically removing a file system?
lvremove does nothing more than remove a configuration line in the lvm configuration file and mark the extents as unused. It's like deleting a file : The pointer to the file in the directory is removed, and th block are set "available" but the effective file is still there.
lvcreate does nothing more than adding a line in the lvm configuration file and mark the extents as used.
So if you lvremove an LV and the lvcreate another LV of the same size, the filesystem will indeed be still there. Even if you lvcreate a smaller LV, the filesystem will seem to be there, until you write it full and the filesystem wants to access blocks that are now outside the LV.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2008 05:30 AM
11-20-2008 05:30 AM
Re: Physically removing a file system?
Using the "-f" option with swapon did the trick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2008 07:17 AM
11-20-2008 07:17 AM