root@SHZ-VM-001:/# fdisk /dev/sdb
WARNING: DOS-compatible mode is deprecated. It's strongly
recommended to
switch off the mode (command
'c') and change display units to
sectors (command 'u').
Command (m for help): p
Disk /dev/sdb: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 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: 0x76148198
Device Boot
Start
End Blocks Id
System
/dev/sdb1 1 26108 209712478+ 83 Linux
Command (m for help): m
Command action
a toggle a bootable flag
b edit
bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list
known partition types
m print this menu
n add
a new partition
o create a new empty DOS partition table
p print the partition table
q quit
without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): d
Selected partition 1
Command (m for help): p
Disk /dev/sdb: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 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: 0x76148198
Device Boot
Start
End Blocks Id
System
Command (m for help): m
Command action
a toggle a bootable flag
b edit
bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list
known partition types
m print this menu
n add
a new partition
o create a new empty DOS partition table
p print the partition table
q quit
without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4):
Value out of range.
Partition number (1-4): 1
First cylinder (1-39162, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-39162, default
39162):
Using default value 39162
Command (m for help): p
Disk /dev/sdb: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 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: 0x76148198
Device Boot
Start
End Blocks Id
System
/dev/sdb1 1 39162 314568733+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
root@SHZ-VM-001:/#
root@SHZ-VM-001:/#
root@SHZ-VM-001:/#
root@SHZ-VM-001:/# resize2fs /dev/sdb1
resize2fs 1.41.11 (14-Mar-2010)
Please run 'e2fsck -f /dev/sdb1' first.
root@SHZ-VM-001:/# e2fsck -f /dev/sdb1
e2fsck 1.41.11 (14-Mar-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb1: 474754/13107200 files (0.4% non-contiguous),
45135492/52428119 blocks
root@SHZ-VM-001:/# resize2fs /dev/sdb1
resize2fs 1.41.11 (14-Mar-2010)
Resizing the filesystem on /dev/sdb1 to 78642183 (4k)
blocks.
The filesystem on /dev/sdb1 is now 78642183 blocks long.
root@SHZ-VM-001:/# mount /dev/sdb1 /lv_backup/
root@SHZ-VM-001:/# ls -l /lv_backup/
lost+found/ rsync_backup/
root@SHZ-VM-001:/# ls -l /lv_backup/rsync_backup/
total 24
drwxr-xr-x 6 root root
4096 2014-07-14 15:26 dmz
drwxr-xr-x 60 nobody root 4096 2014-07-15 04:00
forge-router
drwxr-xr-x 4 nobody root 4096 2014-06-17
11:21 sz01003
drwxr-xr-x 2 nobody root 4096 2014-07-14
15:17 sz01006
drwxr-xr-x 4 nobody root 4096 2014-06-17
22:00 sz01007
drwxr-xr-x 5 nobody root 4096 2014-06-17
12:54 sz01009
root@SHZ-VM-001:/# df -h
Filesystem Size Used Avail Use% Mounted
on
/dev/sda1 76G 15G
58G 21% /
none 1001M 172K
1001M 1% /dev
none 1005M 0 1005M 0% /dev/shm
none 1005M 60K
1005M 1% /var/run
none 1005M 0 1005M 0% /var/lock
none 1005M 0 1005M 0% /lib/init/rw
/dev/sdb1 296G 170G
112G 61% /lv_backup