I have a server that seems set up odd. It was done by a previous admin, with no notes left. It is on vmware and has 4 drives. Why 4, I am not sure, as I said, no notes.
Anyways, I have part of it that needs to be enlarged. It is called /u02, it does not contain any var/tmp/root directories, so I think it is just a formatted partition for storage. Now, I "think" it is on device /dev/sdc1, and the partition is /dev/sdc1? I am pretty sure /u02 is not spread out across multiple disks. Now, vmware shows the disk size to be 310G, but fdisk shows it to be 279.2G.
So, my assumption is that I have about 30G just sitting there unused, would that be fairly accurate? Also, if so, I need to add about 70G more to this drive. I can easily shut it down for maintenance and enlarge the disk in vmware. How do I enlarge the partition itself? Provided my assumptions are correct? I don't think it is part of any lv or vg since extending with either lvextend of vgextend did not work. But then I may have typed thing incorrectly.
Maybe I just need a shove in the general direction.
Thanks
partition extending?
Re: partition extending?
What's the output of fdisk -l and df?
What's the content of /etc/fstab?
What's the content of /etc/fstab?
-
- Posts: 28
- Joined: 2016/10/06 20:12:33
Re: partition extending?
Outputs of fdisk -l and df -h
Disk /dev/sda: 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: 0x000c507e
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 13055 104344576 8e Linux LVM
Disk /dev/sdb: 193.3 GB, 193273528320 bytes
255 heads, 63 sectors/track, 23497 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: 0x000178bd
Device Boot Start End Blocks Id System
/dev/sdb1 1 23497 188739621 83 Linux
Disk /dev/sdc: 332.9 GB, 332859965440 bytes
255 heads, 63 sectors/track, 40467 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: 0x0005c8fe
Device Boot Start End Blocks Id System
/dev/sdc1 1 33940 272623018+ 83 Linux
Disk /dev/sdd: 16.1 GB, 16106127360 bytes
64 heads, 32 sectors/track, 15360 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: 0xb3057f5f
Device Boot Start End Blocks Id System
/dev/sdd1 1 15360 15728624 83 Linux
Disk /dev/mapper/vg_bp****-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_bp****-lv_swap: 17.2 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 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_bp****-lv_var: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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_bp****-lv_home: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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_bp****-lv_tmp: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_bp****-lv_root
50G 2.9G 44G 7% /
tmpfs 12G 20M 12G 1% /dev/shm
/dev/sda1 477M 106M 346M 24% /boot
/dev/mapper/vg_bp****-lv_home
9.8G 7.3G 2.0G 79% /home
/dev/mapper/vg_bp****-lv_tmp
9.8G 23M 9.2G 1% /tmp
/dev/mapper/vg_bp****-lv_var
9.8G 727M 8.6G 8% /var
/dev/sdb1 178G 50G 120G 30% /u01
/dev/sdc1 256G 229G 15G 94% /u02
/dev/sdd1 15G 2.6G 12G 19% /u03
fstab:
/dev/mapper/vg_bp****-lv_root / ext4 defaults 1 1
UUID=3fab1890-c156-4faf-beea-8c00b8f23dd0 /boot ext4 defaults 1 2
/dev/mapper/vg_bp****-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_bp****-lv_tmp /tmp ext4 defaults 1 2
/dev/mapper/vg_bp****-lv_var /var ext4 defaults 1 2
/dev/mapper/vg_bp****-lv_swap swap swap defaults 0 0
/dev/sdb1 /u01 ext4 defaults 0 0
/dev/sdc1 /u02 ext4 defaults 0 0
/dev/sdd1 /u03 ext4 defaults 0 0
Disk /dev/sda: 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: 0x000c507e
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 13055 104344576 8e Linux LVM
Disk /dev/sdb: 193.3 GB, 193273528320 bytes
255 heads, 63 sectors/track, 23497 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: 0x000178bd
Device Boot Start End Blocks Id System
/dev/sdb1 1 23497 188739621 83 Linux
Disk /dev/sdc: 332.9 GB, 332859965440 bytes
255 heads, 63 sectors/track, 40467 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: 0x0005c8fe
Device Boot Start End Blocks Id System
/dev/sdc1 1 33940 272623018+ 83 Linux
Disk /dev/sdd: 16.1 GB, 16106127360 bytes
64 heads, 32 sectors/track, 15360 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: 0xb3057f5f
Device Boot Start End Blocks Id System
/dev/sdd1 1 15360 15728624 83 Linux
Disk /dev/mapper/vg_bp****-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_bp****-lv_swap: 17.2 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 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_bp****-lv_var: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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_bp****-lv_home: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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_bp****-lv_tmp: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_bp****-lv_root
50G 2.9G 44G 7% /
tmpfs 12G 20M 12G 1% /dev/shm
/dev/sda1 477M 106M 346M 24% /boot
/dev/mapper/vg_bp****-lv_home
9.8G 7.3G 2.0G 79% /home
/dev/mapper/vg_bp****-lv_tmp
9.8G 23M 9.2G 1% /tmp
/dev/mapper/vg_bp****-lv_var
9.8G 727M 8.6G 8% /var
/dev/sdb1 178G 50G 120G 30% /u01
/dev/sdc1 256G 229G 15G 94% /u02
/dev/sdd1 15G 2.6G 12G 19% /u03
fstab:
/dev/mapper/vg_bp****-lv_root / ext4 defaults 1 1
UUID=3fab1890-c156-4faf-beea-8c00b8f23dd0 /boot ext4 defaults 1 2
/dev/mapper/vg_bp****-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_bp****-lv_tmp /tmp ext4 defaults 1 2
/dev/mapper/vg_bp****-lv_var /var ext4 defaults 1 2
/dev/mapper/vg_bp****-lv_swap swap swap defaults 0 0
/dev/sdb1 /u01 ext4 defaults 0 0
/dev/sdc1 /u02 ext4 defaults 0 0
/dev/sdd1 /u03 ext4 defaults 0 0
Re: partition extending?
1. Back up /U02
2. Back up /U02
3. Unmount /U02
4. in fdisk, note the exact start of /dev/sdc1. You should use expert mode and then print the partition layout.
5. Delete /dev/sdc1
6. Re-create /dev/sdc1 with the exact same start point, but using all the space available.
7. run
8. Re-mount /U02
9. If any problems, restore the data from your backup.
2. Back up /U02
3. Unmount /U02
4. in fdisk, note the exact start of /dev/sdc1. You should use expert mode and then print the partition layout.
5. Delete /dev/sdc1
6. Re-create /dev/sdc1 with the exact same start point, but using all the space available.
7. run
Code: Select all
resize2fs /dev/sdc1
9. If any problems, restore the data from your backup.