Re: Resizing partitions on a headless server
csanyi...@gmail.com a écrit : I want to create one LV for /usr and one LV for /var. But I can't create a LV with: # lvcreate --size 10.10G -n usr bubba Rounding up size to full physical extent 10.10 GiB /dev/bubba/usr: not found: device not cleared Aborting. Failed to wipe start of new LV. semid 1114120: semop failed for cookie 0xd4d6ff6: incorrect semaphore state Failed to set a proper state for notification semaphore identified by cookie value 223178742 (0xd4d6ff6) to initialize waiting for incoming notifications. I don't understand why can't create a new LV with this command abowe? Never had this error before. From a quick search, it may be related to hotplug/udev event processing. In which environment are you running this command ? What happens if you add the option --noudevsync ? And don't understand why is successful following command? # lvcreate -vvv --size 10.10G -n usr bubba -v just increases the verbosity, so it should not have any effect on success or failure. I search on Internet and found another solution: # lvcreate -Zn --size 10.10G -n usr bubba Rounding up size to full physical extent 10.10 GiB WARNING: bubba/usr not zeroed Logical volume usr created semid 1146888: semop failed for cookie 0xd4d9b50: incorrect semaphore state Failed to set a proper state for notification semaphore identified by cookie value 223189840 (0xd4d9b50) to initialize waiting for incoming notifications. That's not a solution, just a workaround to avoid the wiping error. Can I use now this newly created LV to make on it an ext4 filesystem despite the fact that it is not zeroed? Yes, if it is created correctly and active. Check with lvs, lvdisplay. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/5586cc60.5090...@plouf.fr.eu.org
Re: Resizing partitions on a headless server
A small contribution, perhaps unnecessary. To change the size of a lvs with lvreduce or lvextend is important to use the resize2fs and e2fsck command. Good luck in solving the problem On Sun, Jun 21, 2015 at 11:38 AM, Pascal Hambourg pas...@plouf.fr.eu.org wrote: csanyi...@gmail.com a écrit : I want to create one LV for /usr and one LV for /var. But I can't create a LV with: # lvcreate --size 10.10G -n usr bubba Rounding up size to full physical extent 10.10 GiB /dev/bubba/usr: not found: device not cleared Aborting. Failed to wipe start of new LV. semid 1114120: semop failed for cookie 0xd4d6ff6: incorrect semaphore state Failed to set a proper state for notification semaphore identified by cookie value 223178742 (0xd4d6ff6) to initialize waiting for incoming notifications. I don't understand why can't create a new LV with this command abowe? Never had this error before. From a quick search, it may be related to hotplug/udev event processing. In which environment are you running this command ? What happens if you add the option --noudevsync ? And don't understand why is successful following command? # lvcreate -vvv --size 10.10G -n usr bubba -v just increases the verbosity, so it should not have any effect on success or failure. I search on Internet and found another solution: # lvcreate -Zn --size 10.10G -n usr bubba Rounding up size to full physical extent 10.10 GiB WARNING: bubba/usr not zeroed Logical volume usr created semid 1146888: semop failed for cookie 0xd4d9b50: incorrect semaphore state Failed to set a proper state for notification semaphore identified by cookie value 223189840 (0xd4d9b50) to initialize waiting for incoming notifications. That's not a solution, just a workaround to avoid the wiping error. Can I use now this newly created LV to make on it an ext4 filesystem despite the fact that it is not zeroed? Yes, if it is created correctly and active. Check with lvs, lvdisplay. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/5586cc60.5090...@plouf.fr.eu.org -- Gustavo Soares de Lima
Re: Resizing partitions on a headless server
Pascal Hambourg pas...@plouf.fr.eu.org writes: csanyi...@gmail.com a écrit : I want to create one LV for /usr and one LV for /var. But I can't create a LV with: # lvcreate --size 10.10G -n usr bubba Rounding up size to full physical extent 10.10 GiB /dev/bubba/usr: not found: device not cleared Aborting. Failed to wipe start of new LV. semid 1114120: semop failed for cookie 0xd4d6ff6: incorrect semaphore state Failed to set a proper state for notification semaphore identified by cookie value 223178742 (0xd4d6ff6) to initialize waiting for incoming notifications. I don't understand why can't create a new LV with this command abowe? Never had this error before. From a quick search, it may be related to hotplug/udev event processing. In which environment are you running this command ? What happens if you add the option --noudevsync ? # lvcreate --noudevsync --size 10.10G -n var bubba Rounding up size to full physical extent 10.10 GiB /dev/bubba/var: not found: device not cleared Aborting. Failed to wipe start of new LV. This is a Debian GNU/Linux Jessie on power pc headless box. Furthermore, I don't think so so udev is properly setup on this system. I red in /etc/udev/udev.conf the followings: [quote] # udevd is started in the initramfs, so when this file is modified the # initramfs should be rebuilt. [/quote] In this file I remove the # from the beginning of line: udev_log=info but don't know how to rebuild initramfs? In /boot I have these files: 8313E21.dtb System.map-3.2.62-1 bubba.dtb config-3.2.62-1 uImage This is a power pc box on which booting process is started with u-boot. Can I describe this environment better? And don't understand why is successful following command? # lvcreate -vvv --size 10.10G -n usr bubba -v just increases the verbosity, so it should not have any effect on success or failure. I search on Internet and found another solution: # lvcreate -Zn --size 10.10G -n usr bubba Rounding up size to full physical extent 10.10 GiB WARNING: bubba/usr not zeroed Logical volume usr created semid 1146888: semop failed for cookie 0xd4d9b50: incorrect semaphore state Failed to set a proper state for notification semaphore identified by cookie value 223189840 (0xd4d9b50) to initialize waiting for incoming notifications. That's not a solution, just a workaround to avoid the wiping error. Can I use now this newly created LV to make on it an ext4 filesystem despite the fact that it is not zeroed? Yes, if it is created correctly and active. Check with lvs, lvdisplay. # lvs LV VGAttr LSize Pool Origin Data% Meta% Move Log \ Cpy%Sync Convert storage bubba -wi-a- 20.10g usr bubba -wi-a- 10.10g # lvdisplay --- Logical volume --- LV Path/dev/bubba/usr LV Nameusr VG Namebubba LV UUIDEe83A0-H6J3-w4Xi-bt1f-3zGN-jVm4-DOUKxq LV Write Accessread/write LV Creation host, time b2, 2015-06-19 07:26:48 +0200 LV Status available # open 0 LV Size10.10 GiB Current LE 2586 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 -- Regards from Pal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/871th5t3ah@gmail.com
Re: Resizing partitions on a headless server
Pascal Hambourg pas...@plouf.fr.eu.org writes: csanyi...@gmail.com a écrit : Finally, I solved the problem by doing the followings: # lvresize --size 455.5G /dev/mapper/bubba-storage # e2fsck -f /dev/mapper/bubba-storage Glad you were lucky. What is my goal? Filesystem Size Used Avail Use% Mounted on /dev/root 9.2G 8.0G 815M 91% / devtmpfs 125M 0 125M 0% /dev tmpfs 125M 4.0K 125M 1% /dev/shm tmpfs 125M 5.6M 120M 5% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 125M 0 125M 0% /sys/fs/cgroup /dev/mapper/bubba-storage 449G 8.2G 418G 2% /home tmpfs 25M 0 25M 0% /run/user/1001 As one can see, my /dev/root partition is almost full. I want to increase /dev/root partition to be maximum available size and decrease /home partition to only 20 GiB. So can be the /var directory large enough to encompass the web and other contents. What are your advises, what do I do to reach my goal? Do not resize partitions. This is difficult and risky. Use LVM. Reduce the filesystem in the LV and the LV to a adequate size (without mistake this time). I did this step successfully: root@b2:~# pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name bubba PV Size 455.43 GiB / not usable 3.65 MiB Allocatable yes PE Size 4.00 MiB Total PE 116588 Free PE 111442 Allocated PE 5146 PV UUID SMvR2K-6Z3c-xCgd-jSR2-kb1A-15a2-3RiS6V root@b2:~# lvdisplay --- Logical volume --- LV Path/dev/bubba/storage LV Namestorage VG Namebubba LV UUID91yHxQ-RmOW-OeDv-jaIv-1z1B-KBSk-yCsDC6 LV Write Accessread/write LV Creation host, time , LV Status available # open 1 LV Size20.10 GiB Current LE 5146 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 Create a new LV of adequate size. DON'T take all the available space in the VG. Leave some space for future needs. Increasing a LV and its filesystem is easy and can be done online while it's mounted. Reducing is risky, as you experienced. I want to create one LV for /usr and one LV for /var. But I can't create a LV with: # lvcreate --size 10.10G -n usr bubba Rounding up size to full physical extent 10.10 GiB /dev/bubba/usr: not found: device not cleared Aborting. Failed to wipe start of new LV. semid 1114120: semop failed for cookie 0xd4d6ff6: incorrect semaphore state Failed to set a proper state for notification semaphore identified by cookie value 223178742 (0xd4d6ff6) to initialize waiting for incoming notifications. I don't understand why can't create a new LV with this command abowe? And don't understand why is successful following command? # lvcreate -vvv --size 10.10G -n usr bubba I search on Internet and found another solution: # lvcreate -Zn --size 10.10G -n usr bubba Rounding up size to full physical extent 10.10 GiB WARNING: bubba/usr not zeroed Logical volume usr created semid 1146888: semop failed for cookie 0xd4d9b50: incorrect semaphore state Failed to set a proper state for notification semaphore identified by cookie value 223189840 (0xd4d9b50) to initialize waiting for incoming notifications. Can I use now this newly created LV to make on it an ext4 filesystem despite the fact that it is not zeroed? -- Regards from Pal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87wpz0461s@gmail.com
Re: Resizing partitions on a headless server
On Mon, Jun 15, 2015 at 08:25:09AM +0200, csanyi...@gmail.com wrote: I bought the headless powerpc server here: http://www.excitostore.com/ If you mean the Excito B3, it would appear to be ARM, not PowerPC. That's good for you because ARM is still a supported architecture in Debian, and PowerPC is not. I get the hardware preinstalled with Debian Sarge. The developers knows why did the partition so as is. Really? Sarge is ancient. The website says it comes with Squeeze... -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150615092931.gc21...@chew.redmars.org
Re: Resizing partitions on a headless server
Jonathan Dowland j...@debian.org writes: On Mon, Jun 15, 2015 at 08:25:09AM +0200, csanyi...@gmail.com wrote: I bought the headless powerpc server here: http://www.excitostore.com/ If you mean the Excito B3, it would appear to be ARM, not PowerPC. That's good for you because ARM is still a supported architecture in Debian, and PowerPC is not. No B3 but B2 and B2 is power pc. I get the hardware preinstalled with Debian Sarge. The developers knows why did the partition so as is. Really? Sarge is ancient. The website says it comes with Squeeze... Well, I can't remember which Debian distribution came with Bubba Two. It came maybe with etch or lenny? Bubba 3 is a different story. -- Regards from Pal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87r3pdrney@gmail.com
Re: Resizing partitions on a headless server
Jonathan Dowland j...@debian.org writes: On Mon, Jun 15, 2015 at 08:25:09AM +0200, csanyi...@gmail.com wrote: I bought the headless powerpc server here: http://www.excitostore.com/ If you mean the Excito B3, it would appear to be ARM, not PowerPC. That's good for you because ARM is still a supported architecture in Debian, and PowerPC is not. Wrong, PowerPC is supported architecture: https://www.debian.org/releases/stable/ -- Regards from Pal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87lhflrn8s@gmail.com
Re: Resizing partitions on a headless server
Pascal Hambourg pas...@plouf.fr.eu.org writes: csanyi...@gmail.com a écrit : Finally, I solved the problem by doing the followings: # lvresize --size 455.5G /dev/mapper/bubba-storage # e2fsck -f /dev/mapper/bubba-storage Glad you were lucky. Now, I can to use parted to resize my partitions. What is my goal? Filesystem Size Used Avail Use% Mounted on /dev/root 9.2G 8.0G 815M 91% / devtmpfs 125M 0 125M 0% /dev tmpfs 125M 4.0K 125M 1% /dev/shm tmpfs 125M 5.6M 120M 5% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 125M 0 125M 0% /sys/fs/cgroup /dev/mapper/bubba-storage 449G 8.2G 418G 2% /home tmpfs 25M 0 25M 0% /run/user/1001 # fdisk -l Device Boot Start End Sectors Size Id Type /dev/sda1 63 19551104 19551042 9.3G 83 Linux /dev/sda219551105 974647484 955096380 455.4G 8e Linux LVM /dev/sda3 974647485 976768064 2120580 1G 82 Linux swap / Solaris # lvs LV VGAttr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert storage bubba -wi-ao 455.40g # pvs PV VGFmt Attr PSize PFree /dev/sda2 bubba lvm2 a-- 455.42g 20.00m I'm curious : what's the use of LVM if you have only one LV taking all the space in the VG, and plain partitions outside the VG ? I bought the headless powerpc server here: http://www.excitostore.com/ I get the hardware preinstalled with Debian Sarge. The developers knows why did the partition so as is. -- Regards from Pal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87wpz5o5ru@gmail.com
Re: Resizing partitions on a headless server
Pascal Hambourg pas...@plouf.fr.eu.org writes: csanyi...@gmail.com a écrit : Finally, I solved the problem by doing the followings: # lvresize --size 455.5G /dev/mapper/bubba-storage # e2fsck -f /dev/mapper/bubba-storage Glad you were lucky. Now, I can to use parted to resize my partitions. What is my goal? Filesystem Size Used Avail Use% Mounted on /dev/root 9.2G 8.0G 815M 91% / devtmpfs 125M 0 125M 0% /dev tmpfs 125M 4.0K 125M 1% /dev/shm tmpfs 125M 5.6M 120M 5% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 125M 0 125M 0% /sys/fs/cgroup /dev/mapper/bubba-storage 449G 8.2G 418G 2% /home tmpfs 25M 0 25M 0% /run/user/1001 # fdisk -l Device Boot Start End Sectors Size Id Type /dev/sda1 63 19551104 19551042 9.3G 83 Linux /dev/sda219551105 974647484 955096380 455.4G 8e Linux LVM /dev/sda3 974647485 976768064 2120580 1G 82 Linux swap / Solaris # lvs LV VGAttr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert storage bubba -wi-ao 455.40g # pvs PV VGFmt Attr PSize PFree /dev/sda2 bubba lvm2 a-- 455.42g 20.00m I'm curious : what's the use of LVM if you have only one LV taking all the space in the VG, and plain partitions outside the VG ? I bought the headless powerpc server here: http://www.excitostore.com/ I get the hardware preinstalled with Debian Sarge. The developers knows why did the partition so as is. -- Regards from Pal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87egldo5dm@gmail.com
Re: Resizing partitions on a headless server
On 14/06/15 12:40 AM, csanyi...@gmail.com wrote: Gary Dale garyd...@torfree.net writes: On 13/06/15 03:19 PM, csanyi...@gmail.com wrote: Hello, on my headless Debian GNU/Linux Jessie server I want to resize partitions. So far I did followings: root@b2:~# df -T FilesystemType 1K-blocksUsed Available Use% Mounted on /dev/root ext3 9621848 8293064840008 91% / devtmpfs devtmpfs127800 0127800 0% /dev tmpfs tmpfs 127880 4127876 1% /dev/shm tmpfs tmpfs 127880 17992109888 15% /run tmpfs tmpfs 5120 0 5120 0% /run/lock tmpfs tmpfs 127880 0127880 0% /sys/fs/cgroup /dev/mapper/bubba-storage ext3 470050224 8512368 437660636 2% /home tmpfs tmpfs25576 0 25576 0% /run/user/1001 tmpfs tmpfs25576 0 25576 0% /run/user/0 root@b2:~# umount /dev/mapper/bubba-storage root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G resize2fs 1.42.12 (29-Aug-2014) Please run 'e2fsck -f /dev/mapper/bubba-storage' first. root@b2:~# e2fsck -f /dev/mapper/bubba-storage e2fsck 1.42.12 (29-Aug-2014) 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 Bubba_home: 114439/59703296 files (0.4% non-contiguous), \ 4001648/119386112 blocks At this step I think I forgot to run again: root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G root@b2:~# lvresize --size 2.1G /dev/mapper/bubba-storage Rounding size to boundary between physical extents: 2.10 GiB WARNING: Reducing active logical volume to 2.10 GiB THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce storage? [y/n]: y Size of logical volume bubba/storage changed from 455.42 GiB (116588 extents) to 2.10 GiB (538 extents). Logical volume storage successfully resized Furthermore, I was wrong when I determined the --size to 2.1G in the command abowe, because I wanted to write 20.1G instead. root@b2:~# resize2fs -p /dev/mapper/bubba-storage resize2fs 1.42.12 (29-Aug-2014) resize2fs: New size smaller than minimum (2153070) root@b2:~# mount /dev/mapper/bubba-storage After these steps I rebooted the server but can't login on it with ssh but only with serial cable. Now, when I login on the serial console as non root user, I get messages: b2 login: csanyipal Password: EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 Last login: Sat Jun 13 14:06:27 CEST 2015 from 192.168.10.90 on pts/0 Linux b2 3.2.62-1 #1 Mon Aug 25 04:22:40 UTC 2014 ppc The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. No mail. EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 No directory, logging in with HOEXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 ME=/ Now what can I do to correct the partitions? Boot from something like system rescue CD and try to fix the damage. With any luck resize2fs didn't do anything. Hopefully you can put the partitions back the way they were. My headless powerpc box can't boot from CD because it hasn't CD device. It only has USB drive. Furthermore, it can't boot with an usual system rescue image installed on USB stick, because it uses uImage. I tried systemrescuecd ( http://www.sysresccd.org ), gparted live to boot with, but without success. I think I have the possibility to use serial console only. There I can run parted but don't know how to fix with it the problem I made. Otherwise, there is always testdisk or your backups. I just installed testdisk and try followings: Select a media: Disk /dev/sda - 500 GB / 465 GiB - WDC WD5000AACS-00G8B1 Disk /dev/mapper/bubba-storage - 2256 MB / 2152 MiB - WDC \ WD5000AACS-00G8B1 Disk /dev/dm-0 - 2256 MB / 2152 MiB - WDC WD5000AACS-00G8B1 [Proceed ] Please select the partition table type, press Enter when done. [Humax ] Humax partition table Hint: Humax partition table type has been detected. Disk /dev/sda - 500 GB / 465 GiB - WDC WD5000AACS-00G8B1 CHS 60801 255 63 - sector size=512 [ Analyse ] Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63 Current partition structure:
Re: Resizing partitions on a headless server
csanyi...@gmail.com writes: Gary Dale garyd...@torfree.net writes: On 13/06/15 03:19 PM, csanyi...@gmail.com wrote: [snipped] My headless powerpc box can't boot from CD because it hasn't CD device. It only has USB drive. Furthermore, it can't boot with an usual system rescue image installed on USB stick, because it uses uImage. I tried systemrescuecd ( http://www.sysresccd.org ), gparted live to boot with, but without success. I think I have the possibility to use serial console only. There I can run parted but don't know how to fix with it the problem I made. Otherwise, there is always testdisk or your backups. I just installed testdisk and try followings: [snipped] Segmentation fault So, I can't use testdisk here. Finally, I solved the problem by doing the followings: # lvresize --size 455.5G /dev/mapper/bubba-storage # e2fsck -f /dev/mapper/bubba-storage # resize2fs -p /dev/mapper/bubba-storage # reboot So now I get back my /home partition and can ssh into my server. Now, I can to use parted to resize my partitions. What is my goal? Filesystem Size Used Avail Use% Mounted on /dev/root 9.2G 8.0G 815M 91% / devtmpfs 125M 0 125M 0% /dev tmpfs 125M 4.0K 125M 1% /dev/shm tmpfs 125M 5.6M 120M 5% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 125M 0 125M 0% /sys/fs/cgroup /dev/mapper/bubba-storage 449G 8.2G 418G 2% /home tmpfs 25M 0 25M 0% /run/user/1001 # fdisk -l Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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 Disklabel type: dos Disk identifier: 0x Device Boot Start End Sectors Size Id Type /dev/sda1 63 19551104 19551042 9.3G 83 Linux /dev/sda219551105 974647484 955096380 455.4G 8e Linux LVM /dev/sda3 974647485 976768064 2120580 1G 82 Linux swap / Solaris # lvs LV VGAttr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert storage bubba -wi-ao 455.40g # pvs PV VGFmt Attr PSize PFree /dev/sda2 bubba lvm2 a-- 455.42g 20.00m As one can see, my /dev/root partition is almost full. I want to increase /dev/root partition to be maximum available size and decrease /home partition to only 20 GiB. So can be the /var directory large enough to encompass the web and other contents. What are your advises, what do I do to reach my goal? -- Regards from Pal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87pp4ylblc@gmail.com
Re: Resizing partitions on a headless server
On 14/06/15 08:26 AM, csanyi...@gmail.com wrote: csanyi...@gmail.com writes: Gary Dale garyd...@torfree.net writes: On 13/06/15 03:19 PM, csanyi...@gmail.com wrote: [snipped] My headless powerpc box can't boot from CD because it hasn't CD device. It only has USB drive. Furthermore, it can't boot with an usual system rescue image installed on USB stick, because it uses uImage. I tried systemrescuecd ( http://www.sysresccd.org ), gparted live to boot with, but without success. I think I have the possibility to use serial console only. There I can run parted but don't know how to fix with it the problem I made. Otherwise, there is always testdisk or your backups. I just installed testdisk and try followings: [snipped] Segmentation fault So, I can't use testdisk here. Finally, I solved the problem by doing the followings: # lvresize --size 455.5G /dev/mapper/bubba-storage # e2fsck -f /dev/mapper/bubba-storage # resize2fs -p /dev/mapper/bubba-storage # reboot So now I get back my /home partition and can ssh into my server. Now, I can to use parted to resize my partitions. What is my goal? Filesystem Size Used Avail Use% Mounted on /dev/root 9.2G 8.0G 815M 91% / devtmpfs 125M 0 125M 0% /dev tmpfs 125M 4.0K 125M 1% /dev/shm tmpfs 125M 5.6M 120M 5% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 125M 0 125M 0% /sys/fs/cgroup /dev/mapper/bubba-storage 449G 8.2G 418G 2% /home tmpfs 25M 0 25M 0% /run/user/1001 # fdisk -l Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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 Disklabel type: dos Disk identifier: 0x Device Boot Start End Sectors Size Id Type /dev/sda1 63 19551104 19551042 9.3G 83 Linux /dev/sda219551105 974647484 955096380 455.4G 8e Linux LVM /dev/sda3 974647485 976768064 2120580 1G 82 Linux swap / Solaris # lvs LV VGAttr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert storage bubba -wi-ao 455.40g # pvs PV VGFmt Attr PSize PFree /dev/sda2 bubba lvm2 a-- 455.42g 20.00m As one can see, my /dev/root partition is almost full. I want to increase /dev/root partition to be maximum available size and decrease /home partition to only 20 GiB. So can be the /var directory large enough to encompass the web and other contents. What are your advises, what do I do to reach my goal? My advice is to leave well enough alone until such time as you are fully comfortable using the tools. Then proceed modifying one partition at a time and verifying that it has worked before trying to do anything else. You've just wasted a lot of time trying to do too much at once. This is your data that you are playing with. Some extra umount/adjust/mount cycles are a small price to pay for minimizing the risk to your files. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/557d816f.4030...@torfree.net
Re: Resizing partitions on a headless server
csanyi...@gmail.com a écrit : Hello, on my headless Debian GNU/Linux Jessie server I want to resize partitions. Why ? The use of LVM should avoid the need to resize partitions (PVs). root@b2:~# e2fsck -f /dev/mapper/bubba-storage e2fsck 1.42.12 (29-Aug-2014) 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 Bubba_home: 114439/59703296 files (0.4% non-contiguous), \ 4001648/119386112 blocks At this step I think I forgot to run again: root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G root@b2:~# lvresize --size 2.1G /dev/mapper/bubba-storage Rounding size to boundary between physical extents: 2.10 GiB WARNING: Reducing active logical volume to 2.10 GiB THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce storage? [y/n]: y Size of logical volume bubba/storage changed from 455.42 GiB (116588 extents) to 2.10 GiB (538 extents). Logical volume storage successfully resized Furthermore, I was wrong when I determined the --size to 2.1G in the command abowe, because I wanted to write 20.1G instead. The bad news is that you probably screwed the filesystem. LVM provides flexibility over plain partitions, but at the cost of complexity and is less tolerant to such a mistake. With a plain partition, all you would have to do to fix the mistake is to extend the reduced partition (not the filesystem) to its original size. However, with LVM, if you extend a reduced LV to its original size, nothing guarantees that it will use the same physical blocks as before. You can try, but it may not restore the filesystem's integrity. Run fsck to check the damage. Edit : check in /etc/lvm/backup for a metadata backup of the previous situation of the VG bubba. Using it to restore the LV is beyond my knowledge, but if your data is important and you don't have a backup (sounds like an oxymoron), my advice is don't touch anything until you find how to restore the LV. Otherwise, just extend the LV and recreate the filesystem on it. Now what can I do to correct the partitions? There is no partition to correct. The problem is in the LV bubba/storage and its filesystem. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/557d7dbd.7020...@plouf.fr.eu.org
Re: Resizing partitions on a headless server
csanyi...@gmail.com a écrit : Finally, I solved the problem by doing the followings: # lvresize --size 455.5G /dev/mapper/bubba-storage # e2fsck -f /dev/mapper/bubba-storage Glad you were lucky. Now, I can to use parted to resize my partitions. What is my goal? Filesystem Size Used Avail Use% Mounted on /dev/root 9.2G 8.0G 815M 91% / devtmpfs 125M 0 125M 0% /dev tmpfs 125M 4.0K 125M 1% /dev/shm tmpfs 125M 5.6M 120M 5% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 125M 0 125M 0% /sys/fs/cgroup /dev/mapper/bubba-storage 449G 8.2G 418G 2% /home tmpfs 25M 0 25M 0% /run/user/1001 # fdisk -l Device Boot Start End Sectors Size Id Type /dev/sda1 63 19551104 19551042 9.3G 83 Linux /dev/sda219551105 974647484 955096380 455.4G 8e Linux LVM /dev/sda3 974647485 976768064 2120580 1G 82 Linux swap / Solaris # lvs LV VGAttr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert storage bubba -wi-ao 455.40g # pvs PV VGFmt Attr PSize PFree /dev/sda2 bubba lvm2 a-- 455.42g 20.00m I'm curious : what's the use of LVM if you have only one LV taking all the space in the VG, and plain partitions outside the VG ? As one can see, my /dev/root partition is almost full. I want to increase /dev/root partition to be maximum available size and decrease /home partition to only 20 GiB. So can be the /var directory large enough to encompass the web and other contents. What are your advises, what do I do to reach my goal? Do not resize partitions. This is difficult and risky. Use LVM. Reduce the filesystem in the LV and the LV to a adequate size (without mistake this time). Create a new LV of adequate size. DON'T take all the available space in the VG. Leave some space for future needs. Increasing a LV and its filesystem is easy and can be done online while it's mounted. Reducing is risky, as you experienced. Move the data in /var from the root filesystem to the new LV and mount it on /var. Update /etc/fstab accordingly. Or : Create a var directory in /home Move the data in /var to /home/var Bind-mount /home/var on /var and update /etc/fstab. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/557d8290.6070...@plouf.fr.eu.org
Re: Resizing partitions on a headless server
On 14/06/15 09:12 AM, Pascal Hambourg wrote: csanyi...@gmail.com a écrit : Hello, on my headless Debian GNU/Linux Jessie server I want to resize partitions. Why ? The use of LVM should avoid the need to resize partitions (PVs). root@b2:~# e2fsck -f /dev/mapper/bubba-storage e2fsck 1.42.12 (29-Aug-2014) 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 Bubba_home: 114439/59703296 files (0.4% non-contiguous), \ 4001648/119386112 blocks At this step I think I forgot to run again: root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G root@b2:~# lvresize --size 2.1G /dev/mapper/bubba-storage Rounding size to boundary between physical extents: 2.10 GiB WARNING: Reducing active logical volume to 2.10 GiB THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce storage? [y/n]: y Size of logical volume bubba/storage changed from 455.42 GiB (116588 extents) to 2.10 GiB (538 extents). Logical volume storage successfully resized Furthermore, I was wrong when I determined the --size to 2.1G in the command abowe, because I wanted to write 20.1G instead. The bad news is that you probably screwed the filesystem. LVM provides flexibility over plain partitions, but at the cost of complexity and is less tolerant to such a mistake. With a plain partition, all you would have to do to fix the mistake is to extend the reduced partition (not the filesystem) to its original size. However, with LVM, if you extend a reduced LV to its original size, nothing guarantees that it will use the same physical blocks as before. You can try, but it may not restore the filesystem's integrity. Run fsck to check the damage. Edit : check in /etc/lvm/backup for a metadata backup of the previous situation of the VG bubba. Using it to restore the LV is beyond my knowledge, but if your data is important and you don't have a backup (sounds like an oxymoron), my advice is don't touch anything until you find how to restore the LV. Otherwise, just extend the LV and recreate the filesystem on it. Now what can I do to correct the partitions? There is no partition to correct. The problem is in the LV bubba/storage and its filesystem. If you read the original post, it looks like the e2rsize failed. Therefor the only problem is the partition table is wrong. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/557d8a79.4060...@torfree.net
Re: Resizing partitions on a headless server
Pascal Hambourg pas...@plouf.fr.eu.org writes: csanyi...@gmail.com a écrit : Finally, I solved the problem by doing the followings: # lvresize --size 455.5G /dev/mapper/bubba-storage # e2fsck -f /dev/mapper/bubba-storage Glad you were lucky. Now, I can to use parted to resize my partitions. What is my goal? Filesystem Size Used Avail Use% Mounted on /dev/root 9.2G 8.0G 815M 91% / devtmpfs 125M 0 125M 0% /dev tmpfs 125M 4.0K 125M 1% /dev/shm tmpfs 125M 5.6M 120M 5% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 125M 0 125M 0% /sys/fs/cgroup /dev/mapper/bubba-storage 449G 8.2G 418G 2% /home tmpfs 25M 0 25M 0% /run/user/1001 # fdisk -l Device Boot Start End Sectors Size Id Type /dev/sda1 63 19551104 19551042 9.3G 83 Linux /dev/sda219551105 974647484 955096380 455.4G 8e Linux LVM /dev/sda3 974647485 976768064 2120580 1G 82 Linux swap / Solaris # lvs LV VGAttr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert storage bubba -wi-ao 455.40g # pvs PV VGFmt Attr PSize PFree /dev/sda2 bubba lvm2 a-- 455.42g 20.00m I'm curious : what's the use of LVM if you have only one LV taking all the space in the VG, and plain partitions outside the VG ? I bought thie headless powerpc server here: http://www.excitostore.com/ I get the hardware preinstalled with Debian Sarge. The developer knows why did the partition so. -- Regards from Pal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87bngikudq@gmail.com
Re: Resizing partitions on a headless server
csanyi...@gmail.com a écrit : Gary Dale garyd...@torfree.net writes: On 14/06/15 09:12 AM, Pascal Hambourg wrote: There is no partition to correct. The problem is in the LV bubba/storage and its filesystem. If you read the original post, it looks like the e2rsize failed. Therefor the only problem is the partition table is wrong. No command mentionned by the OP ever modified the partition table. Modifying LVM logical volumes and filesystems does not modify the partition table. They have their own metadata. I think now is everything fixed, the partition table also. Am I right? Hopefully yes. You were lucky this time. The partition table was never modified. How can be sure? After reboot I can login as non root user, I can find my ( not so valuable ) data on /home, .. Well, if fsck -f did not complain and your files are back, you can be pretty confident. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/557dbc3f@plouf.fr.eu.org
Re: Resizing partitions on a headless server
Gary Dale garyd...@torfree.net writes: On 14/06/15 09:12 AM, Pascal Hambourg wrote: csanyi...@gmail.com a écrit : Hello, on my headless Debian GNU/Linux Jessie server I want to resize partitions. Why ? The use of LVM should avoid the need to resize partitions (PVs). root@b2:~# e2fsck -f /dev/mapper/bubba-storage e2fsck 1.42.12 (29-Aug-2014) 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 Bubba_home: 114439/59703296 files (0.4% non-contiguous), \ 4001648/119386112 blocks At this step I think I forgot to run again: root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G root@b2:~# lvresize --size 2.1G /dev/mapper/bubba-storage Rounding size to boundary between physical extents: 2.10 GiB WARNING: Reducing active logical volume to 2.10 GiB THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce storage? [y/n]: y Size of logical volume bubba/storage changed from 455.42 GiB (116588 extents) to 2.10 GiB (538 extents). Logical volume storage successfully resized Furthermore, I was wrong when I determined the --size to 2.1G in the command abowe, because I wanted to write 20.1G instead. The bad news is that you probably screwed the filesystem. LVM provides flexibility over plain partitions, but at the cost of complexity and is less tolerant to such a mistake. With a plain partition, all you would have to do to fix the mistake is to extend the reduced partition (not the filesystem) to its original size. However, with LVM, if you extend a reduced LV to its original size, nothing guarantees that it will use the same physical blocks as before. You can try, but it may not restore the filesystem's integrity. Run fsck to check the damage. Edit : check in /etc/lvm/backup for a metadata backup of the previous situation of the VG bubba. Using it to restore the LV is beyond my knowledge, but if your data is important and you don't have a backup (sounds like an oxymoron), my advice is don't touch anything until you find how to restore the LV. Otherwise, just extend the LV and recreate the filesystem on it. Now what can I do to correct the partitions? There is no partition to correct. The problem is in the LV bubba/storage and its filesystem. If you read the original post, it looks like the e2rsize failed. Therefor the only problem is the partition table is wrong. I think now is everything fixed, the partition table also. Am I right? How can be sure? After reboot I can login as non root user, I can find my ( not so valuable ) data on /home, .. -- Regards from Pal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87k2v6l4ne@gmail.com
Re: Resizing partitions on a headless server
On 13/06/15 03:19 PM, csanyi...@gmail.com wrote: Hello, on my headless Debian GNU/Linux Jessie server I want to resize partitions. So far I did followings: root@b2:~# df -T FilesystemType 1K-blocksUsed Available Use% Mounted on /dev/root ext3 9621848 8293064840008 91% / devtmpfs devtmpfs127800 0127800 0% /dev tmpfs tmpfs 127880 4127876 1% /dev/shm tmpfs tmpfs 127880 17992109888 15% /run tmpfs tmpfs 5120 0 5120 0% /run/lock tmpfs tmpfs 127880 0127880 0% /sys/fs/cgroup /dev/mapper/bubba-storage ext3 470050224 8512368 437660636 2% /home tmpfs tmpfs25576 0 25576 0% /run/user/1001 tmpfs tmpfs25576 0 25576 0% /run/user/0 root@b2:~# umount /dev/mapper/bubba-storage root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G resize2fs 1.42.12 (29-Aug-2014) Please run 'e2fsck -f /dev/mapper/bubba-storage' first. root@b2:~# e2fsck -f /dev/mapper/bubba-storage e2fsck 1.42.12 (29-Aug-2014) 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 Bubba_home: 114439/59703296 files (0.4% non-contiguous), \ 4001648/119386112 blocks At this step I think I forgot to run again: root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G root@b2:~# lvresize --size 2.1G /dev/mapper/bubba-storage Rounding size to boundary between physical extents: 2.10 GiB WARNING: Reducing active logical volume to 2.10 GiB THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce storage? [y/n]: y Size of logical volume bubba/storage changed from 455.42 GiB (116588 extents) to 2.10 GiB (538 extents). Logical volume storage successfully resized Furthermore, I was wrong when I determined the --size to 2.1G in the command abowe, because I wanted to write 20.1G instead. root@b2:~# resize2fs -p /dev/mapper/bubba-storage resize2fs 1.42.12 (29-Aug-2014) resize2fs: New size smaller than minimum (2153070) root@b2:~# mount /dev/mapper/bubba-storage After these steps I rebooted the server but can't login on it with ssh but only with serial cable. Now, when I login on the serial console as non root user, I get messages: b2 login: csanyipal Password: EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 Last login: Sat Jun 13 14:06:27 CEST 2015 from 192.168.10.90 on pts/0 Linux b2 3.2.62-1 #1 Mon Aug 25 04:22:40 UTC 2014 ppc The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. No mail. EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 No directory, logging in with HOEXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 ME=/ Now what can I do to correct the partitions? Boot from something like system rescue CD and try to fix the damage. With any luck resize2fs didn't do anything. Hopefully you can put the partitions back the way they were. Otherwise, there is always testdisk or your backups. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/557cf6de.8030...@torfree.net
Re: Resizing partitions on a headless server
Gary Dale garyd...@torfree.net writes: On 13/06/15 03:19 PM, csanyi...@gmail.com wrote: Hello, on my headless Debian GNU/Linux Jessie server I want to resize partitions. So far I did followings: root@b2:~# df -T FilesystemType 1K-blocksUsed Available Use% Mounted on /dev/root ext3 9621848 8293064840008 91% / devtmpfs devtmpfs127800 0127800 0% /dev tmpfs tmpfs 127880 4127876 1% /dev/shm tmpfs tmpfs 127880 17992109888 15% /run tmpfs tmpfs 5120 0 5120 0% /run/lock tmpfs tmpfs 127880 0127880 0% /sys/fs/cgroup /dev/mapper/bubba-storage ext3 470050224 8512368 437660636 2% /home tmpfs tmpfs25576 0 25576 0% /run/user/1001 tmpfs tmpfs25576 0 25576 0% /run/user/0 root@b2:~# umount /dev/mapper/bubba-storage root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G resize2fs 1.42.12 (29-Aug-2014) Please run 'e2fsck -f /dev/mapper/bubba-storage' first. root@b2:~# e2fsck -f /dev/mapper/bubba-storage e2fsck 1.42.12 (29-Aug-2014) 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 Bubba_home: 114439/59703296 files (0.4% non-contiguous), \ 4001648/119386112 blocks At this step I think I forgot to run again: root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G root@b2:~# lvresize --size 2.1G /dev/mapper/bubba-storage Rounding size to boundary between physical extents: 2.10 GiB WARNING: Reducing active logical volume to 2.10 GiB THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce storage? [y/n]: y Size of logical volume bubba/storage changed from 455.42 GiB (116588 extents) to 2.10 GiB (538 extents). Logical volume storage successfully resized Furthermore, I was wrong when I determined the --size to 2.1G in the command abowe, because I wanted to write 20.1G instead. root@b2:~# resize2fs -p /dev/mapper/bubba-storage resize2fs 1.42.12 (29-Aug-2014) resize2fs: New size smaller than minimum (2153070) root@b2:~# mount /dev/mapper/bubba-storage After these steps I rebooted the server but can't login on it with ssh but only with serial cable. Now, when I login on the serial console as non root user, I get messages: b2 login: csanyipal Password: EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 Last login: Sat Jun 13 14:06:27 CEST 2015 from 192.168.10.90 on pts/0 Linux b2 3.2.62-1 #1 Mon Aug 25 04:22:40 UTC 2014 ppc The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. No mail. EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 No directory, logging in with HOEXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 ME=/ Now what can I do to correct the partitions? Boot from something like system rescue CD and try to fix the damage. With any luck resize2fs didn't do anything. Hopefully you can put the partitions back the way they were. My headless powerpc box can't boot from CD because it hasn't CD device. It only has USB drive. Furthermore, it can't boot with an usual system rescue image installed on USB stick, because it uses uImage. I tried systemrescuecd ( http://www.sysresccd.org ), gparted live to boot with, but without success. I think I have the possibility to use serial console only. There I can run parted but don't know how to fix with it the problem I made. Otherwise, there is always testdisk or your backups. I just installed testdisk and try followings: Select a media: Disk /dev/sda - 500 GB / 465 GiB - WDC WD5000AACS-00G8B1 Disk /dev/mapper/bubba-storage - 2256 MB / 2152 MiB - WDC \ WD5000AACS-00G8B1 Disk /dev/dm-0 - 2256 MB / 2152 MiB - WDC WD5000AACS-00G8B1 [Proceed ] Please select the partition table type, press Enter when done. [Humax ] Humax partition table Hint: Humax partition table type has been detected. Disk /dev/sda - 500 GB / 465 GiB - WDC WD5000AACS-00G8B1 CHS 60801 255 63 - sector size=512 [ Analyse ] Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63 Current partition
Resizing partitions on a headless server
Hello, on my headless Debian GNU/Linux Jessie server I want to resize partitions. So far I did followings: root@b2:~# df -T FilesystemType 1K-blocksUsed Available Use% Mounted on /dev/root ext3 9621848 8293064840008 91% / devtmpfs devtmpfs127800 0127800 0% /dev tmpfs tmpfs 127880 4127876 1% /dev/shm tmpfs tmpfs 127880 17992109888 15% /run tmpfs tmpfs 5120 0 5120 0% /run/lock tmpfs tmpfs 127880 0127880 0% /sys/fs/cgroup /dev/mapper/bubba-storage ext3 470050224 8512368 437660636 2% /home tmpfs tmpfs25576 0 25576 0% /run/user/1001 tmpfs tmpfs25576 0 25576 0% /run/user/0 root@b2:~# umount /dev/mapper/bubba-storage root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G resize2fs 1.42.12 (29-Aug-2014) Please run 'e2fsck -f /dev/mapper/bubba-storage' first. root@b2:~# e2fsck -f /dev/mapper/bubba-storage e2fsck 1.42.12 (29-Aug-2014) 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 Bubba_home: 114439/59703296 files (0.4% non-contiguous), \ 4001648/119386112 blocks At this step I think I forgot to run again: root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G root@b2:~# lvresize --size 2.1G /dev/mapper/bubba-storage Rounding size to boundary between physical extents: 2.10 GiB WARNING: Reducing active logical volume to 2.10 GiB THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce storage? [y/n]: y Size of logical volume bubba/storage changed from 455.42 GiB (116588 extents) to 2.10 GiB (538 extents). Logical volume storage successfully resized Furthermore, I was wrong when I determined the --size to 2.1G in the command abowe, because I wanted to write 20.1G instead. root@b2:~# resize2fs -p /dev/mapper/bubba-storage resize2fs 1.42.12 (29-Aug-2014) resize2fs: New size smaller than minimum (2153070) root@b2:~# mount /dev/mapper/bubba-storage After these steps I rebooted the server but can't login on it with ssh but only with serial cable. Now, when I login on the serial console as non root user, I get messages: b2 login: csanyipal Password: EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 Last login: Sat Jun 13 14:06:27 CEST 2015 from 192.168.10.90 on pts/0 Linux b2 3.2.62-1 #1 Mon Aug 25 04:22:40 UTC 2014 ppc The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. No mail. EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 No directory, logging in with HOEXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode block - inode=30752769, block=61505538 ME=/ Now what can I do to correct the partitions? -- Regards from Pal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87vberwh41@gmail.com