LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-29-2015, 04:07 PM   #1
alunel
LQ Newbie
 
Registered: Mar 2015
Posts: 4

Rep: Reputation: Disabled
Trouble with fdisk


I got this configuration.

fdisk -l

Disk /dev/sda: 493.9 GB, 493921239040 bytes
255 heads, 63 sectors/track, 60049 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002ac38

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 32636 261630976 8e Linux LVM

Disk /dev/mapper/vg_gazduire-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_gazduire-lv_swap: 5100 MB, 5100273664 bytes
255 heads, 63 sectors/track, 620 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_gazduire-lv_home: 209.1 GB, 209119608832 bytes
255 heads, 63 sectors/track, 25424 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


df -h

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_gazduire-lv_root
50G 21G 27G 44% /
tmpfs 2.4G 0 2.4G 0% /dev/shm
/dev/sda1 485M 161M 299M 35% /boot
/dev/mapper/vg_gazduire-lv_home
192G 17G 166G 9% /home
/usr/tmpDSK 2.0G 981M 955M 51% /tmp


I want to increase the /dev/sda1 with aproximativ 200 gb who remains ! My plans are: i want to make /dev/sda3 and i want to put in
vg_gazduire!

VG Name vg_gazduire
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 249.51 GiB
PE Size 4.00 MiB
Total PE 63874
Alloc PE / Size 63874 / 249.51 GiB
Free PE / Size 0 / 0



When i type fdisk /dev/sda3 the system give me Unable to open /dev/sda3!

Could anyone tell me the solution?
 
Old 03-29-2015, 05:08 PM   #2
millgates
Member
 
Registered: Feb 2009
Location: 192.168.x.x
Distribution: Slackware
Posts: 840

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by alunel View Post
When i type fdisk /dev/sda3 the system give me Unable to open /dev/sda3!
From fdisk manpage:

Code:
SYNOPSIS
       fdisk [-uc] [-b sectorsize] [-C cyls] [-H heads] [-S sects] device
and (emphasis added)

Code:
       The device is usually /dev/sda, /dev/sdb or so.  A device  name  refers
       to  the entire disk.
/dev/sda3 is not the entire disk. It is just a single partition. It doesn't have a partition table of its own, so it makes no sense to run fdisk on it.

That said,
Quote:
I want to increase the /dev/sda1 with aproximativ 200 gb who remains ! My plans are: i want to make /dev/sda3 and i want to put in
vg_gazduire!
I find this somewhat confusing. So what is it you actually want to do? Increase sda1 or create sda3? Increasing sda1 will be expensive since it is immediately followed by sda2 on the disk and I fail to see how it would help you accomplish creating sda3. Perhaps I missed/misunderstood something in your post.
 
Old 03-29-2015, 07:16 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,840

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
I think the OP simply wants to create a new partition using the unallocated free space to use as a new pv which can then be used to extend the vg. Pretty standard. A simple google "create new partition for lvm" found several useful hits.
As mentioned fdisk on /dev/sda is the place to start to create the new partition.
 
1 members found this post helpful.
Old 03-29-2015, 07:22 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,939

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
I assume that /dev/sda1 was a typo and the OP actually meant /dev/sda2. To add the unallocated space to the existing volume group vg_gazduire you can either create another partition i.e physcial volume and add that space to your volume group or just enlarge your existing /dev/sda2. How do you want to add the space i.e. to an existing logical volume or create a new one?
 
Old 03-30-2015, 01:39 PM   #5
alunel
LQ Newbie
 
Registered: Mar 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
I have a vds specifications above. I recently wanted to increase the capacity of / dev / sda1 with the 200 gb . I spent . they are seen as you can see in / dev / sda but can not create new partition . fdisk / dev / sda3 Can not open . My methods increased / dev / sda1 were 1) made ​​another partition / dev / sda3 and allocated in the same volume with / dev / sda1 or 2) increase / dev / sda1 with resize2fs .

I did the same operation on different vds my system and I could go all the way operations . first and hardest problem is that fdisk does not let me create another partition .

any working solution is good.
 
Old 03-30-2015, 01:59 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,939

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
What linux distribution are you running?

It is typical of distributions that automatically use LVM to create two partitions i.e one for /boot i.e /dev/sda1 and the rest in an LVM i.e /dev/sda2 in your case. There is no reason to increase capacity of your /boot partition with the 200 GB. That is why I assumed an error.

As stated the correct syntax is fdisk /dev/sda not fdisk /dev/sda3.

Now in the lvm you have /,/home and I assume swap. Do you want to add the additional 200 GB to / or /home or create a new volume group? You can create a new partition without being part of the LVM too.
 
Old 03-30-2015, 02:22 PM   #7
alunel
LQ Newbie
 
Registered: Mar 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
centos.6.6 type I distribution . I need some space for both large databases . every day make a backup mysql and if it has no space falls database . I was able to add 200 gb and I chose you add in all the partition . the biggest problem is that I can not create / dev / sda3 . Practical fdisk command / dev / sda3 back Unable to open / dev / sda3 . so I can not create new partition ! This is the main problem !
 
Old 03-30-2015, 02:46 PM   #8
millgates
Member
 
Registered: Feb 2009
Location: 192.168.x.x
Distribution: Slackware
Posts: 840

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Of course it is unable to open /dev/sda3. There is no sda3. You haven't created it yet. Also, you don't open partitions with fdisk. Instead of
Code:
fdisk /dev/sda3
use (as mentioned earlier)
Code:
fdisk /dev/sda
 
1 members found this post helpful.
Old 03-30-2015, 03:12 PM   #9
alunel
LQ Newbie
 
Registered: Mar 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you all. I do not know what was in my head. simply do not realize that I have given fdisk / dev / sda.

Thank you again !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with Ubuntu, fdisk & grub roro1993 Linux - Newbie 8 02-29-2008 01:53 PM
Trouble using fdisk Kizzume Slackware 7 06-06-2007 06:06 AM
ThinkPad 380ED fdisk trouble zytsef Slackware - Installation 2 07-12-2006 05:49 PM
fdisk partitioning trouble RazvanZ Linux - Software 10 04-07-2006 06:57 PM
trouble with fdisk/install tsw Slackware 2 06-15-2004 03:18 PM


All times are GMT -5. The time now is 04:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration