LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-02-2014, 02:01 PM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
FIle System / Mounting Help For New Partition


I've been asked to attach a new 100 GB partition to our database server and then mount the newly created ext4 partition to /var/lib/pgsql/ directory and set it to auto-mount in /etc/fstab/

I've created a primary single partition /dev/xvdf:

Code:
[root@db1 ~]# fdisk -l

Disk /dev/xvda1: 12.9 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 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


Disk /dev/xvda3: 939 MB, 939524096 bytes
255 heads, 63 sectors/track, 114 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


Disk /dev/xvdf: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 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
Here is my /etc/fstab:

Code:
#
LABEL=/                 /               ext4    defaults,noatime        1   1
/dev/xvdf               /var/lib/pgsql  ext4    defaults                0   0
tmpfs                   /dev/shm        tmpfs   defaults                0   0
devpts                  /dev/pts        devpts  gid=5,mode=620          0   0
sysfs                   /sys            sysfs   defaults                0   0
proc                    /proc           proc    defaults                0   0
Now my confusion / questions are as follows:

1. Why is it not /dev/xvdf1 in my fdisk -l read out?
2. How do I label this partition? Do I use e2label command and if so, what should the label be?
 
Old 01-02-2014, 09:10 PM   #2
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
Looks like there is no partition in that device. In fstab you have to specify the number of the partition in the device, like you see it for xvda1, xvda3.

Something doesn't looks right there why are your disks ID 0x00000000 the same?
Did you remove part of the info from fdisk output? I don't see the part where it says what type the partitions are.

Create the partition with fdisk and then,
to format the partition as ext4 on xvdf, issue the following command as root:
Code:
# mkfs.ext4 /dev/xvdf1
To label it(replace label with the name you want):
Code:
# e2label /dev/xvdf1 /label
Regards
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script to create partition and file system on the partition mukheema Red Hat 1 02-03-2012 12:29 PM
Hard drive partition, mounting, and file system help needed please. nix-newb Linux - Hardware 4 11-02-2008 09:44 PM
Copy Contents of LVM Partition to Another Partition With a Different File System tmort Linux - General 3 03-07-2008 05:00 AM
lost windows partition file system after mounting under linux ahafeel Linux - Newbie 2 09-16-2007 09:12 AM
Mounting file system in a file with mount Denes Programming 6 11-11-2005 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:04 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration