From: Ignoramus11153 on
On 2008-01-23, Joshua Baker-LePain <jlb17(a)begone.spam.duke.edu> wrote:
> On 2008-01-23, Ignoramus11153 <ignoramus11153(a)NOSPAM.11153.invalid> wrote:
>>
>> Linux sees that array as /dev/sdb. The capacity is 5 TB (as I said).
>> fdisk sees it as follows:
>>
>> ### Disk /dev/sdb: 5249.9 GB, 5249921187840 bytes
>> ### 255 heads, 63 sectors/track, 638266 cylinders
>> ### Units = cylinders of 16065 * 512 = 8225280 bytes
>> ### Disk identifier: 0xcf00cb1c
>> ###
>> ### Device Boot Start End Blocks Id System
>> ### /dev/sdb1 1 267349 2147480811 5 Extended
>> ### /dev/sdb5 1 267349 2147480779+ 83 Linux
>>
>> Which is the way I want. I formatted this disk with fdisk a while
>> ago. There is one giant extended partition, and a almost the same size
>> logical partition inside, holding Linux data.
>
> fdisk does not support a device that big. You must use parted. I also
> rather hope that you're using a GPT disklabel, as standard (msdos) ones also
> don't work on a device that large.

OK.

>> The device /dev/sdb5 is mounted on /data. However, df -k /data says:
>>
>> Filesystem 1K-blocks Used Available Use% Mounted on
>> /dev/sdb5 2113784952 239323764 1767087152 12% /data
>>
>> The above is wrong (or at least is not the way I expect), as I expect
>> 1K-blocks count to say 5 million instead of 2 million.
>
> Yep, it's wrong. The safest thing to do is backup the data somwhere else,
> recreate the partition (with parted), reformat, and *verify* before putting
> data on the system that everything is working correctly.

Yes. I scheduled data backup for 1am tonight, I will double verify it
in the morning and will redo partitioning.


> As an aside, there's really no need to use an extended partition on a device
> you'll only have one partition on anyway. Just create one primary partition
> and format that.
>

Fair enough. So, the plan is:

1) Backup the data at 1am tonight
2) In the morning, verify backup
3) umount /data
4) use gparted to repartition. Create one primary partition only, and
label it as linux
5) mkfs -t ext3 /dev/sdb1
6) remount
7) restore the backup.

i
From: Chris Cox on
Ignoramus11153 wrote:
> Also fdisk says on top:
>
> WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util
> fdisk doesn't support GPT. Use GNU Parted.
>

Yes... this is true. In order to use traditional partitioning
and create a single partition larger than 2TB, you have to use
GPT instead of a normal default partition table.

IMHO, you're better off using LVM instead though. That way
you don't have to deal with this kind of mess.

Also, large partitions (or logical volumes) with filesystems
will always create a problem since it takes a LONG time to
fsck one if something bad should happen. Just an fyi. (Other
things are somewhat impractical as well)

If I were starting from scratch I'd place all of /dev/sdb
under LVM control and carve it up using logical volumes
rather than depending on a partition table.
(hindsight being 20/20)

From: Ignoramus2378 on
On 2008-01-24, Chris Cox <notccox(a)notairmail.net> wrote:
> Ignoramus11153 wrote:
>> Also fdisk says on top:
>>
>> WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util
>> fdisk doesn't support GPT. Use GNU Parted.
>>
>
> Yes... this is true. In order to use traditional partitioning
> and create a single partition larger than 2TB, you have to use
> GPT instead of a normal default partition table.

That's what parted does by default?

> IMHO, you're better off using LVM instead though. That way
> you don't have to deal with this kind of mess.
>
> Also, large partitions (or logical volumes) with filesystems
> will always create a problem since it takes a LONG time to
> fsck one if something bad should happen. Just an fyi. (Other
> things are somewhat impractical as well)

that's OK

> If I were starting from scratch I'd place all of /dev/sdb
> under LVM control and carve it up using logical volumes
> rather than depending on a partition table.
> (hindsight being 20/20)
>

I am not that good with LVM, I am afraid to use it basically, the
information in question is "valuable" and I would hate to lose it.

i
From: Scott Alfter on
In article <8N6dnbpFcbk2SgXanZ2dnUVZ_hudnZ2d(a)giganews.com>,
Ignoramus2378 <ignoramus2378(a)NOSPAM.2378.invalid> wrote:
>On 2008-01-24, Chris Cox <notccox(a)notairmail.net> wrote:
>> If I were starting from scratch I'd place all of /dev/sdb
>> under LVM control and carve it up using logical volumes
>> rather than depending on a partition table.
>> (hindsight being 20/20)
>
>I am not that good with LVM, I am afraid to use it basically, the
>information in question is "valuable" and I would hate to lose it.

LVM isn't really that scary, and it affords you some flexibility that you
won't get with partitioning. I just put a box in a colo with 10 400GB SATA
drives. The drives are connected through an Adaptec SATA RAID controller;
two are hardware RAID-1 with /, /boot, swap, and an LVM partition to hold
Xen domU root filesystems and swaps, while the other eight are software
RAID-5 set up with LVM as a dumping ground for data. (I used software
RAID-5 because Adaptec's firmware won't create volumes larger than 2
TB...grr. I didn't buy these cards; I'm only using them because someone
else here bought them and a bunch of them are hanging around the office. I
would've used an Areca SATA RAID controller (we also have some of those on
hand and they will create >2TB volumes), but it doesn't appear to play well
with the Asus M2N-LR.)

As long as your volume groups don't span multiple physical disks, LVM is no
more dangerous than conventional partitioning. IIRC, some additional work
is needed to boot from a logical volume, so it's simpler to use partitions
for your root and boot filesystems. For the rest, it's simple enough...
something like this:

pvcreate /dev/sdb # introduce a physical disk to LVM
vgcreate foo /dev/sdb # add it to a new volume group
lvcreate -L 10G -n bar foo # create a logical volume in it
e2fsck -jL bar /dev/foo/bar # format it

_/_
/ v \ Scott Alfter (remove the obvious to send mail)
(IIGS( http://alfter.us/ Top-posting!
\_^_/ rm -rf /bin/laden >What's the most annoying thing on Usenet?