- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- problem creating new lvol
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
05-23-2006 10:42 PM
05-23-2006 10:42 PM
When trying to activate it says there is already a filesystem on the lvol :
[nlxmar04:/]# lvcreate vg00
Logical volume "/dev/vg00/lvol17" has been successfully created with
character device "/dev/vg00/rlvol17".
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
[nlxmar04:/]# lvextend -l 1 /dev/vg00/lvol17
/dev/dsk/c2t0d0
Logical volume "/dev/vg00/lvol17" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
[nlxmar04:/]# lvextend -m 1 /dev/vg00/lvol17 /dev/dsk/c2t1d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol17" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
[nlxmar04:/]# lvextend -L 4000 /dev/vg00/lvol17 /dev/dsk/c2t0d0 /dev/dsk/c2t1d0
Logical volume "/dev/vg00/lvol17" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
[nlxmar04:/]# swapon -a
Enabling device paging on /dev/vg00/lvol17.
swapon: Device /dev/vg00/lvol17 contains a file system.
The system will page in the space after the end of the file system.
Add `end' to the options field in /etc/fstab to turn off this warning.
Can anyone tell me what happened ?
I get this on 8 different servers.
OS HP-ux 11.11
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2006 10:48 PM
05-23-2006 10:48 PM
Re: problem creating new lvol
lvcreate -L 4000 -n swapvol2 -C y -r n /dev/vg00
Then
lvextend -m 1 /dev/vg00/swapvol2 /dev/dsk/c2t1d0
Then add entry in /etc/fstab
/dev/vg00/swapvol2 swap swap defaults 0 0
then swapon -a
Regards,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2006 10:50 PM
05-23-2006 10:50 PM
Re: problem creating new lvol
see "man lvcreate" for more information.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2006 10:58 PM
05-23-2006 10:58 PM
Re: problem creating new lvol
If you are make swap on lvol containing filesystem use option.
# swapon -fa /dev/vg00/vlol17
Cheers,
Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2006 10:59 PM
05-23-2006 10:59 PM
Re: problem creating new lvol
Use command # swapon -f
Cheers,
Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2006 11:04 PM
05-23-2006 11:04 PM
Re: problem creating new lvol
lvcreate -L 4000 -n swapvol2 -s y -C y -r n /dev/vg00
and if you have PV groups then add the 2 disks in the 2 different PV groups and use
lvcreate -L 4000 -n swapvol2 -s g -C y -r n /dev/vg00
Regards,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2006 11:15 PM
05-23-2006 11:15 PM
Re: problem creating new lvol
did it your way but stil get the same error :
[nlxmar04:/]# lvcreate -L 4000 -m 1 -s y -C y -r n /dev/vg00
Logical volume "/dev/vg00/lvol17" has been successfully created with
character device "/dev/vg00/rlvol17".
Logical volume "/dev/vg00/lvol17" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
added antry in fstab:
/dev/vg00/lvol17 ... swap defaults 0 0
[nlxmar04:/]# swapon -a
Enabling device paging on /dev/vg00/lvol17.
swapon: Device /dev/vg00/lvol17 contains a file system.
The system will page in the space after the end of the file system.
Add `end' to the options field in /etc/fstab to turn off this warning.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2006 11:20 PM
05-23-2006 11:20 PM
Re: problem creating new lvol
with "swapon -fa
I tried this already on an other system:
[nlxmar03:root:/]# swapinfo -t
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 1084664 3109640 26% 0 - 1 /dev/vg00/lvol2
dev 950272 3680 946592 0% 3145728 - 1 /dev/vg00/lvol17
reserve - 1690224 -1690224
memory 3131132 2648244 482888 85%
total 8275708 5426812 2848896 66% - 0 -
[nlxmar03:root:/]# lvdisplay /dev/vg00/lvol17
--- Logical volumes ---
LV Name /dev/vg00/lvol17
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 4000
Current LE 250
Allocated PE 500
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
So that does not solve my problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2006 11:44 PM
05-23-2006 11:44 PM
Re: problem creating new lvol
Are you sure you created the volume with the command I gave, because in the lvdisplay its showing bac block on and Allocation is not showing as contiguous.
I think the previous swapon -a command added the swap device, and not sure how it allowed to create lvol17 again if the volume was activated as swap.
I think you need to reboot the server after removing the the entry for this swap device from /etc/fstab.
Then delete the volume and create it with the command I mentioned. Check the volume if it is showing strict/contiguous allocation and bad block allocation off
Then add entry in /etc/fstab and then use swapon -a
Regards,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2006 11:54 PM
05-23-2006 11:54 PM
Re: problem creating new lvol
in my reply to Rajesh I was talking about another server, and there badblock allocation is on.
I created the lvol with the command you gave ( see reply to you )but the swapdevice is not added becuase ir says there is already a filesystem on it. I tried to force it on another ser with the same problem and than it is added , but only for a part.
Strange is after deleting the lvol and recreating it your way , it still says there is a filesystem on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2006 12:17 AM
05-24-2006 12:17 AM
Re: problem creating new lvol
What does fstyp -v /dev/vg00/lvol17 show ?
You said you created a new lvol and did not create a filesystem using newfs - is that right ?
Then its really strange.
Try fstyp to see if really a filesystem is there.
Regards,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2006 12:20 AM
05-24-2006 12:20 AM
Re: problem creating new lvol
vxfs
version: 4
f_bsize: 8192
f_frsize: 1024
f_blocks: 1048576
f_bfree: 1047214
f_bavail: 981764
f_files: 261832
f_ffree: 261800
f_favail: 261800
f_fsid: 1073741841
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 0
f_fsindex: 7
f_size: 1048576
[nlxmar04:/]# lvdisplay /dev/vg00/lvol17
--- Logical volumes ---
LV Name /dev/vg00/lvol17
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 4000
Current LE 250
Allocated PE 500
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default
No I did not use newfs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2006 12:26 AM
05-24-2006 12:26 AM
Re: problem creating new lvol
check for filesystem on /dev/vg00/lvol17 with:
fstyp /dev/vg00/lvol17
also check if there is an /dev/vg00/lvol17 entry in the lvmtab file in add at the swap line.
then try with this procedure:
# lvcreate -C y -L
# lvchange -r n /dev/vg00/lvswap2 (bad block off)
# lvchange -c n -M n /dev/vg00/lvswap2 (Mirror Write cache off)
# lvlnboot -d /dev/vg00/lvswap2
# vi /etc/fstab add:
/dev/vg00/lvswap2 ... swap pri=1 0 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2006 12:30 AM
05-24-2006 12:30 AM
SolutionNow try mounting the filesystem to a temporary directory - see if there are any contents you wish to have.
If yes copy the stuff somewhere else and unmount ,
If not unmount the filesystem
do a
prealloc /tmp/testfile 10000000
This will create a file with nulls of the size 10MB
The zero out the filesystem metadata from the lvol17
dd if=/tmp/testfile of=/dev/vg00/lvol17
Now try swapon -a , I think this should work
Regards,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2006 12:43 AM
05-24-2006 12:43 AM
Re: problem creating new lvol
this works.
thanks for your time investigating.
greetz,
Barry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2006 01:04 AM
05-24-2006 01:04 AM