Question Involving Fdisk / Partitioning RHEL 6

OK Im pretty new to Linux and learning so much, but with RHEL6,

When your taking a test and they say to make a partition this size/name it this, how do you know which disk to partition if you do a listing?

I get so confused with the fdisk stuff and I would really love it if someone is kind enough to help me out.


Similar Content



Ubuntu 4 Tb Partitioning Confusion - Need Advice

Hi All;
Can someone give me some guidance on partitioning a 4TB drive into one partition ?

My goal is to align the partition for best performance. I searched the net for advice and I've found a lot of information on it but am still confused.

After setting the label to gpt,

I tried mkpart primary 0% 100%
and I get the warning that the partition isn't aligned

then I tried mkpart primary 1 -1 (which I really hoped would get me completed)

and when I do an align-check on partition 1, it reports 1 aligned

but then when I do an fdisk -l,
I get the warning that partition 1 does not start on a physical sector boundary

I read that sector size is usually 512 bytes but on some (or perhaps all) larger disks, the sector size is 4096.

I am really not knowledgable in this area and not sure if the above message about partition 1 not starting on a physical sector boundary is important or what impact this will have to my performance. Since these 4tb drives are being used in a media server, I'd like them to be as fast and efficient as possible.

Can you offer some guidance or perhaps some commands on how to partition my (full) 4tb drive into one partition so it is aligned and also so the partition table starts on a physical sector boundary ?

Also, is there a Ubuntu utility to display the sector size of a disk?

I have been researching this issue off and on for a few weeks and would like to finally get this partitioning completed this weekend so I can get on with setting up my system.

Thanks.

Tim

Partition Using Fdisk Gone Wrong.

Code:
Disk /dev/sda (Sun disk label): 255 heads, 63 sectors, 60801 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Flag    Start       End    Blocks   Id  System
/dev/sda1             0     60795 488335837+  83  Linux native
/dev/sda2  u      60795     60801     48195   82  Linux swap
/dev/sda3             0     60801 488384032+   5  Whole disk

Actually i created 100 mb lvm partition using fdisk but after checking in fdisk, i am getting this. I don't know next time my system will boot or not.

What should i do in this situation to recover from this situation?

I am using centos6 x64.

Question About Partitioning A 4TB Drive

Hello All;
I am building a Linux media server in my home and I am new to Linux.

Right now I am at the point where I am partitioning and formatting each of my 4TB drives.

I ran sudo parted on /etc/sdb
Then I set mklabel to gpt.

Now my question is about mkpart.

In order to use the full 4TB disk for data (Only one partition)

Do I set mkpart primary 0GB 3725GB
or
do I set mkpart primary 0GB 4000GB?

I don't want to enter a larger capacity than my disk will allow but I also want to be sure I am taking advantage of all of the available space.

Thanks.

Tim

Trouble With Fdisk

I got this configuration.

fdisk -l

Disk /dev/sda: 493.9 GB, 493921239040 bytes
255 heads, 63 sectors/track, 60049 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: 0x0002ac38

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 32636 261630976 8e Linux LVM

Disk /dev/mapper/vg_gazduire-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 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/mapper/vg_gazduire-lv_swap: 5100 MB, 5100273664 bytes
255 heads, 63 sectors/track, 620 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/mapper/vg_gazduire-lv_home: 209.1 GB, 209119608832 bytes
255 heads, 63 sectors/track, 25424 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


df -h

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_gazduire-lv_root
50G 21G 27G 44% /
tmpfs 2.4G 0 2.4G 0% /dev/shm
/dev/sda1 485M 161M 299M 35% /boot
/dev/mapper/vg_gazduire-lv_home
192G 17G 166G 9% /home
/usr/tmpDSK 2.0G 981M 955M 51% /tmp


I want to increase the /dev/sda1 with aproximativ 200 gb who remains ! My plans a i want to make /dev/sda3 and i want to put in
vg_gazduire!

VG Name vg_gazduire
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 249.51 GiB
PE Size 4.00 MiB
Total PE 63874
Alloc PE / Size 63874 / 249.51 GiB
Free PE / Size 0 / 0



When i type fdisk /dev/sda3 the system give me Unable to open /dev/sda3!

Could anyone tell me the solution?

Disk Is Not Getting Detected After Run The Scsi Command

Hi

RHEL 6.4 (64 Bit) is running as a Virutal Machine in a VCenter Server 5.5
As per our request, Vmware team added 500GB of disk space to this VM. Disk is not visible in "fdisk -l" after run the following command/script, but the new disk could be seen from the "multipath -l" command.

for i in `ls -ld /sys/class/scsi_host/host* | awk '{print $9}' `
do
echo "- - -" > $i/scan
done

Could someone clarify why it is not visible in "fdisk -l" output?

Dual Boot: Do I Need To Shrink Partition

Gents,
last time i installed windows was some silly years ago. So i'm at loss now.

Trying to add XP on RH6.5 system to dual boot.

One of the immediate problems/concerns is that Windows Installer wants to write something at the beginning of the boot disk (/dev/sda), BUT :
a. /dev/sda is fully partitioned for Linux
b. /dev/sda is under lvm control.
I gave XP 72GB on /dev/sdd2 extended partition.

Question how to add windows without ruining normal OS?

Details:
Code:
[root@server ~]# pvs
  PV         VG         Fmt  Attr PSize   PFree
  /dev/sda1  VG_Storage lvm2 a--  465.67g    0 
  /dev/sda5  VG_Storage lvm2 a--  465.67g    0 
  /dev/sda6  VG_Storage lvm2 a--  465.93g    0 
  /dev/sdb2  vg_server  lvm2 a--  148.56g 1.00m
  /dev/sdc1  VG_Oracle  lvm2 a--   74.53g    0 
  /dev/sdc2  VG_backup  lvm2 a--   74.52g 1.48g
  /dev/sdd1  VG_Oracle  lvm2 a--   74.53g    0 
  /dev/sdd3  VG_backup  lvm2 a--   83.83g    0 
[root@server ~]# fdisk -l /dev/sda

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
<skip>
Disk identifier: 0x1af11af1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       60789   488287611   83  Linux
/dev/sda2           60790      182401   976848390    5  Extended
/dev/sda5           60790      121578   488287611   83  Linux
/dev/sda6          121579      182401   488560716   83  Linux



fdisk -l /dev/sdd

Disk /dev/sdd: 250.1 GB, 250059350016 bytes
<skip>
Disk identifier: 0x00073bcf

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           1        9729    78148161   83  Linux
/dev/sdd2            9730       19457    78140160    7  HPFS/NTFS
/dev/sdd3           19458       30401    87907680   83  Linux

Mounting An External USB Hard Drive

My attempts to back-up to an external hard disk finally met with apparent success but I cannot now mount the target drive.

To summarize:-
1. Installing a SATA hard disk, identical to my computer's main drive, in a USB 2.0 caddy and attaching this to the computer resulted in qualified recognition. 'fdisk' 'saw' both the main drive, as sda, and the USB drive, as sdb, respectively but initially noted that the latter, “... doesn't contain a valid partition table.” This was hardly surprising. At the point of first connection the external drive was essentially a 'bare metal' device, having had its data wiped. Nevertheless, 'fdisk' correctly reported its size, number of heads and cylinders, etc.
2. 'dmesg' also correctly identified the external disk as sdb, reporting its type and the USB port to which it is connected.
3. 'df' ignores the second hard drive, reporting only the main disk.
4. Attempts to clone/back-up the main disk to the external disk using the recommended tools EaseUS Todo back-up and RedoBackup, booting respectively from appropriate USB memory sticks, both failed. Neither utility was prepared to write to the external disk. EaseUS acknowledged the latter but crashed the whole computer when instructed to perform the clone. RedoBackup failed to recognize the external disk.
5. Then came the break-through. A bit more Net browsing led me to try the command 'dd if=/dev/sda of=/dev/sdb'. The main disk was bit-copied (cloned) to the external disk at roughly 20Gb per hour, meaning that my 80Gb disk was copied in just under 4 hours. Checking 'dd's resulting report showed what appeared to be a perfect copy.

So far, so good. I now have a back-up which, being identical to the main disk, should, I assume, be bootable. In the event of trouble with the main disk I should be able simply to exchange it for the external disk and carry on from the point at which I made my last back-up. I cannot, however, access and read the external disk. I assume that it must have a partition table and be mounted. The first requirement appears to have been resolved by the cloning operation. 'fdisk' reports no trouble with the partition table on the cloned external disk. It lists /dev/sb1 as the bootable Linux partition, /dev/sdb2 as the Extended partition and /dev/sdb5 as the Linux swap / Solaris partition, exactly mirroring the corresponding entries for the main, sda, drive.

My attempts to mount the external disk have all failed, however. I clearly do not understand the syntax of the mount command or have failed to meet some other requirement. 'mount' objected without hesitation to my early mistakes but “mount -t dev/sdb” was instantly accepted. No error messages or other output resulted and the command prompt was immediately redisplayed but 'mount' then failed to show that the external drive had been mounted. If I try something like 'mount -t /dev/sdb1 /mnt/xdisk', where xdisk is a directory I have been told to create, then I am presented with a prolix description of 'mount's syntax, most of which leaves me bewildered. 'mount' then once again confirms that sdb1 does not feature in the list of mounted devices.

Can someone offer any suggestions? I have read one or two of the other posts on this topic but none of the details match my problem too well and I did not understand some of the replies. If I try to add a line to /etc/fstab, for example, I find that I do not have a directory called 'fstab', only 'fstab.d' and that is empty.

I have roughly one year's experience with Linux Mint 13 which I chose because it so closely resembled Windows XP.

How To Extend The / Partiotion In RedHat 5.4

im running out of space on the / partition
how do i extend this partition? this machine is inside a vmware environment.
i tried follow this article:

http://h30499.www3.hp.com/t5/System-...9#.VRPgAY6UdCc

but it seems that the command "fdisk" is not recognized

what should i do?

Resize LVM Partitions

UPDATED:
I installed a Deb 7 Srv w LVM w following partitions:
The end product should become a mail server (Citadel) and in time also a Web server.
Code:
 df -hT 
Filesystem                Type      Size  Used Avail Use% Mounted on
rootfs                    rootfs    322M  141M  165M  46% /
udev                      devtmpfs   10M     0   10M   0% /dev
tmpfs                     tmpfs     100M  260K  100M   1% /run
/dev/mapper/deb--srv-root ext4      322M  141M  165M  46% /
tmpfs                     tmpfs     5,0M     0  5,0M   0% /run/lock
tmpfs                     tmpfs     200M     0  200M   0% /run/shm
/dev/sda1                 ext2      228M   18M  199M   9% /boot
/dev/mapper/deb--srv-home ext4      233G  188M  221G   1% /home
/dev/mapper/deb--srv-tmp  ext4      368M   11M  339M   3% /tmp
/dev/mapper/deb--srv-usr  ext4      8,3G  481M  7,4G   6% /usr
/dev/mapper/deb--srv-var  ext4      2,8G  236M  2,4G   9% /var

 fdisk -l 
Disk /dev/sda: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders, total 524288000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00064033

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   524285951   261892097    5  Extended
/dev/sda5          501760   524285951   261892096   8e  Linux LVM

Disk /dev/mapper/deb--srv-root: 348 MB, 348127232 bytes
255 heads, 63 sectors/track, 42 cylinders, total 679936 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/deb--srv-root doesn't contain a valid partition table

Disk /dev/mapper/deb--srv-swap_1: 2143 MB, 2143289344 bytes
255 heads, 63 sectors/track, 260 cylinders, total 4186112 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/deb--srv-swap_1 doesn't contain a valid partition table

Disk /dev/mapper/deb--srv-usr: 8996 MB, 8996782080 bytes
255 heads, 63 sectors/track, 1093 cylinders, total 17571840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/deb--srv-usr doesn't contain a valid partition table

Disk /dev/mapper/deb--srv-var: 2998 MB, 2998927360 bytes
255 heads, 63 sectors/track, 364 cylinders, total 5857280 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/deb--srv-var doesn't contain a valid partition table

Disk /dev/mapper/deb--srv-tmp: 398 MB, 398458880 bytes
255 heads, 63 sectors/track, 48 cylinders, total 778240 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/deb--srv-tmp doesn't contain a valid partition table

Disk /dev/mapper/deb--srv-home: 253.3 GB, 253289824256 bytes
255 heads, 63 sectors/track, 30794 cylinders, total 494706688 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/deb--srv-home doesn't contain a valid partition table

 pvs 
PV         VG      Fmt  Attr PSize   PFree
/dev/sda5  deb-srv lvm2 a--  249,76g    0

 lvs 
LV     VG      Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
home   deb-srv -wi-ao-- 235,89g
root   deb-srv -wi-ao-- 332,00m
swap_1 deb-srv -wi-ao--   2,00g
tmp    deb-srv -wi-ao-- 380,00m
usr    deb-srv -wi-ao--   8,38g
var    deb-srv -wi-ao--   2,79g

Now i want to _shrink_ the HOME partition so I can expand my VAR partition. Looked for guides but haven't found any site useful so far

I tried to find a way to do it when I installed it but it didn't seem to offer me this at this time even I looked around for a while.

How do I do this shrinking of HOME and extending of VAR partition??
please be fairly specific as Im not a pro yet

Problem With Creating Partitions For Bootable SD Card

Hi everybody,

I am trying to set up my sd card with an embedded ubuntu I build lately according to this linkhttps://eewiki.net/display/linuxonar...-Ubuntu14.04.1 (Topic Setup microSD/SD card).
I am doing this on Ubuntu running in VirtualBox. I am quite new to linux and barely understand the command that causes the first warning. Here is what happened:

ubuntu@ubuntu-VirtualBox:~$ sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__ --force
> 1,12,0xE,*
> ,,,-
> __EOF__
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK

Disk /dev/sdc1: 1019 cylinders, 246 heads, 62 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
/dev/sdc1: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End MiB #blocks Id System
/dev/sdc1p1 * 1 12 12 12288 e W95 FAT16 (LBA)
/dev/sdc1p2 13 7591 7579 7760896 83 Linux
/dev/sdc1p3 0 - 0 0 0 Empty
/dev/sdc1p4 0 - 0 0 0 Empty
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Invalid argument

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
ubuntu@ubuntu-VirtualBox:~$ sudo mkfs.vfat -F 16 ${DISK}p1 -n BOOT
mkfs.fat 3.0.26 (2014-03-07)
/dev/sdc1p1: No such file or directory


So after I entered "sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__ --force
> 1,12,0xE,*
> ,,,-
> __EOF__ "
everything looked fine since it sad that it created the partition sdc1p1 etc. but as soon as I want to format this partition with "sudo mkfs.vfat -F 16 ${DISK}p1 -n BOOT" it tells me that there is no partition called /dev/sdc1p1

I would be very gratefull if somebody could help me out on this. I thought about trying a different tutorial but they look really really different so I tried to stick to the one that worked well for me so far.

Thank you very much!

Regards,

Lenni