Calculating File Sizes From Indoors And Blocks

Hello I have this problem, but I just ant to know if I am on right track:

Quote:
i_addr is an array of 15 pointers which hold the addresses of a direct data blocks and single indirect, double indirect or triple indirect block.
The first 12 elements of the array refer to addresses of blocks on the disk, which actually contain the files data. When a file requires more than 12 direct blocks, the file system must use disk blocks to hold the addresses of the remaining data blocks needed. These are called indirect blocks. In this particular file system the inode holds the addresses of three indirect data blocks in addition to the 12 direct data blocks discussed. There are single, double and triple indirect data blocks. There is one of each. (in total there are 15 references in the inode). A single indirect block (referenced by element 12 of the inode array) holds the addresses of 2048 disk blocks.
If the file consumes more blocks then can be referenced by a single indirect block then the file system uses a double indirect block. (referenced by element 13 of the inode array). A double indirect block can hold the addresses of 2048 indirect blocks.
If the file consumes more blocks then can be reference by direct, single and double indirect data blocks then the last element of the inode array is used to hold a triple indirect block which effectively references a number of double and single indirect block (ultimately the data).
The Questions I attempted

Quote:
Given the block size of the file system is 8192 bytes answer the following questions:
1. Whatisthemaximumpossiblefilesizethatcanberepresentedviadirectdatablocks?
2. What is the file size if each element of an indirect data blocks references a data block and all direct blocks are used?
3. Whatistherangeoffilesizesthatwouldrequiretheuseofadoubleindirectblock?
4. Whatisthemaximumfilesizeinthisfilesystem?
5. How much overhead is incurred by the file system to store a file of 8437760 bytes.
Overhead is size in bytes of the number of blocks needed to reference this object i.e. indirect blocks etc.
My answers:

Quote:
Answer 1) we know 1 block=8192 bytes, and there are 12 direct data blocks so the max. size is (12*8192) bytes = 98304 bytes.

Answer 2) file size will be = file size in direct data blocks + (2048*8192) = approximately 17 MB

Answer 3) The starting range is > 17 MB. The maximum range will be (2048*8192) + (2048*8192) =

Answer 4) Max size of file in this file system is = 98304+(2048*8192)+(2048*8192)*2+(2048*8192)*3=84.33 MB

Answer 5) We know first 12 blocks have 98304 bytes. The single indirect block has 2048*8192 bytes. Given 8437760 bytes of file size we have an overhead of (2048*8192)/(8437760-98304)= 2 bytes
Please correct me and why am I wrong.

Thanks


Similar Content



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

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?

Knoppix Cant See Hard Drvie From Gui

Im experimenting. I loaded knoppix, my older version on cd used to work great but I suppose the 2005 cd just met its end of life. The machine Im on boots fine to Windows I just want to play around with Knoppix.

Anyway, I downloaded burned and loaded KNoppix 7.4. Im on it as I type.

pix@Microknoppix:/dev$ cat /proc/partitions
major minor #blocks name

240 0 10608000 cloop0
252 0 2115392 zram0
8 0 244198584 sda
8 1 1536000 sda1
8 2 233490432 sda2
8 3 9170944 sda3
11 0 4182848 sr0


and

knoppix@Microknoppix:~$ fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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: 0x17807de0

Device Boot Start End Blocks Id System
/dev/sda1 2048 3074047 1536000 27 Hidden NTFS WinRE
/dev/sda2 * 3074048 470054911 233490432 7 HPFS/NTFS/exFAT
/dev/sda3 470054912 488396799 9170944 17 Hidden HPFS/NTFS

That crusty old version of KNoppix .. I think 5.x era showed a hda1 or sda1 on the desktop. I could just navigate that through the windows files.

So I guess Im asking... how do I get the harddrive to show up in the gui .. or how do I unhide the drives ?

Extract Info And Find/count Strings From Blocks Inside Text File

Hello

I have a text file which has blocks like
Code:
dir1/dir2/dir3/name_run_number1:
line1_run_number1_part1
line2_run_number1_part2
line3_run_number1_part3...

Each block is separated with a blank line and there is the ":" in the "header" of each one while each block carries the same "number1" after "run_" suffix
What I want to do is for each block, extract the "number1" as shown in the first line and then for the lines below count from 1-20 and give a message if a "partX" line is missing. Any bash or python would be fine

Thanks

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?

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?

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

What Are The Differences Between Character Devices And Block Devices?

Hi,

I am trying to understand the difference between char devices and block devices.
I understand the basic, which is that char devices input/output data one character at a time, whereas block device input/output data block by block. But for char device driver, most of the time we are able to read/write an array of data using the read/write system call. This "array of data" sounds like a block of data to me, except that it's not fixed in size as for block devices. With this thinking, can I say that I can effectively achieve block read/write with a char device driver?
And what are the other differences?

Thank you all,
Wei

How To Find File Creation Time

Hello,
ls -i mb1-pearsond.co.in.db05.cfg
275040 mb1-pearsond.co.in.db05.cfg

debugfs -R 'stat <275037>' /dev/mapper/VGdata-LVdata

debugfs 1.41.12 (17-May-2010)
Inode: 275037 Type: bad type Mode: 0000 Flags: 0x0
Generation: 0 Version: 0x00000000
User: 0 Group: 0 Size: 0
File ACL: 0 Directory ACL: 0
Links: 0 Blockcount: 0
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x00000000 -- Thu Jan 1 05:30:00 1970
atime: 0x00000000 -- Thu Jan 1 05:30:00 1970
mtime: 0x00000000 -- Thu Jan 1 05:30:00 1970
Size of extra inode fields: 0
BLOCKS:

I am not able get the file created time, its not showing.

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