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


Similar Content



Dual-boot Grub Boot-repair Issue

Hello there,

I tried to install kali alongside windows and did it wrong probably. Now whenever I boot, grub loader sees only Kali and Free-DOS and doesn't see Windows.

I can still see the Windows partition in Kali and access the files however.
Searched online for a solution and saw that boot-repair could help me, however because some new update issue I cannot install it under Kali directly( see below link, it doesnt work for me).
askubuntu.com/questions/449818/cant-find-boot-repair-package-for-the-newest-version-of-ubuntu]

Long story short, I downloaded the iso version of boot-repair and tried to burn it onto a live-usb, but it doesn't load. All I get is a black screen with a terminal line running where I can't do anything.
I burned the iso using the terminal and the command below.
sudo dd bs=4M if=file.iso of=/dev/sdc
I burned the iso using unetbootin a couple of times and the same issue.


Any ideas? am I doing something wrong? How can I burn the iso disk to a live USB to run boot-repair? Or any other alternatives?

PS: first time linux user, I have no idea what am I doing so please be patient with me.





This is my output for running sfdisk -l.

Code:
sfdisk -l

Disk /dev/sda: 60801 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+    118     119-    955836    c  W95 FAT32 (LBA)
/dev/sda2      59654   60801-   1148-   9215829    c  W95 FAT32 (LBA)
/dev/sda3        119+  59653   59535- 478214340    f  W95 Ext'd (LBA)
/dev/sda4          0       -       0          0    0  Empty
/dev/sda5        119+  51030   50912- 408950091+   7  HPFS/NTFS/exFAT
/dev/sda6      58934+  59653     720-   5783368+  82  Linux swap / Solaris
/dev/sda7      51031+  58933    7903-  63479131   83  Linux
		start: (c,h,s) expected (1023,254,63) found (855,54,32)
		end: (c,h,s) expected (1023,254,63) found (565,254,63)

Disk /dev/sdb: 1020 cylinders, 240 heads, 62 sectors/track
Warning: The partition table looks like it was made
  for C/H/S=*/104/54 (instead of 1020/240/62).
For this listing I'll assume that geometry.
Units = cylinders of 2875392 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1   *      0+   2704-   2705-   7592960    b  W95 FAT32
		start: (c,h,s) expected (0,37,51) found (0,32,33)
		end: (c,h,s) expected (1023,103,54) found (945,103,54)
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty

Doesn't Contain A Valid Partition Table? Working For Months...

Everything is working great on this server, however I am seeing Disk doesn't contain a valid partition table. I have no issue reading and writing, this something that can be ignored?


Disk /dev/xvda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 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

Device Boot Start End Blocks Id System
/dev/xvda1 * 16065 62910539 31447237+ 83 Linux

Disk /dev/xvdf: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders, total 2147483648 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/xvdf doesn't contain a valid partition table

Disk /dev/xvdh: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders, total 2147483648 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/xvdh doesn't contain a valid partition table

Disk /dev/xvdg: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders, total 2147483648 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/xvdg doesn't contain a valid partition table

Disk /dev/xvdi: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders, total 2147483648 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/xvdi doesn't contain a valid partition table

Disk /dev/mapper/vgebs-lvebs: 4398.0 GB, 4398029733888 bytes
255 heads, 63 sectors/track, 534696 cylinders, total 8589901824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 2097152 bytes / 4194304 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vgebs-lvebs doesn't contain a valid partition table

Disk /dev/xvdj: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 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/xvdj doesn't contain a valid partition table

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

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.

Virtual CentOS 6.4 Server Expand Disk For Splunk Instance

As I'm sure there are other posts for this, I'm terrified to mess with disks in Linux as I'm very green. I've looked at one other post which suggests to run the following so I'm going to do the same. The drive provisioned originally had 400 gb, but currently has 500 gb allocated in vmware. Thanks so much in advance!

Code:
fdisk -l
pvs
vgs
lvs
df -h


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

Disk /dev/sda: 8589 MB, 8589934592 bytes
64 heads, 32 sectors/track, 8192 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c255c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           2         501      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             502        8192     7875584   8e  Linux LVM
Partition 2 does not end on cylinder boundary.

Disk /dev/sdb: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 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: 0x69437664

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       52216   419424988+  8e  Linux LVM

