- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: extend ext3 partition used as NFS share
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
тАО01-14-2010 10:59 AM
тАО01-14-2010 10:59 AM
I have the following disk used as an NFS share on an RHEL 4U4 system:
df -T /dev/sdg1
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sdg1 ext3 141106132 123913684 10024652 93% /share
fdisk -l /dev/sdg
Disk /dev/sdg: 299.9 GB, 299999442944 bytes
255 heads, 63 sectors/track, 36472 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdg1 * 1 17847 143355996 83 Linux
/dev/sdg2 17848 36472 149605312+ 83 Linux
/dev/sdg1 is the NFS share and is nearly full
/dev/sdg2 is not used
I'd like to extend /dev/sdg1 to use all of /dev/sdg
This is not a system or boot disk, it can be unmounted.
How do I accomplish this?
Thank you,
Doug
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2010 01:09 PM
тАО01-14-2010 01:09 PM
Re: extend ext3 partition used as NFS share
Backup, destroy, repartition and recreate your file system. Restore your data. Use LVM this time if you can.
Create a file system in sdg2 and mount it in a directory /share.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2010 01:10 PM
тАО01-14-2010 01:10 PM
SolutionYou are not using lvm
You can not easily accomplish this.
fdisk /dev/sdg
Use the menus to set the partition type of partition 2 to 8E lvm
pvcreate -f /dev/sdg2
vgcreate vgnfs /dev/sdg2
vgdisplay vgnfs
# to get the number of PE's available for the next command.
lvcreate -l ####### vgnfs
This will allow to copy all the data from the /dev/sdg1 partition to the sdg2 parition.
Do that.
umount the file system make sure NFS is shut down first.
change the mount instructions in /etc/fstab to mount the new logical volume
mount /
fdisk /dev/sdg
mark partition 1 to 8e LVM
pvcreate -f /dev/sdg1
vgextend vgnfs /dev/sdg1
pvdisplay /dev/sdg1 # to get number ##### for the next command double it.
lvextend -L ###### /dev/vgnfs/lvol0
resize2fs /dev/vgnfs/lvol0
If this is Red hat 4, use ext2online instead of rsize2fs to extend the file system.
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
тАО01-14-2010 02:32 PM
тАО01-14-2010 02:32 PM
Re: extend ext3 partition used as NFS share
I had been considering converting this to LVM but was finding conflicting info as to whether or not LVM and NFS are compatible.
Based on your feedback this seems possible.
Just to be clear, am I able to share an LV via NFS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2010 11:38 PM
тАО01-14-2010 11:38 PM
Re: extend ext3 partition used as NFS share
you share file system (or better - a directory on a FS), not a LV, so it doesn't matter what is FS created on.
emha.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2010 03:09 AM
тАО01-15-2010 03:09 AM
Re: extend ext3 partition used as NFS share
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2010 07:50 AM
тАО01-15-2010 07:50 AM
Re: extend ext3 partition used as NFS share
>Create a file system in sdg2 and mount it in a directory /share.
If you would go this way and create a sub-mount then do not forget about the 'crossmnt' option in /etc/exports. Otherwise the sub-mount /share/sdg2 won't be visible on the NFS clients.
man 5 exports:
"crossmnt
This option is similar to nohide but it makes it possible for clients to move from the filesystem marked with crossmnt to exported filesystems mounted on it. Thus when a child filesystem "B" is mounted on a parent "A", setting crossmnt on "A" has the same effect as setting "nohide" on B.
"
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2010 08:06 AM
тАО01-15-2010 08:06 AM
Re: extend ext3 partition used as NFS share
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2010 08:10 AM
тАО01-15-2010 08:10 AM