- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Creating a New 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
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-11-2010 11:37 AM
тАО03-11-2010 11:37 AM
Red Hat Enterprise Linux Client release 5.3 (Tikanga)
Hi
I'm prety much a Red Hat newbie and need some basic help about LVM and disk partitions. Here is some basic info. as well as an attached file.
# fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 2113 16771860 83 Linux
/dev/sda3 2114 2635 4192965 83 Linux
/dev/sda4 2636 9729 56982555 5 Extended
/dev/sda5 2636 2896 2096451 82 Linux swap / Solaris
/dev/sda6 2897 3157 2096451 83 Linux
/dev/sda7 3158 3418 2096451 83 Linux
###################################
# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 16246460 3127272 12280596 21% /
/dev/sda6 2030736 40552 1885364 3% /tmp
/dev/sda3 4061572 138748 3713176 4% /var
/dev/sda7 2030736 36072 1889844 2% /var/tmp
/dev/sda1 194442 16305 168098 9% /boot
tmpfs 451964 0 451964 0% /dev/shm
The attachement is 'system-config-lvm'. Note the 'initialize entry' button is not highlighted.
a) Could you explain to me what I am seeing?
b) Could you explain how to add in a vg, lvol, file system from here?
thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2010 12:04 PM
тАО03-11-2010 12:04 PM
Re: Creating a New File System
What you are seeing IMO is a system that does not use LVM.
None of the partitions are marked LVM and no volume groups have been created.
To add a volume group now would require allocation of a new disk partition, marking it as LVM with fdisk and running vgcreate to create a volume group.
If the system is not in production, I'd seriously consider doing the OS install again.
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
тАО03-11-2010 12:17 PM
тАО03-11-2010 12:17 PM
Re: Creating a New File System
Kinda thought that.
My goal is to add in another file system and take advantage of the current space provided.
Question: See previous attachement for "/dev/sda4 Extended" - How can I use this to make a new, what?, partition?, slice?, subdisk? and then mount a file system to it?
Question: See NEWLY attached. /dev/sda, unpartitioned space. 48 GB. Same question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2010 02:01 PM
тАО03-11-2010 02:01 PM
SolutionI saw the un-partitioned space while closing your openoffice doc. and felt pretty stupid about my original answer.
Lets say the device is /dev/sdg
fdisk to create a lvm (8e) partition
# May need to use partprobe or boot to force a kernel sync.
pvcreate /dev/sdg1
# Might if you try more than once to use -f or -ff
vgcreate test_vg /dev/sdg1
lvcreate -l 48G test_vg
mkfs.ext3 /dev/test_vg/lvol1
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
тАО03-11-2010 03:34 PM
тАО03-11-2010 03:34 PM
Re: Creating a New File System
On the UNIX-away path too? ;^))
From your fdisk, it appears your sda device (I trust this is a RAID disk?) - you have ~ 51.9gb remaining (6311 cyclinders). You can carve an sda8 "partition" by invoking fdisk and spec'ing the start and end cyl/block. Once done (you can do a partprobe to ensure the part table is reread).
Then you can either create a filesystem directly on sda8 (mkfs.ext3 /dev/sda8) OR make it into a PV and eventually a member of a VG (whose gyration is very much the same as HP-UX LVM -- but easier - as SEP outlined...)
Enjoy.
Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2010 06:39 PM
тАО03-11-2010 06:39 PM
Re: Creating a New File System
I can see /dev/sda8. But I still don't know how to use the space in "/dev/sda4 Extended" 48 gb.
Why can't I make a file system out of this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 05:40 AM
тАО03-12-2010 05:40 AM
Re: Creating a New File System
sda4 is your "extended" partition from which sda5,sda6...sda8 is "allocated" from. DO NOT ever use your extended parition as you could corrupt the paritions contained within.
PC Styles disks are limited to 4 "Primary" paritions of which 1 needs to be extended parition IF you want to carve your disk beyond the 4 parition limit.
That is why LVM saves the day for us as it can slice and dice a whole disk or a parition of a whole disk far wider than native slicing plus other perks.
Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 08:05 AM
тАО03-12-2010 08:05 AM
Re: Creating a New File System
If you are used to HP-UX LVM, in Linux a partition is the equivalent of the PV in HP-UX. A disk can have max. 4 primary partitions, or 3 primary and an extended partition, as Alzhy wrote.
I prefer utilizing the 'whole disk approach' also in Linux, so create a single partition to each disk you want to have in the LVM config. (fdisk/cfdisk) The rest is similar to the HP-UX method. Do a pvcreate for each partition, vgcreate/vgextend, etc...
If it is a testmachine with limited number of disks, you could create 4 primary partitions to each physical disk. That way you will have 4 times the PV than the physical disks, and have some room to experiment with the various allocation policies, etc...
In a production environment you must always create a single partition per disk, that way you can ensure that a disk won't be utilized for different LVs/FSs. The performance suffers if the disk head must be relocated back and forth.
It isn't necessary to create a partition anyway, the /dev/sd[a-z] devices can also be used with LVM, the existing partitions can be deleted. But this way there won't be any sign of the LVM usage on the disks - the LVM type can be set only to a partition.
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 09:50 AM
тАО03-12-2010 09:50 AM
Re: Creating a New File System
Note: After performing NOTE: that pvcreate failed due to a linux bug in /etc/lvm/lvm.conf. I am documenting it here.
pvcreate /dev/sda8
ERROR: 'disk doesn't exist, or is being filtered'
vi /etc/lvm/lvm.conf
devices ()
# filter = [ "r|^/dev/mapper/.*-lv.*|", "a|^/dev/mapper/.*|", "r/.*/" ]
filter = [ "r|^/dev/mapper/.*-lv.*|", "a|^/dev/mapper/.*|"]
Note: The last arguement is removed or errors on pvcreate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2010 09:51 AM
тАО03-12-2010 09:51 AM