LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Do I HAVE to sub partition a storage drive? (https://www.linuxquestions.org/questions/linux-hardware-18/do-i-have-to-sub-partition-a-storage-drive-870968/)

prollocks 03-25-2011 11:18 AM

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.

rtmistler 03-25-2011 11:40 AM

Yes, I think you should have created a primary partition for the size of the disk and then run mkfs.xfs on it.

tommylovell 03-25-2011 11:43 AM

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...

Sjonnie48 03-25-2011 11:45 AM

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.

prollocks 03-25-2011 01:24 PM

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.

Skaperen 03-25-2011 01:39 PM

Quote:

Originally Posted by tommylovell (Post 4303159)
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 (Post 4303159)
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).

michaelk 03-25-2011 02:15 PM

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.

rtmistler 03-25-2011 02:23 PM

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.

onebuck 03-28-2011 10:32 AM

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!

prollocks 03-30-2011 11:18 AM

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

Skaperen 03-30-2011 12:12 PM

Quote:

Originally Posted by prollocks (Post 4308624)
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 :p


All times are GMT -5. The time now is 07:02 PM.