Disk /dev/mapper/vg_uspk10vsp03-lv_root: 3833 MB, 3833593856 bytes
255 heads, 63 sectors/track, 466 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_uspk10vsp03-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 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_opt-lv_opt: 429.5 GB, 429488340992 bytes
255 heads, 63 sectors/track, 52215 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

Code:
[root@uspk10splunk ~]# pvs
  PV         VG             Fmt  Attr PSize   PFree
  /dev/sda2  vg_uspk10vsp03 lvm2 a--    7.51g    0
  /dev/sdb1  vg_opt         lvm2 a--  399.99g    0

Code:
[root@uspk10splunk ~]# vgs
  VG             #PV #LV #SN Attr   VSize   VFree
  vg_opt           1   1   0 wz--n- 399.99g    0
  vg_uspk10vsp03   1   2   0 wz--n-   7.51g    0

Code:
[root@uspk10splunk ~]# lvs
  LV      VG             Attr      LSize   Pool Origin Data%  Move Log Cpy%Sync                     Convert
  lv_opt  vg_opt         -wi-ao--- 399.99g                                                          
  lv_root vg_uspk10vsp03 -wi-ao---   3.57g                                                          
  lv_swap vg_uspk10vsp03 -wi-ao---   3.94g

Code:
[root@uspk10splunk ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_uspk10vsp03-lv_root
                      3.6G  1.5G  1.9G  45% /
tmpfs                 1.9G     0  1.9G   0% /dev/shm
/dev/mapper/vg_opt-lv_opt
                      394G  374G  422M 100% /opt
/dev/sda1             485M   32M  428M   7% /boot

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?

LVM Mount Via USB

My father passed away about 6 months ago and I'm just getting around to going threw all 18 hard drives... I have been using Ubuntu 14.04 for over a year now and while I'm not a pro I can handle most things.

One drive has LVM on it. I have attached it via a USB2.0 to SATA cable. I followed the instructions he http://linuxers.org/howto/how-mount-...rtitions-linux

Code:
michael [ ~ ]$ sudo fdisk -l
[sudo] password for michael: 

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x38431b10

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  1464322047   732160000    7  HPFS/NTFS/exFAT
/dev/sda2      1464322048  2930272255   732975104    7  HPFS/NTFS/exFAT

Disk /dev/sdb: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 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: 0x000656a3

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    33560575    16779264   82  Linux swap / Solaris
/dev/sdb2   *    33560576    75505663    20972544   83  Linux
/dev/sdb3        75505664   500117503   212305920   83  Linux

Disk /dev/sdc: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 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: 0x000da346

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048      499711      248832   83  Linux
/dev/sdc2          501758  1465147391   732322817    5  Extended
/dev/sdc5          501760  1465147391   732322816   8e  Linux LVM
michael [ ~ ]$ sudo pvs
  PV         VG         Fmt  Attr PSize   PFree
  /dev/sdc5  ubuntu1-vg lvm2 a--  698.39g    0 
michael [ ~ ]$ sudo lvdisplay /dev/ubuntu1-vg
  --- Logical volume ---
  LV Path                /dev/ubuntu1-vg/root
  LV Name                root
  VG Name                ubuntu1-vg
  LV UUID                StErnb-Mtop-NaEy-faw4-wNk0-bY5I-6ARBmI
  LV Write Access        read/write
  LV Creation host, time ubuntu1, 2014-08-12 18:45:21 +0900
  LV Status              NOT available
  LV Size                694.39 GiB
  Current LE             177765
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
   
  --- Logical volume ---
  LV Path                /dev/ubuntu1-vg/swap_1
  LV Name                swap_1
  VG Name                ubuntu1-vg
  LV UUID                62DxMC-qLAo-6cU9-kA5H-kNoL-7B4t-1ZCQcK
  LV Write Access        read/write
  LV Creation host, time ubuntu1, 2014-08-12 18:45:21 +0900
  LV Status              NOT available
  LV Size                4.00 GiB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
   
michael [ ~ ]$ mount /dev/ubuntu1-vg/root /mnt
mount: only root can do that
michael [ ~ ]$ sudo mount /dev/ubuntu1-vg/root /mnt
mount: special device /dev/ubuntu1-vg/root does not exist

So where did I go wrong?

Trying To Dd A Server With LVM To Another Ext HD, Then To Another Server

I have Linux enterprise server 11 sp3 with 3 250 GB WD blue drives in a raid 5 configuration.

Server “A” (external drive not plugged in):
Code:
Disk /dev/sda: 499.0 GB, 499021512704 bytes
255 heads, 63 sectors/track, 60669 cylinders, total 974651392 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: 0x00059fd2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1028095      513024   83  Linux
/dev/sda2         1028096    21993471    10482688   82  Linux swap / Solaris
/dev/sda3        21993472   974651391   476328960   8e  Linux LVM

Disk /dev/mapper/VG_SYSTEM-ROOT: 487.8 GB, 487755612160 bytes
255 heads, 63 sectors/track, 59299 cylinders, total 952647680 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/VG_SYSTEM-ROOT doesn't contain a valid partition table

I am trying to clone this machine to another server, both servers are Dell Poweredge 1900, with 3 – 250 WD drives (the only difference is the ‘B’ server has WD Cavier drives), pretty much identical machines, same processor and ram. I have a 2TB ext hard drive that I am using to store the output of DD. I have booted from the CD to a rescue system, then mounted my 2TB ext and did the following:
Code:
    # dd if=/dev/sda conv=sync,noerror bs=64k | gzip –c | split –a3 –b 2G –verbose - /mnt/exthd/

This gives me the following files on my external hard drive:
Code:
    
-rwxr-xr-x 1 root root 2147483648 Jan 10 21:00 aaa
-rwxr-xr-x 1 root root 2147483648 Jan 10 21:31 aab
-rwxr-xr-x 1 root root 2147483648 Jan 10 21:53 aac
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:05 aad
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:10 aae
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:17 aaf
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:24 aag
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:31 aah
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:37 aai
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:43 aaj
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:50 aak
-rwxr-xr-x 1 root root 2147483648 Jan 10 22:56 aal
-rwxr-xr-x 1 root root 2147483648 Jan 10 23:02 aam
-rwxr-xr-x 1 root root 2147483648 Jan 10 23:06 aan
-rwxr-xr-x 1 root root 2147483648 Jan 10 23:12 aao
-rwxr-xr-x 1 root root 2147483648 Jan 10 23:32 aap
-rwxr-xr-x 1 root root  324998512 Jan 10 23:35 aaq

Now, I boot to the rescue system on server ‘B’ with the external drive plugged in, and run fdisk:
Code:
Disk /dev/sda: 498.8 GB, 498753077248 bytes
255 heads, 63 sectors/track, 60636 cylinders, total 974127104 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: 0x00059fd2

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdb: 2000.4 GB, 2000398933504 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029167 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: 0x00015a3d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  3907028991  1953513472    c  W95 FAT32 (LBA)

Notice sda is only 498.8GB where on server ’A’, it was 499.0. when I try to restore my files from the DD, I get an out of space error. To restore, I use the following:
Code:
    # cat /mnt/exthd/aa* | gunzip –c | dd of=/dev/sda
    
dd: writing to ‘/dev/sda’:  No space left on device
974127105+0 records in
974127104+0 records out
498753077248 bytes (499 GB) copied, 37067.3 s, 13.5MB/s

My guess, is that although the drives are the same capacity (3 – 250GB in RAID 5 array), the number of cylinders is different because it is a different model, and that is where it is running out of space, although I wouldn’t think it would.

Please correct me if I am wrong as I am a newbie, but if I do “# dd if=/dev/sda” that will take all the partitions with it? Such as sda1, sda2, sda3 correct?

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

Incorrect Disk Space Of External Disk

I have an external disk connected to a raspberry pi to act as a nas, which I am accessing from a linux mint desktop machine.
The nas disk is 30GB, but according to my desktop machine, which connects through the file browser via samba, only around 318MB are reported as available.
If I try to copy a 400MB file it tells me there is insufficient space.
The disk is currently empty, so all 30GB should be available.

On the nas box, cfdisk seems to report the disk size and the partition size correctly:
Code:
                          cfdisk (util-linux 2.20.1)

                              Disk Drive: /dev/sda
                        Size: 30016659456 bytes, 30.0 GB
              Heads: 64   Sectors per Track: 32   Cylinders: 28626

    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
    sda1        Boot        Primary   ext4                             30016.66*

I'm not sure where to look next.