LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 03-25-2011, 11:18 AM   #1
prollocks
LQ Newbie
 
Registered: May 2006
Distribution: Arch 64
Posts: 25

Rep: Reputation: 0
Question Do I HAVE to sub partition a storage drive?


Hi,

Just after some quick advice :-

I formatted a new 2tb drive with XFS filesystem

it appears as /dev/sdc on my system and I can mount it ok (I've copied stuff to it and can read and write from it fine)

However when I do fdisk -l it says invalid partition table for this drive only.

I'm assuming I should have created a partition like /dev/sdc1 and then formatted it?

Is there any risk/disadvantage in leaving it as it is - it will hold media files mostly.
 
Old 03-25-2011, 11:40 AM   #2
rtmistler
Member
 
Registered: Mar 2011
Location: Milford, MA. USA
Distribution: MontaVista, Ubuntu, MINT
Posts: 964
Blog Entries: 7

Rep: Reputation: 443Reputation: 443Reputation: 443Reputation: 443Reputation: 443
Yes, I think you should have created a primary partition for the size of the disk and then run mkfs.xfs on it.
 
Old 03-25-2011, 11:43 AM   #3
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
Yes, I probably should have been partitioned first. That's common practice for a few reasons.

Without being partitioned you have no Master Boot Record so that disk can never be made bootable; if there is no MBR and your system is dual boot there is a possibility that the disk utilities used by the other OS might partition it on you (this may be just ancient history); esthetics?; consistancy?; and there are other reasons.

I would correct this now, before you get too much data on it.

Does xfs support UUID (I'm ignorant here); and are you mounting it by device name or UUID?

btw, what distro and version are you using? Is the device owned by LVM? Is it possible with your distro? If so, I'd advise making it an LVM Physical Volume if you can. It'll make life much easier later on when you want to add more space, move stuff around, replace the drive with a larger one, etc.

another btw, you should update your LQ profile so we know what distro and version you have. It makes answering your questions easier if we know that you are asking about a server, workstation, laptop or imbedded device...

Last edited by tommylovell; 03-25-2011 at 11:45 AM.
 
Old 03-25-2011, 11:45 AM   #4
Sjonnie48
Member
 
Registered: Jun 2005
Location: Earth
Distribution: Ubuntu10.04
Posts: 308

Rep: Reputation: 43
Partition the drive before formatting with a file system, or you'll run into problems. You can create a primary partition taking the full 2TB, then mkfs.xfs /dev/sdc1, and after that mount it.
 
Old 03-25-2011, 01:24 PM   #5
prollocks
LQ Newbie
 
Registered: May 2006
Distribution: Arch 64
Posts: 25

Original Poster
Rep: Reputation: 0
I am running Arch Linux 64 (2.6.37) with a single boot drive with OS, formatted ext4 (using a HP proliant microserver as NAS)

This is a secondary drive for movies,songs etc. so never needs to be made bootable - I'm aiming for maximum disk usage and speed (will mostly be large files)

I did put the xfs file system onto it but onto the whole drive i.e. mkfs.xfs /dev/sdc

I can mount it fine using it UID

I am not using LVM due to it being too complicated for this set up - I will eventually have 4 2TB drives with differing types of media on which can all be streamed from seperately for efficiency.
 
Old 03-25-2011, 01:39 PM   #6
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by tommylovell View Post
Yes, I probably should have been partitioned first. That's common practice for a few reasons.

Without being partitioned you have no Master Boot Record so that disk can never be made bootable; if there is no MBR and your system is dual boot there is a possibility that the disk utilities used by the other OS might partition it on you (this may be just ancient history); esthetics?; consistancy?; and there are other reasons.
With almost all filesystem types, there is a place for an MBR, or the boot loader stage 1 sector of that. But there may be insufficient space for the extra sectors of a boot loader (enough for it to know how to read the filesystem).


Quote:
Originally Posted by tommylovell View Post
I would correct this now, before you get too much data on it.
Agreed. It makes life easier. I'd also go with GPT unless there is a specific reason not to.

I also recommend aligning the partitions to multiples of 4096 sectors (previous recommended 2048, but 4096 is a multiple of the new huge pages and that might end up being important some day). That multiple should apply to both the first, as well as last (minus 1) sector (e.g making the size as multiple of 2MB, too).
 
Old 03-25-2011, 02:15 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,763

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
FWIW I have several flash drives (Imation) that are not partitioned. I've had no problems using them with any OS or with any standard disk utility. The drive will work as is just fine but will agree with the others that it will make life easier if it was partitioned.
 
Old 03-25-2011, 02:23 PM   #8
rtmistler
Member
 
Registered: Mar 2011
Location: Milford, MA. USA
Distribution: MontaVista, Ubuntu, MINT
Posts: 964
Blog Entries: 7

Rep: Reputation: 443Reputation: 443Reputation: 443Reputation: 443Reputation: 443
As far as choosing the best FS, there's an old thread that covers the topic in a lot of detail:

http://www.linuxquestions.org/questi...system-443612/

However, your choice of XFS is already well placed.

I believe the consensus here is that you should create a partition using fdisk, and also follow Skaperen's advice and make the partitions large because you are storing media files on that disk.
 
Old 03-28-2011, 10:32 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 11,022
Blog Entries: 1

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
Hi,

There is no problem in using the whole drive instead of partitioning unless size is too great for a MBR based. Sure, management would be easier if partitioned properly. I agree with michaelk. You could have a MBR with 2.1TB limitation or if you select GPT then things would be handled different.
Look at provided links.

Quote:
excerpt from GPT;
The widespread MBR partitioning scheme, dating from the early 1980s, imposed limitations which affected the use of modern hardware. Intel therefore developed a new partition-table format in the late 1990s as part of what eventually became UEFI. The GPT as of 2010[update] forms a subset of the UEFI specification.[3]
Features

MBR-based partition table schemes insert the partitioning information in the master boot record (MBR) (which on a BIOS system is also the container for code that begins the process of booting the system). In a GPT, partition table information is stored in the GPT header, but to maintain compatibility, GPT retains the MBR entry as the first sector on the disk followed by a primary partition table header, the actual beginning of a GPT.
Like modern MBRs, GPTs use logical block addressing (LBA) in place of the historical cylinder-head-sector (CHS) addressing. Legacy MBR information is contained in LBA 0, the GPT header is in LBA 1, and the partition table itself follows. 64-bit Windows operating systems reserve 16,384 bytes (or 32 sectors) for the GPT, leaving LBA 34 as the first usable sector on the disk.
HTH!
 
Old 03-30-2011, 11:18 AM   #10
prollocks
LQ Newbie
 
Registered: May 2006
Distribution: Arch 64
Posts: 25

Original Poster
Rep: Reputation: 0
ok thanks for all the replies.

I decided to re-partition using the conventions.

I tried GTP first but it seemed a bit overcomplicated for my liking (I guess I'll leave this till the new 3/4Tb drives come out and we are forced to use it).

I also found the new fdisk now defaults to a start sector of 2048 which is nice but I wanted to choose start sector 64 so had to use the -c msdos switch.

What I found was utilities like fdisk now show the filesystem information correctly whereas before it would complain.

MiniDlna and Samba are both serving their purpose and the box is doubling up as a media centre with XBMC playing HD. Not bad for £98 (there was a £100 HP rebate included in the price).

Cheers
 
Old 03-30-2011, 12:12 PM   #11
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by prollocks View Post
I tried GTP first but it seemed a bit overcomplicated for my liking (I guess I'll leave this till the new 3/4Tb drives come out and we are forced to use it).
RAID arrays have been making array drives larger than 2 TB for years. if you are looking for an excuse, make a big RAID array.

But you won't be forced to use GPT until drives 2TB and smaller disappear from the market. I still see 80GB drives around (32GB for SSD), so I think that will be quite a while. We'll likely see more drive miniaturization during this time, extending the life of "sub 2TB" drive sizes even longer. And when that dreaded day is reached, maybe you can still find a USB memory stick or camera memory card under 2TB. Or maybe everyone will have moved their data to the "cloud" and no longer need these devices
 
  


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
redhat can't see the rest of storage partition moawia Linux - Server 3 01-27-2009 07:23 AM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM
storage partition woes tommytomthms5 Debian 7 09-05-2007 05:39 PM
Should I partition my storage / server volume? PostPCMan Linux - General 1 02-10-2007 09:23 PM
USB Mass Storage Partition oulevon Linux - Hardware 3 11-20-2002 05:51 PM


All times are GMT -5. The time now is 12:38 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration