- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Filesystem extend on a mirrored VG
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
Discussions
Discussions
Forums
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
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
тАО03-31-2007 10:20 PM
тАО03-31-2007 10:20 PM
I have got a question while I am trying to extend a filesystem which is already mirrored.
For example, I have a file system /abc which is mounted on the following path: /dev/vg00/lvol3, and as far as I known, the vg00 is mirrored, should I perform the following steps in order to extend the filesystem /abc to 400MB??
#lvextend -L 400 /dev/vg00/lvol3
#lvextend -m 1 /dev/vg00/lvol3
#fsadm -b 400M /abc
Many thanks, I appreciate if anyone can answer my question.
Cheers
Sun33
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2007 11:56 PM
тАО03-31-2007 11:56 PM
SolutionThis type of situation always twisted my brain.
What I normally did was to break the mirror, extend the logical volume and re-mirror.
That avoids headaches.
Prior to doing this, I would run lvdisplay -v on the logical volume and plane hte space.
So lvextend -m 0 /dev/vg00/lvol3
(don't think this will work may need lvsplit
lvextend /dev/vg00/lvol3
lvextend -m 1 /dev/lvol3
fsadm
It gets more fun if you have to extend the mirror to a different disk than you were using for the original logical volume.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2007 03:37 AM
тАО04-01-2007 03:37 AM
Re: Filesystem extend on a mirrored VG
Thanks for your kindly reply, according to your suggestion: 1) Break the mirror, 2) lvextend, 3) Re-mirror, and 4) filesystem extend, I have been thinking about the following commands. Should the set of commands looks like this??
(Assume that lvol3 is the LV that needed to be increased in size (to 400MB), /dev/dsk/c?t?d? is the mirror disk device, and /ora is mounted on lvol3, and finally, lvol3 and mirror disk are different PV)
#lvreduce -m 0 /dev/vg00/lvol3 /dev/dsk/c?t?d?
#lvextend -L 400 /dev/vg00/lvol3
#lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c?t?d?
#fsadm -b 400M /ora
Thank you very much for your help
Best Regards
Sun33
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2007 04:30 AM
тАО04-01-2007 04:30 AM
Re: Filesystem extend on a mirrored VG
There is *no* need to break the mirror. Simply 'lvextend' with the new size specification and target the physical devices that will hold the mirrored extents:
# lvextend -L 400 /dev/vgNN/lvolN /dev/dsk/cXtYdZ /dev/dsk/cZtYdX
Now, that said, in your case, extending the logical volume is probably going to fail anyway. 'lvol3' of 'vg00' is the root filesystem which *must* be 'strict' and 'contiguous'. The 'contiguous' allocation requirement means that physical extents must exist without gaps. Your 'lvol4' will likely lie next to 'lvol3' and will have used the contiguous physical extents that you seek to extend into.
A better question is why you think you need to extend the root filesystem. Unless you are upgrading an OS there is little need if you manage it correctly. An Ignite restoration of 'vg00' and and re-specification of the logical volume sizes during that restoration is the safest and surest method to extend 'lvol3'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2007 07:00 AM
тАО04-01-2007 07:00 AM
Re: Filesystem extend on a mirrored VG
Find a spare disk and move:
strings /etc/lvmtab |grep c7t0d6
pvcreate -f /dev/rdsk/c7t0d6
vgextend /dev/vg00 /dev/dsk/c7t0d6
lvdisplay -v /dev/vg00/lvol4 |more
lvreduce -m 0 /dev/vg00/lvol4
lvdisplay -v /dev/vg00/lvol4 |more
pvmove -n /dev/vg00/lvol4 /dev/dsk/c0t6d0 /dev/dsk/c7t0d6
lvextend -L 1024 /dev/vg00/lvol3
fsadm -b 1024M /
pvmove -n /dev/vg00/lvol4 /dev/dsk/c7t0d6 /dev/dsk/c0t6d0
vgreduce /dev/vg00 /dev/dsk/c7t0d6
lvextend -m 1 /dev/vg00/lvol4
I have done it many times and it has never failed.
If you don't have a spare disk, then you split away all you lvols on vg00 and use that as your spare disk :-). Remember to mirror your vg00 after the move.
To be on the safe site make a ignite backup before you start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2007 09:43 PM
тАО04-02-2007 09:43 PM
Re: Filesystem extend on a mirrored VG
no need to do anything with the mirror.
I am taking that lvol3 is just an example and that you are not trying to extend / (which is actually quite possible and easy without any ignite/sparedisks ways, though as whole not supported) - nevertheless the only serious reason I can think of for needing / extend is to have new volumegroups with their lvm config files introduced to the system, which situation happens from time to time.
First of all, check volumegroup PE size and logical volume extent distribution via:
# vgdisplay -v vg00
# lvdisplay -v /dev/vg00/lvol3
see for the lines like:
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c2t4d0 00211 current /dev/dsk/c5t4d0 00372 current
00001 /dev/dsk/c2t4d0 00212 current /dev/dsk/c5t4d0 00373 current
00002 /dev/dsk/c2t4d0 00213 current /dev/dsk/c5t4d0 00374 current
PV1 (/dev/dsk/c2t4d0) is original and PV2 (/dev/dsk/c5t4d0) is the mirror.
Then you can extend via:
# lvextend -l
I use -l option and putting total number of logical extents (like PE has 4M and we want 400M logical volume, then we use -l 100). -L is not that good, it rounds up (might round in incorrect way while using pvg distribution, but that's another story).
Recheck extend distribution via:
# lvdisplay -v /dev/vg00/lvol3
There should be consistent distribution, like PV1 in first row and PV2 in second row etc.
Extend the filesystem via:
# fsadm -F vxfs -b 400M /abc
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2007 02:57 AM
тАО04-03-2007 02:57 AM
Re: Filesystem extend on a mirrored VG
Just simply lvextend, and fsadm to grow the filesystem.
-tjh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2007 04:16 AM
тАО04-03-2007 04:16 AM
Re: Filesystem extend on a mirrored VG
It seemed like your emails have been erroneously forwarded to my Yahoo email account. Would you please take a look at the email address you registered with this HP support forum and see if there's any typo in it?
Thanks!
Sunny