Avatar of Frank DiPiazza
Frank DiPiazzaFlag for United States of America

asked on 

Linux File System install on USB 256GB

Working with Linux, ClearOS 7.x
Trying to install a USB 256Gb Drive.
Used the FDISK /dev/sdf1 option to partition the drive.
Used the mkfs function to put a File System on the drive.
Are there any docs that explain the partition, and FS install process. I keep failing.
Linux

Avatar of undefined
Last Comment
noci
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

Please see below link on how to manage partitions and filesystems

https://www.ibm.com/developerworks/library/l-lpic1-v3-104-1/
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Frank DiPiazza

ASKER

This is what I have been doing...I must have another issue.
I also use the t option. I've tried c, and 83. I still can't get a good rsync.
Avatar of noci
noci

Indeed the t option is also needed. 
After you created the filesystem you still need to mount the device:
(windows does the same the mounted devices are called A:, C: etc.).

mount /dev/sdh1 /mnt

Then you can pull the data into /mnt.

Avatar of Frank DiPiazza

ASKER

Is it possible to use a drive without partitioning? (Use the Whole Drive)
fdisk /dev/sdh
o   create a new empty DOS partition table

Open in new window

w Write to disk & Exit

At what point can I make /dev/sdh, where the whole drive is mounted to use. (Just Partition 0, file system ext2)
When/how do I make Partition 0 an ext2 file system? mkfs.ext2

Avatar of noci
noci

Empty new partition table is not the same as no partition table...
It is what is say a partition table with NO allocated blocks and a completely empty drive. (No usable partitions).

If you want no partition tables it's easy (an unusable in MOST systems except for unix derived ones... you may get warnings)
On windows systems you will be asked if the drive needs formatting.
Again assuming /dev/sdh as the USB drive:    mkfs.ext4 /dev/sdh
Also keep in mind the mount command needs to become: (*to mount on /mnt): mount -t ext4 /dev/sdh /mnt
Done.

The drive IS NOT mounted on /dev/sdh, that is an internal name.  (More like Drive0, Drive1 in windows.)
After the mount command has been given the Block storage devices (/dev/sdh) is mounted on directory mentioned directory (/mnt).
Avatar of Frank DiPiazza

ASKER

This is all Linux related, not windows.
I use fstab, example:
LABEL=BACKUP01          /store/BACKUP01         ext2    defaults,noauto 0 0
LABEL=BACKUP02          /store/BACKUP02         ext2    defaults,noauto 0 0
The fdisk -l, example:
Disk /dev/sdd: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes

 Device Boot      Start         End      Blocks   Id  System
-nothing here-

When mounted, df -h -T
/dev/sdd               ext2      459G  167G  270G  39% /store/BACKUP01

So this is an empty DOS partition table, and mounted as listed here.
Essentially, it is Partition 0, correct?
Do you see a problem with this?





SOLUTION
Avatar of noci
noci

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Frank DiPiazza

ASKER

So using fdisk /dev/sdd and making an empty dos partition table isn't necessary?
It is a new drive that should be empty. Other wise deleting any partitions is my first step.

Also, I don't actually have to set the "c" on that empty table either?

Thank you for responding and understanding my novice questions.

Avatar of noci
noci

Using fdisk ONLY makes sense if you want a partition table / or BSD disk label on the device. Otherwise it is useless, as the same block will be used for a raw device Filesystem header.
The partitiontable is erase/overwritten etc. by the mkfs.whatever to park the homeblock on the same place.
(BTW, there are other partition schema's that are more flexible than the MBR/ BIOS one.
GPT is slightly better, although not realy dynamic, LVM (logical Volume management) has far grater potential.
Linux
Linux

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.

71K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo