linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Cannot Create Partition
@ 2011-01-23 18:07 CACook
  2011-01-23 18:23 ` Hugo Mills
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: CACook @ 2011-01-23 18:07 UTC (permalink / raw)
  To: linux-btrfs


On /dev/sda I have sda1 which is my / bootable filesystem for Debian formatted ext4.  This is 256MB on a 2TB drive.

I want to set up the rest of the drive as BTRFS for various functions, and I presume that I first have to create a partition using fdisk for this?  Since my first part is ext4?  So I:
# fdisk /dev/sda
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').
Command (m for help): p
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 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
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      243202  1953514583+  ee  GPT
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
No free sectors available
Command (m for help):
-------------------------------------------------
Whaa?

Maybe it's possible that I just mkfs.btrfs /dev/sda and it will set up -only- the remaining space, but I'm afraid that this may destroy my OS.

Also, what if I want to set up the whole drive as BTRFS?  Could this be bootable, and can the canned Debian kernel load the BTRFS driver for boot at install?  Or would I boot to the CD, mkfs.btrfs the drive, then install Debian?  Anyone tried this?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot Create Partition
  2011-01-23 18:07 Cannot Create Partition CACook
@ 2011-01-23 18:23 ` Hugo Mills
  2011-01-24  3:07 ` Fajar A. Nugraha
  2011-01-24 11:07 ` Michael Milligan
  2 siblings, 0 replies; 4+ messages in thread
From: Hugo Mills @ 2011-01-23 18:23 UTC (permalink / raw)
  To: CACook; +Cc: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 2658 bytes --]

On Sun, Jan 23, 2011 at 10:07:54AM -0800, CACook@quantum-sci.com wrote:
> 
> On /dev/sda I have sda1 which is my / bootable filesystem for Debian formatted ext4.  This is 256MB on a 2TB drive.
> 
> I want to set up the rest of the drive as BTRFS for various functions, and I presume that I first have to create a partition using fdisk for this?  Since my first part is ext4?  So I:
> # fdisk /dev/sda
> WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

   I think the above may be the root cause of your problem. You're
using the new GPT partition table format, not the traditional DOS one,
and fdisk is claiming that it can't handle it.

> WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
>          switch off the mode (command 'c') and change display units to
>          sectors (command 'u').
> Command (m for help): p
> Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
> 255 heads, 63 sectors/track, 243201 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
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1               1      243202  1953514583+  ee  GPT
> Command (m for help): n
> Command action
>    e   extended
>    p   primary partition (1-4)
> p
> Partition number (1-4): 2
> No free sectors available
> Command (m for help):
> -------------------------------------------------
> Whaa?
> 
> Maybe it's possible that I just mkfs.btrfs /dev/sda and it will set
> up -only- the remaining space, but I'm afraid that this may destroy
> my OS.

   No, that will almost certainly destroy your existing partitioning,
and hence, as you say, your OS install.

> Also, what if I want to set up the whole drive as BTRFS?  Could this
> be bootable, and can the canned Debian kernel load the BTRFS driver
> for boot at install?  Or would I boot to the CD, mkfs.btrfs the
> drive, then install Debian?  Anyone tried this?

   As far as I know, GRUB2 doesn't yet support btrfs (although there
was some work done on it, I don't know what the status of that work
is). This means that you need a filesystem of some other type to boot
off -- even if it only holds the contents of /boot. There are
certainly people around who've done this, although I'm not one of
them.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
        --- "Dullest spy film ever: The Eastbourne Ultimatum" ---        

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot Create Partition
  2011-01-23 18:07 Cannot Create Partition CACook
  2011-01-23 18:23 ` Hugo Mills
@ 2011-01-24  3:07 ` Fajar A. Nugraha
  2011-01-24 11:07 ` Michael Milligan
  2 siblings, 0 replies; 4+ messages in thread
From: Fajar A. Nugraha @ 2011-01-24  3:07 UTC (permalink / raw)
  To: CACook; +Cc: linux-btrfs

On Mon, Jan 24, 2011 at 1:07 AM,  <CACook@quantum-sci.com> wrote:
>
> On /dev/sda I have sda1 which is my / bootable filesystem for Debian =
formatted ext4. =A0This is 256MB on a 2TB drive.

Really? How do you know it's 256 MB?

> # fdisk /dev/sda
> WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util =
fdisk doesn't support GPT. Use GNU Parted.
> WARNING: DOS-compatible mode is deprecated. It's strongly recommended=
 to
> =A0 =A0 =A0 =A0 switch off the mode (command 'c') and change display =
units to
> =A0 =A0 =A0 =A0 sectors (command 'u').
> Command (m for help): p
> Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
> 255 heads, 63 sectors/track, 243201 cylinders
> Units =3D cylinders of 16065 * 512 =3D 8225280 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x00000000
> =A0 Device Boot =A0 =A0 =A0Start =A0 =A0 =A0 =A0 End =A0 =A0 =A0Block=
s =A0 Id =A0System
> /dev/sda1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0243202 =A019535145=
83+ =A0ee =A0GPT

=2E.. cause the fdisk output pretty much shows the first partition uses
up all space.
You can check again if you want, using "parted /dev/sda print" (just
in case it's really fdisk problem).

> Maybe it's possible that I just mkfs.btrfs /dev/sda and it will set u=
p -only- the remaining space, but I'm afraid that this may destroy my O=
S.

You might be able to boot using a live CD and use gparted to resize
the current ext4 partition.

>
> Also, what if I want to set up the whole drive as BTRFS? =A0Could thi=
s be bootable, and can the canned Debian kernel load the BTRFS driver f=
or boot at install? =A0Or would I boot to the CD, mkfs.btrfs the drive,=
 then install Debian? =A0Anyone tried this?

Ubuntu Natty's grub2 has btrfs support, but It's still in alpha stage
though. Don't know about Debian.
At this point it's easiest if you use ext3/4 for /boot, and use btrfs
only for "/".

--=20
=46ajar
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot Create Partition
  2011-01-23 18:07 Cannot Create Partition CACook
  2011-01-23 18:23 ` Hugo Mills
  2011-01-24  3:07 ` Fajar A. Nugraha
@ 2011-01-24 11:07 ` Michael Milligan
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Milligan @ 2011-01-24 11:07 UTC (permalink / raw)
  To: CACook; +Cc: linux-btrfs

CACook@quantum-sci.com wrote:
> On /dev/sda I have sda1 which is my / bootable filesystem for Debian formatted ext4.  This is 256MB on a 2TB drive.
> 
> I want to set up the rest of the drive as BTRFS for various functions, and I presume that I first have to create a partition using fdisk for this?  Since my first part is ext4?  So I:
> # fdisk /dev/sda
> WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Do exactly as you are instructed here.  Use parted.  fdisk doesn't
support GPT partition tables, only MS-DOS tables.

# parted /dev/sda
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) []

Now, type "help" if you are stumped.  Or perhaps "man parted".  Or even
use gparted since that's the graphical version and much easier to drive.

Regards,
Mike


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-24 11:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-23 18:07 Cannot Create Partition CACook
2011-01-23 18:23 ` Hugo Mills
2011-01-24  3:07 ` Fajar A. Nugraha
2011-01-24 11:07 ` Michael Milligan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).